public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: some trivial cleanups related to io trees
@ 2025-04-01 12:05 fdmanana
  2025-04-01 12:05 ` [PATCH 1/3] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 12:05 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Some simple cleanups related to io trees that are very trivial and were
initally part of a larger patchset. Details in the change logs.

Filipe Manana (3):
  btrfs: use clear_extent_bit() at try_release_extent_state()
  btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
  btrfs: simplify last record detection at test_range_bit_exists()

 fs/btrfs/extent-io-tree.c | 8 +++-----
 fs/btrfs/extent_io.c      | 2 +-
 fs/btrfs/volumes.c        | 7 +++----
 3 files changed, 7 insertions(+), 10 deletions(-)

-- 
2.45.2


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

* [PATCH 1/3] btrfs: use clear_extent_bit() at try_release_extent_state()
  2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
@ 2025-04-01 12:05 ` fdmanana
  2025-04-01 12:05 ` [PATCH 2/3] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 12:05 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of using __clear_extent_bit() we can use clear_extent_bit() since
we pass a NULL value for the changeset argument.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 19f21540475d..50b74531b745 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2651,7 +2651,7 @@ static bool try_release_extent_state(struct extent_io_tree *tree,
 	 * nodatasum, delalloc new and finishing ordered bits. The delalloc new
 	 * bit will be cleared by ordered extent completion.
 	 */
-	ret2 = __clear_extent_bit(tree, start, end, clear_bits, &cached_state, NULL);
+	ret2 = clear_extent_bit(tree, start, end, clear_bits, &cached_state);
 	/*
 	 * If clear_extent_bit failed for enomem reasons, we can't allow the
 	 * release to continue.
-- 
2.45.2


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

* [PATCH 2/3] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
  2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
  2025-04-01 12:05 ` [PATCH 1/3] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
@ 2025-04-01 12:05 ` fdmanana
  2025-04-01 12:05 ` [PATCH 3/3] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 12:05 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of using __clear_extent_bit() we can use clear_extent_bits() since
we pass a NULL value for the cached and changeset arguments.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/volumes.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c8c21c55be53..784d5a15ef29 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5508,10 +5508,9 @@ static void chunk_map_device_clear_bits(struct btrfs_chunk_map *map, unsigned in
 		struct btrfs_io_stripe *stripe = &map->stripes[i];
 		struct btrfs_device *device = stripe->dev;
 
-		__clear_extent_bit(&device->alloc_state, stripe->physical,
-				   stripe->physical + map->stripe_size - 1,
-				   bits | EXTENT_NOWAIT,
-				   NULL, NULL);
+		clear_extent_bits(&device->alloc_state, stripe->physical,
+				  stripe->physical + map->stripe_size - 1,
+				  bits | EXTENT_NOWAIT);
 	}
 }
 
-- 
2.45.2


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

* [PATCH 3/3] btrfs: simplify last record detection at test_range_bit_exists()
  2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
  2025-04-01 12:05 ` [PATCH 1/3] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
  2025-04-01 12:05 ` [PATCH 2/3] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
@ 2025-04-01 12:05 ` fdmanana
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
  2025-04-01 21:20 ` [PATCH 0/3] " Qu Wenruo
  4 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 12:05 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of keeping track of the minimum start offset of the next record
and detecting overflow everytime we update that offset to be the sum of
current record's end offset plus one, we can simply exit when the current
record ends at or beyond our end offset and forget about about updating
the start offset on every iteration and testing for it at the top of the
loop. This makes both the source code and assembly code simpler, more
efficient and shorter (reducing the object text size).

Also remove the pointless initializion to NULL of the state variable, as
we don't use it before the first assignment to it. This may help avoid
some warnings with clang tools such as the one reported/fixed by commit
966de47ff0c9 ("btrfs: remove redundant initialization of variables in
log_new_ancestors").

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent-io-tree.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index 7ae24a533404..293cb354259d 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -1726,14 +1726,14 @@ u64 count_range_bits(struct extent_io_tree *tree,
  */
 bool test_range_bit_exists(struct extent_io_tree *tree, u64 start, u64 end, u32 bit)
 {
-	struct extent_state *state = NULL;
+	struct extent_state *state;
 	bool bitset = false;
 
 	ASSERT(is_power_of_2(bit));
 
 	spin_lock(&tree->lock);
 	state = tree_search(tree, start);
-	while (state && start <= end) {
+	while (state) {
 		if (state->start > end)
 			break;
 
@@ -1742,9 +1742,7 @@ bool test_range_bit_exists(struct extent_io_tree *tree, u64 start, u64 end, u32
 			break;
 		}
 
-		/* If state->end is (u64)-1, start will overflow to 0 */
-		start = state->end + 1;
-		if (start > end || start == 0)
+		if (state->end >= end)
 			break;
 		state = next_state(state);
 	}
-- 
2.45.2


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

* [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees
  2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
                   ` (2 preceding siblings ...)
  2025-04-01 12:05 ` [PATCH 3/3] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
@ 2025-04-01 15:29 ` fdmanana
  2025-04-01 15:29   ` [PATCH v2 1/4] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
                     ` (5 more replies)
  2025-04-01 21:20 ` [PATCH 0/3] " Qu Wenruo
  4 siblings, 6 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 15:29 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Some simple cleanups related to io trees that are very trivial and were
initally part of a larger patchset. Details in the change logs.

V2: Added patch 3/4.

Filipe Manana (4):
  btrfs: use clear_extent_bit() at try_release_extent_state()
  btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
  btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible
  btrfs: simplify last record detection at test_range_bit_exists()

 fs/btrfs/extent-io-tree.c    |  8 +++-----
 fs/btrfs/extent_io.c         |  2 +-
 fs/btrfs/inode.c             |  3 +--
 fs/btrfs/reflink.c           |  5 ++---
 fs/btrfs/tests/inode-tests.c | 24 ++++++++++++------------
 fs/btrfs/volumes.c           |  7 +++----
 6 files changed, 22 insertions(+), 27 deletions(-)

-- 
2.45.2


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

* [PATCH v2 1/4] btrfs: use clear_extent_bit() at try_release_extent_state()
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
@ 2025-04-01 15:29   ` fdmanana
  2025-04-01 15:29   ` [PATCH v2 2/4] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 15:29 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of using __clear_extent_bit() we can use clear_extent_bit() since
we pass a NULL value for the changeset argument.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 19f21540475d..50b74531b745 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2651,7 +2651,7 @@ static bool try_release_extent_state(struct extent_io_tree *tree,
 	 * nodatasum, delalloc new and finishing ordered bits. The delalloc new
 	 * bit will be cleared by ordered extent completion.
 	 */
-	ret2 = __clear_extent_bit(tree, start, end, clear_bits, &cached_state, NULL);
+	ret2 = clear_extent_bit(tree, start, end, clear_bits, &cached_state);
 	/*
 	 * If clear_extent_bit failed for enomem reasons, we can't allow the
 	 * release to continue.
-- 
2.45.2


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

* [PATCH v2 2/4] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
  2025-04-01 15:29   ` [PATCH v2 1/4] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
@ 2025-04-01 15:29   ` fdmanana
  2025-04-01 15:29   ` [PATCH v2 3/4] btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible fdmanana
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 15:29 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of using __clear_extent_bit() we can use clear_extent_bits() since
we pass a NULL value for the cached and changeset arguments.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/volumes.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c8c21c55be53..784d5a15ef29 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5508,10 +5508,9 @@ static void chunk_map_device_clear_bits(struct btrfs_chunk_map *map, unsigned in
 		struct btrfs_io_stripe *stripe = &map->stripes[i];
 		struct btrfs_device *device = stripe->dev;
 
-		__clear_extent_bit(&device->alloc_state, stripe->physical,
-				   stripe->physical + map->stripe_size - 1,
-				   bits | EXTENT_NOWAIT,
-				   NULL, NULL);
+		clear_extent_bits(&device->alloc_state, stripe->physical,
+				  stripe->physical + map->stripe_size - 1,
+				  bits | EXTENT_NOWAIT);
 	}
 }
 
-- 
2.45.2


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

* [PATCH v2 3/4] btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
  2025-04-01 15:29   ` [PATCH v2 1/4] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
  2025-04-01 15:29   ` [PATCH v2 2/4] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
@ 2025-04-01 15:29   ` fdmanana
  2025-04-01 15:29   ` [PATCH v2 4/4] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 15:29 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Several places are using clear_extent_bit() and passing a NULL value for
the 'cached' argument, which is pointless as they can use instead
clear_extent_bits().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/inode.c             |  3 +--
 fs/btrfs/reflink.c           |  5 ++---
 fs/btrfs/tests/inode-tests.c | 24 ++++++++++++------------
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 95d29b9282ba..836dca07a06f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1753,8 +1753,7 @@ static int fallback_to_cow(struct btrfs_inode *inode,
 		spin_unlock(&sinfo->lock);
 
 		if (count > 0)
-			clear_extent_bit(io_tree, start, end, EXTENT_NORESERVE,
-					 NULL);
+			clear_extent_bits(io_tree, start, end, EXTENT_NORESERVE);
 	}
 	unlock_extent(io_tree, start, end, &cached_state);
 
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
index 15c296cb4dac..09e40a2fdcf0 100644
--- a/fs/btrfs/reflink.c
+++ b/fs/btrfs/reflink.c
@@ -95,9 +95,8 @@ static int copy_inline_to_page(struct btrfs_inode *inode,
 	if (ret < 0)
 		goto out_unlock;
 
-	clear_extent_bit(&inode->io_tree, file_offset, range_end,
-			 EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG,
-			 NULL);
+	clear_extent_bits(&inode->io_tree, file_offset, range_end,
+			  EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG);
 	ret = btrfs_set_extent_delalloc(inode, file_offset, range_end, 0, NULL);
 	if (ret)
 		goto out_unlock;
diff --git a/fs/btrfs/tests/inode-tests.c b/fs/btrfs/tests/inode-tests.c
index 8142a84129b6..09ba6e279d24 100644
--- a/fs/btrfs/tests/inode-tests.c
+++ b/fs/btrfs/tests/inode-tests.c
@@ -949,10 +949,10 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 	}
 
 	/* [BTRFS_MAX_EXTENT_SIZE/2][sectorsize HOLE][the rest] */
-	ret = clear_extent_bit(&BTRFS_I(inode)->io_tree,
-			       BTRFS_MAX_EXTENT_SIZE >> 1,
-			       (BTRFS_MAX_EXTENT_SIZE >> 1) + sectorsize - 1,
-			       EXTENT_DELALLOC | EXTENT_DELALLOC_NEW, NULL);
+	ret = clear_extent_bits(&BTRFS_I(inode)->io_tree,
+				BTRFS_MAX_EXTENT_SIZE >> 1,
+				(BTRFS_MAX_EXTENT_SIZE >> 1) + sectorsize - 1,
+				EXTENT_DELALLOC | EXTENT_DELALLOC_NEW);
 	if (ret) {
 		test_err("clear_extent_bit returned %d", ret);
 		goto out;
@@ -1016,10 +1016,10 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 	}
 
 	/* [BTRFS_MAX_EXTENT_SIZE+4k][4K HOLE][BTRFS_MAX_EXTENT_SIZE+4k] */
-	ret = clear_extent_bit(&BTRFS_I(inode)->io_tree,
-			       BTRFS_MAX_EXTENT_SIZE + sectorsize,
-			       BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1,
-			       EXTENT_DELALLOC | EXTENT_DELALLOC_NEW, NULL);
+	ret = clear_extent_bits(&BTRFS_I(inode)->io_tree,
+				BTRFS_MAX_EXTENT_SIZE + sectorsize,
+				BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1,
+				EXTENT_DELALLOC | EXTENT_DELALLOC_NEW);
 	if (ret) {
 		test_err("clear_extent_bit returned %d", ret);
 		goto out;
@@ -1050,8 +1050,8 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 	}
 
 	/* Empty */
-	ret = clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
-			       EXTENT_DELALLOC | EXTENT_DELALLOC_NEW, NULL);
+	ret = clear_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
+				EXTENT_DELALLOC | EXTENT_DELALLOC_NEW);
 	if (ret) {
 		test_err("clear_extent_bit returned %d", ret);
 		goto out;
@@ -1065,8 +1065,8 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 	ret = 0;
 out:
 	if (ret)
-		clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
-				 EXTENT_DELALLOC | EXTENT_DELALLOC_NEW, NULL);
+		clear_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1,
+				  EXTENT_DELALLOC | EXTENT_DELALLOC_NEW);
 	iput(inode);
 	btrfs_free_dummy_root(root);
 	btrfs_free_dummy_fs_info(fs_info);
-- 
2.45.2


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

* [PATCH v2 4/4] btrfs: simplify last record detection at test_range_bit_exists()
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
                     ` (2 preceding siblings ...)
  2025-04-01 15:29   ` [PATCH v2 3/4] btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible fdmanana
@ 2025-04-01 15:29   ` fdmanana
  2025-04-01 15:46   ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees Boris Burkov
  2025-04-01 21:22   ` Qu Wenruo
  5 siblings, 0 replies; 12+ messages in thread
From: fdmanana @ 2025-04-01 15:29 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Instead of keeping track of the minimum start offset of the next record
and detecting overflow everytime we update that offset to be the sum of
current record's end offset plus one, we can simply exit when the current
record ends at or beyond our end offset and forget about updating the
start offset on every iteration and testing for it at the top of the loop.
This makes both the source code and assembly code simpler, more efficient
and shorter (reducing the object text size).

Also remove the pointless initializion to NULL of the state variable, as
we don't use it before the first assignment to it. This may help avoid
some warnings with clang tools such as the one reported/fixed by commit
966de47ff0c9 ("btrfs: remove redundant initialization of variables in
log_new_ancestors").

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent-io-tree.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index 7ae24a533404..293cb354259d 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -1726,14 +1726,14 @@ u64 count_range_bits(struct extent_io_tree *tree,
  */
 bool test_range_bit_exists(struct extent_io_tree *tree, u64 start, u64 end, u32 bit)
 {
-	struct extent_state *state = NULL;
+	struct extent_state *state;
 	bool bitset = false;
 
 	ASSERT(is_power_of_2(bit));
 
 	spin_lock(&tree->lock);
 	state = tree_search(tree, start);
-	while (state && start <= end) {
+	while (state) {
 		if (state->start > end)
 			break;
 
@@ -1742,9 +1742,7 @@ bool test_range_bit_exists(struct extent_io_tree *tree, u64 start, u64 end, u32
 			break;
 		}
 
-		/* If state->end is (u64)-1, start will overflow to 0 */
-		start = state->end + 1;
-		if (start > end || start == 0)
+		if (state->end >= end)
 			break;
 		state = next_state(state);
 	}
-- 
2.45.2


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

* Re: [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
                     ` (3 preceding siblings ...)
  2025-04-01 15:29   ` [PATCH v2 4/4] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
@ 2025-04-01 15:46   ` Boris Burkov
  2025-04-01 21:22   ` Qu Wenruo
  5 siblings, 0 replies; 12+ messages in thread
From: Boris Burkov @ 2025-04-01 15:46 UTC (permalink / raw)
  To: fdmanana; +Cc: linux-btrfs

On Tue, Apr 01, 2025 at 04:29:50PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Some simple cleanups related to io trees that are very trivial and were
> initally part of a larger patchset. Details in the change logs.

Reviewed-by: Boris Burkov <boris@bur.io>

> 
> V2: Added patch 3/4.
> 
> Filipe Manana (4):
>   btrfs: use clear_extent_bit() at try_release_extent_state()
>   btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
>   btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible
>   btrfs: simplify last record detection at test_range_bit_exists()
> 
>  fs/btrfs/extent-io-tree.c    |  8 +++-----
>  fs/btrfs/extent_io.c         |  2 +-
>  fs/btrfs/inode.c             |  3 +--
>  fs/btrfs/reflink.c           |  5 ++---
>  fs/btrfs/tests/inode-tests.c | 24 ++++++++++++------------
>  fs/btrfs/volumes.c           |  7 +++----
>  6 files changed, 22 insertions(+), 27 deletions(-)
> 
> -- 
> 2.45.2
> 

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

* Re: [PATCH 0/3] btrfs: some trivial cleanups related to io trees
  2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
                   ` (3 preceding siblings ...)
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
@ 2025-04-01 21:20 ` Qu Wenruo
  4 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2025-04-01 21:20 UTC (permalink / raw)
  To: fdmanana, linux-btrfs



在 2025/4/1 22:35, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Some simple cleanups related to io trees that are very trivial and were
> initally part of a larger patchset. Details in the change logs.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> 
> Filipe Manana (3):
>    btrfs: use clear_extent_bit() at try_release_extent_state()
>    btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
>    btrfs: simplify last record detection at test_range_bit_exists()
> 
>   fs/btrfs/extent-io-tree.c | 8 +++-----
>   fs/btrfs/extent_io.c      | 2 +-
>   fs/btrfs/volumes.c        | 7 +++----
>   3 files changed, 7 insertions(+), 10 deletions(-)
> 


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

* Re: [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees
  2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
                     ` (4 preceding siblings ...)
  2025-04-01 15:46   ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees Boris Burkov
@ 2025-04-01 21:22   ` Qu Wenruo
  5 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2025-04-01 21:22 UTC (permalink / raw)
  To: fdmanana, linux-btrfs



在 2025/4/2 01:59, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Some simple cleanups related to io trees that are very trivial and were
> initally part of a larger patchset. Details in the change logs.

My bad, didn't notice the v2 series.

Still looks good.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu>
> V2: Added patch 3/4.
> 
> Filipe Manana (4):
>    btrfs: use clear_extent_bit() at try_release_extent_state()
>    btrfs: use clear_extent_bits() at chunk_map_device_clear_bits()
>    btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible
>    btrfs: simplify last record detection at test_range_bit_exists()
> 
>   fs/btrfs/extent-io-tree.c    |  8 +++-----
>   fs/btrfs/extent_io.c         |  2 +-
>   fs/btrfs/inode.c             |  3 +--
>   fs/btrfs/reflink.c           |  5 ++---
>   fs/btrfs/tests/inode-tests.c | 24 ++++++++++++------------
>   fs/btrfs/volumes.c           |  7 +++----
>   6 files changed, 22 insertions(+), 27 deletions(-)
> 


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

end of thread, other threads:[~2025-04-01 21:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 12:05 [PATCH 0/3] btrfs: some trivial cleanups related to io trees fdmanana
2025-04-01 12:05 ` [PATCH 1/3] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
2025-04-01 12:05 ` [PATCH 2/3] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
2025-04-01 12:05 ` [PATCH 3/3] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
2025-04-01 15:29 ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees fdmanana
2025-04-01 15:29   ` [PATCH v2 1/4] btrfs: use clear_extent_bit() at try_release_extent_state() fdmanana
2025-04-01 15:29   ` [PATCH v2 2/4] btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() fdmanana
2025-04-01 15:29   ` [PATCH v2 3/4] btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible fdmanana
2025-04-01 15:29   ` [PATCH v2 4/4] btrfs: simplify last record detection at test_range_bit_exists() fdmanana
2025-04-01 15:46   ` [PATCH v2 0/4] btrfs: some trivial cleanups related to io trees Boris Burkov
2025-04-01 21:22   ` Qu Wenruo
2025-04-01 21:20 ` [PATCH 0/3] " Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox