linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent
@ 2020-06-15  9:36 fdmanana
  2020-06-15 10:29 ` Johannes Thumshirn
  2020-06-16 12:56 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2020-06-15  9:36 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

The 'log_list' member of an ordered extent was used keep track of which
ordered extents we needed to wait after logging metadata, but is not used
anymore since commit 5636cf7d6dc86f ("btrfs: remove the logged extents
infrastructure"), as we now always wait on ordered extent completion
before logging metadata. So just remove it since it's doing nothing and
making each ordered extent structure waste more memory (2 pointers).

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/ordered-data.c | 2 --
 fs/btrfs/ordered-data.h | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index e13b3d28c063..73d5352c401b 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -197,7 +197,6 @@ static int __btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
 	INIT_LIST_HEAD(&entry->root_extent_list);
 	INIT_LIST_HEAD(&entry->work_list);
 	init_completion(&entry->completion);
-	INIT_LIST_HEAD(&entry->log_list);
 	INIT_LIST_HEAD(&entry->trans_list);
 
 	trace_btrfs_ordered_extent_add(inode, entry);
@@ -429,7 +428,6 @@ void btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry)
 	trace_btrfs_ordered_extent_put(entry->inode, entry);
 
 	if (refcount_dec_and_test(&entry->refs)) {
-		ASSERT(list_empty(&entry->log_list));
 		ASSERT(list_empty(&entry->trans_list));
 		ASSERT(list_empty(&entry->root_extent_list));
 		ASSERT(RB_EMPTY_NODE(&entry->rb_node));
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index c01c9698250b..35e81b80bd5d 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -101,9 +101,6 @@ struct btrfs_ordered_extent {
 	/* list of checksums for insertion when the extent io is done */
 	struct list_head list;
 
-	/* If we need to wait on this to be done */
-	struct list_head log_list;
-
 	/* If the transaction needs to wait on this ordered extent */
 	struct list_head trans_list;
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent
  2020-06-15  9:36 [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent fdmanana
@ 2020-06-15 10:29 ` Johannes Thumshirn
  2020-06-16 12:56 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2020-06-15 10:29 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent
  2020-06-15  9:36 [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent fdmanana
  2020-06-15 10:29 ` Johannes Thumshirn
@ 2020-06-16 12:56 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-06-16 12:56 UTC (permalink / raw)
  To: fdmanana; +Cc: linux-btrfs

On Mon, Jun 15, 2020 at 10:36:48AM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The 'log_list' member of an ordered extent was used keep track of which
> ordered extents we needed to wait after logging metadata, but is not used
> anymore since commit 5636cf7d6dc86f ("btrfs: remove the logged extents
> infrastructure"), as we now always wait on ordered extent completion
> before logging metadata. So just remove it since it's doing nothing and
> making each ordered extent structure waste more memory (2 pointers).
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-16 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15  9:36 [PATCH 1/2] Btrfs: remove no longer used log_list member of struct btrfs_ordered_extent fdmanana
2020-06-15 10:29 ` Johannes Thumshirn
2020-06-16 12:56 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).