Skip to contentSkip to conversation

btrfs: async checksumming cleanups

PATCH In review Daniel Vacek 2 participants 9 messages Sep 3 – Sep 4 Btrfs file system

lore
Share & tools
lore
#0 lore raw

v2 cover btrfs: async checksumming cleanups

While trying to deal with encryption bounce bios async checksumming, a solution came up which covers all writes (also the regular !encrypted ones). As a result the code cleans up quite nicely.

In v2 the first patch was further polished and the new last patch promotes async checksumming out of EXPERIMENTAL. Qu confirmed it was never meant to stay there for long.

Details in the patches themselves.

v1: https://lore.kernel.org/linux-btrfs/[email protected]/

Daniel Vacek (3):
btrfs: consume the given iter directly instead of copying in

    csum_one_bio()

btrfs: use bio::remaining for async checksumming synchronization
btrfs: promote async checksumming out of EXPERIMENTAL

 fs/btrfs/bio.c       |  8 --------
 fs/btrfs/bio.h       |  4 ----
 fs/btrfs/file-item.c | 21 +++++++++------------
 3 files changed, 9 insertions(+), 24 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH v2 1/3 btrfs: consume the given iter directly instead of copying in csum_one_bio()

This is just a small cleanup to avoid copying the iter twice in async case. We already have a copy csum_one_bio() can consume directly. No need to copy again the second time.
We can use this copy also in the sync case and get rid of the parameter.

---

v2: Use the bbio::csum_saved_iter in both cases and simplify even further.

---
 fs/btrfs/file-item.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
fs/btrfs/file-item.c +7 -8
index 581ca5653be9..4a7681557ec1 100644
@@ -797,18 +797,17 @@ int btrfs_lookup_csums_bitmap(struct btrfs_root *root, struct btrfs_path *path,
 	return ret;
 }
 
-static void csum_one_bio(struct btrfs_bio *bbio, struct bvec_iter *src)
+static void csum_one_bio(struct btrfs_bio *bbio)
 {
 	struct btrfs_inode *inode = bbio->inode;
 	struct btrfs_fs_info *fs_info = inode->root->fs_info;
 	struct btrfs_ordered_sum *sums = bbio->sums;
-	struct bvec_iter iter;
+	struct bvec_iter *iter = &bbio->csum_saved_iter;
 	const u32 blocksize = fs_info->sectorsize;
 	int index = 0;
 
-	for (iter = *src; iter.bi_size; bio_advance_iter(&bbio->bio, &iter, blocksize)) {
-		btrfs_csum_one_bio_block(fs_info, &bbio->bio, &iter,
-					 sums->sums + index);
+	for (; iter->bi_size; bio_advance_iter(&bbio->bio, iter, blocksize)) {
+		btrfs_csum_one_bio_block(fs_info, &bbio->bio, iter, sums->sums + index);
 
 		index += fs_info->csum_size;
 	}
@@ -820,7 +819,7 @@ static void csum_one_bio_work(struct work_struct *work)
 
 	ASSERT(btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE);
 	ASSERT(bbio->async_csum == true);
-	csum_one_bio(bbio, &bbio->csum_saved_iter);
+	csum_one_bio(bbio);
 	complete(&bbio->csum_done);
 }
 
@@ -850,13 +849,13 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async)
 	bbio->sums = sums;
 	btrfs_add_ordered_sum(ordered, sums);
 
+	bbio->csum_saved_iter = bio->bi_iter;
 	if (!async) {
-		csum_one_bio(bbio, &bbio->bio.bi_iter);
+		csum_one_bio(bbio);
 		return 0;
 	}
 	init_completion(&bbio->csum_done);
 	bbio->async_csum = true;
-	bbio->csum_saved_iter = bbio->bio.bi_iter;
 	INIT_WORK(&bbio->csum_work, csum_one_bio_work);
 	schedule_work(&bbio->csum_work);
 	return 0;
Signature · 1 line
2.53.0
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] btrfs: consume the given iter directly instead of copying in csum_one_bio()

Quoted 6 lines · Daniel Vacek

This is just a small cleanup to avoid copying the iter twice in async case. We already have a copy csum_one_bio() can consume directly. No need to copy again the second time.
We can use this copy also in the sync case and get rid of the parameter.

Thanks,
Qu

Quoted 59 lines

---

v2: Use the bbio::csum_saved_iter in both cases and simplify even further.

---
  fs/btrfs/file-item.c | 15 +++++++--------
  1 file changed, 7 insertions(+), 8 deletions(-)
fs/btrfs/file-item.c +7 -8
index 581ca5653be9..4a7681557ec1 100644
@@ -797,18 +797,17 @@ int btrfs_lookup_csums_bitmap(struct btrfs_root *root, struct btrfs_path *path,
  	return ret;
  }
 
-static void csum_one_bio(struct btrfs_bio *bbio, struct bvec_iter *src)
+static void csum_one_bio(struct btrfs_bio *bbio)
  {
  	struct btrfs_inode *inode = bbio->inode;
  	struct btrfs_fs_info *fs_info = inode->root->fs_info;
  	struct btrfs_ordered_sum *sums = bbio->sums;
-	struct bvec_iter iter;
+	struct bvec_iter *iter = &bbio->csum_saved_iter;
  	const u32 blocksize = fs_info->sectorsize;
  	int index = 0;
 
-	for (iter = *src; iter.bi_size; bio_advance_iter(&bbio->bio, &iter, blocksize)) {
-		btrfs_csum_one_bio_block(fs_info, &bbio->bio, &iter,
-					 sums->sums + index);
+	for (; iter->bi_size; bio_advance_iter(&bbio->bio, iter, blocksize)) {
+		btrfs_csum_one_bio_block(fs_info, &bbio->bio, iter, sums->sums + index);
 
  		index += fs_info->csum_size;
  	}
@@ -820,7 +819,7 @@ static void csum_one_bio_work(struct work_struct *work)
 
  	ASSERT(btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE);
  	ASSERT(bbio->async_csum == true);
-	csum_one_bio(bbio, &bbio->csum_saved_iter);
+	csum_one_bio(bbio);
  	complete(&bbio->csum_done);
  }
 
@@ -850,13 +849,13 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async)
  	bbio->sums = sums;
  	btrfs_add_ordered_sum(ordered, sums);
 
+	bbio->csum_saved_iter = bio->bi_iter;
  	if (!async) {
-		csum_one_bio(bbio, &bbio->bio.bi_iter);
+		csum_one_bio(bbio);
  		return 0;
  	}
  	init_completion(&bbio->csum_done);
  	bbio->async_csum = true;
-	bbio->csum_saved_iter = bbio->bio.bi_iter;
  	INIT_WORK(&bbio->csum_work, csum_one_bio_work);
  	schedule_work(&bbio->csum_work);
  	return 0;
#3 lore raw

PATCH v2 2/3 btrfs: use bio::remaining for async checksumming synchronization

In reply to Daniel Vacek

We can use bio::remaining counter to sync the offloaded checksuming. As a result we can slim down the btrfs_bio structure by 24 bytes and simplify the code a bit.

$ pahole | diff
-	/* size: 328, cachelines: 6, members: 15 */
+	/* size: 304, cachelines: 5, members: 14 */

Moreover this will allow us enabling async checksumming with encryption where we need to checksum the bounce bio instead of our regular one embedded in btrfs_bio. And so we need to extend it's lifetime. This is the preffered way to do so.

---

No change since v1

---
 fs/btrfs/bio.c       | 4 ----
 fs/btrfs/bio.h       | 4 ----
 fs/btrfs/file-item.c | 6 ++----
 3 files changed, 2 insertions(+), 12 deletions(-)
fs/btrfs/bio.c +0 -4
index 19b4855969f5..771b7d598aee 100644
@@ -103,7 +103,6 @@ static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info,
 	bbio->can_use_append = orig_bbio->can_use_append;
 	bbio->is_scrub = orig_bbio->is_scrub;
 	bbio->is_remap = orig_bbio->is_remap;
-	bbio->async_csum = orig_bbio->async_csum;
 
 	atomic_inc(&orig_bbio->pending_ios);
 	return bbio;
@@ -114,9 +113,6 @@ void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
 	/* Make sure we're already in task context. */
 	ASSERT(in_task());
 
-	if (bbio->async_csum)
-		wait_for_completion(&bbio->csum_done);
-
 	bbio->bio.bi_status = status;
 	if (bbio->bio.bi_pool == &btrfs_clone_bioset) {
 		struct btrfs_bio *orig_bbio = bbio->private;
fs/btrfs/bio.h +0 -4
index b7bd377a0162..bbf362b8668b 100644
@@ -58,7 +58,6 @@ struct btrfs_bio {
 			struct btrfs_ordered_extent *ordered;
 			struct btrfs_ordered_sum *sums;
 			struct work_struct csum_work;
-			struct completion csum_done;
 			struct bvec_iter csum_saved_iter;
 			u64 orig_physical;
 			u64 orig_logical;
@@ -93,9 +92,6 @@ struct btrfs_bio {
 	/* Whether the bio is coming from copy_remapped_data_io(). */
 	bool is_remap:1;
 
-	/* Whether the csum generation for data write is async. */
-	bool async_csum:1;
-
 	/* Whether the bio is written using zone append. */
 	bool can_use_append:1;
 
fs/btrfs/file-item.c +2 -4
index 4a7681557ec1..0fed4e0d32d5 100644
@@ -818,9 +818,8 @@ static void csum_one_bio_work(struct work_struct *work)
 	struct btrfs_bio *bbio = container_of(work, struct btrfs_bio, csum_work);
 
 	ASSERT(btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE);
-	ASSERT(bbio->async_csum == true);
 	csum_one_bio(bbio);
-	complete(&bbio->csum_done);
+	bio_endio(&bbio->bio);
 }
 
 /*
@@ -854,8 +853,7 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async)
 		csum_one_bio(bbio);
 		return 0;
 	}
-	init_completion(&bbio->csum_done);
-	bbio->async_csum = true;
+	bio_inc_remaining(bio);
 	INIT_WORK(&bbio->csum_work, csum_one_bio_work);
 	schedule_work(&bbio->csum_work);
 	return 0;
Signature · 1 line
2.53.0
#4 lore raw

Re: [PATCH v2 2/3] btrfs: use bio::remaining for async checksumming synchronization

Quoted 84 lines · Daniel Vacek

We can use bio::remaining counter to sync the offloaded checksuming. As a result we can slim down the btrfs_bio structure by 24 bytes and simplify the code a bit.

$ pahole | diff
(quoted diff) +1 -1
-	/* size: 328, cachelines: 6, members: 15 */
+	/* size: 304, cachelines: 5, members: 14 */

Moreover this will allow us enabling async checksumming with encryption where we need to checksum the bounce bio instead of our regular one embedded in btrfs_bio. And so we need to extend it's lifetime. This is the preffered way to do so.

---

No change since v1

---
  fs/btrfs/bio.c       | 4 ----
  fs/btrfs/bio.h       | 4 ----
  fs/btrfs/file-item.c | 6 ++----
  3 files changed, 2 insertions(+), 12 deletions(-)
fs/btrfs/bio.c +0 -4
index 19b4855969f5..771b7d598aee 100644
@@ -103,7 +103,6 @@ static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info,
  	bbio->can_use_append = orig_bbio->can_use_append;
  	bbio->is_scrub = orig_bbio->is_scrub;
  	bbio->is_remap = orig_bbio->is_remap;
-	bbio->async_csum = orig_bbio->async_csum;
 
  	atomic_inc(&orig_bbio->pending_ios);
  	return bbio;
@@ -114,9 +113,6 @@ void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
  	/* Make sure we're already in task context. */
  	ASSERT(in_task());
 
-	if (bbio->async_csum)
-		wait_for_completion(&bbio->csum_done);
-
  	bbio->bio.bi_status = status;
  	if (bbio->bio.bi_pool == &btrfs_clone_bioset) {
  		struct btrfs_bio *orig_bbio = bbio->private;
fs/btrfs/bio.h +0 -4
index b7bd377a0162..bbf362b8668b 100644
@@ -58,7 +58,6 @@ struct btrfs_bio {
  			struct btrfs_ordered_extent *ordered;
  			struct btrfs_ordered_sum *sums;
  			struct work_struct csum_work;
-			struct completion csum_done;
  			struct bvec_iter csum_saved_iter;
  			u64 orig_physical;
  			u64 orig_logical;
@@ -93,9 +92,6 @@ struct btrfs_bio {
  	/* Whether the bio is coming from copy_remapped_data_io(). */
  	bool is_remap:1;
 
-	/* Whether the csum generation for data write is async. */
-	bool async_csum:1;
-
  	/* Whether the bio is written using zone append. */
  	bool can_use_append:1;
 
fs/btrfs/file-item.c +1 -2
index 4a7681557ec1..0fed4e0d32d5 100644
@@ -818,9 +818,8 @@ static void csum_one_bio_work(struct work_struct *work)
  	struct btrfs_bio *bbio = container_of(work, struct btrfs_bio, csum_work);
 
  	ASSERT(btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE);
-	ASSERT(bbio->async_csum == true);
  	csum_one_bio(bbio);
-	complete(&bbio->csum_done);
+	bio_endio(&bbio->bio);
  }
 
  /*

fs/btrfs/file-item.c int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async) · line 856

Quoted 6 lines
fs/btrfs/file-item.c +1 -2
@@ -854,8 +853,7 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async)
  		csum_one_bio(bbio);
  		return 0;
  	}
-	init_completion(&bbio->csum_done);
-	bbio->async_csum = true;
+	bio_inc_remaining(bio);

There seems to be a window where the bio can be finished before submission.

Firstly at btrfs_csum_one_bio() time, bio->bi_endio is not yet initialized, it's only properly assigned at btrfs_submit_bio().

Then we queue the csum generation work.

But by some bad timing, the bio submission is delayed, we can have the following sequence:

Submission | Csum generation
---------------------------------+------------------------------------

btrfs_submit_chunk()             |
|- btrfs_csum_one_bio()          |
|  |- bio_inc_remaining()        |
|  |- schedule_work()            | csum_one_bio_work()
|                                | |- bio_endio()
|                                | Now the bio is finished, although
|                                | bi_end_io is NULL, nothing real
|                                | happened.

|- btrfs_submit_bio()

This can be even worse, if the bio_endio() is called when btrfs_submit_bio() has only partially setup the bio (e.g. bi_end_io() is set, but bi_bdev is not set)

Not mention now it changed the context where the endio function is called.

Previously csum_one_bio_work() will never call bi_end_io() function, but now it can.

The change has a much larger impact than I initially thought.

Quoted 3 lines
fs/btrfs/file-item.c +0 -0
  	INIT_WORK(&bbio->csum_work, csum_one_bio_work);
  	schedule_work(&bbio->csum_work);
  	return 0;
#5 lore raw

Re: [PATCH v2 2/3] btrfs: use bio::remaining for async checksumming synchronization

Quoted 103 lines · Qu Wenruo
Quoted 81 lines · Daniel Vacek

We can use bio::remaining counter to sync the offloaded checksuming. As a result we can slim down the btrfs_bio structure by 24 bytes and simplify the code a bit.

$ pahole | diff
-    /* size: 328, cachelines: 6, members: 15 */
+    /* size: 304, cachelines: 5, members: 14 */

Moreover this will allow us enabling async checksumming with encryption where we need to checksum the bounce bio instead of our regular one embedded in btrfs_bio. And so we need to extend it's lifetime. This is the preffered way to do so.

---

No change since v1
---
  fs/btrfs/bio.c       | 4 ----
  fs/btrfs/bio.h       | 4 ----
  fs/btrfs/file-item.c | 6 ++----

  3 files changed, 2 insertions(+), 12 deletions(-)
fs/btrfs/bio.c +0 -4
index 19b4855969f5..771b7d598aee 100644
@@ -103,7 +103,6 @@ static struct btrfs_bio *btrfs_split_bio(struct 
 btrfs_fs_info *fs_info,
       bbio->can_use_append = orig_bbio->can_use_append;
       bbio->is_scrub = orig_bbio->is_scrub;
       bbio->is_remap = orig_bbio->is_remap;
-    bbio->async_csum = orig_bbio->async_csum;
       atomic_inc(&orig_bbio->pending_ios);
       return bbio;
@@ -114,9 +113,6 @@ void btrfs_bio_end_io(struct btrfs_bio *bbio, 
 blk_status_t status)
       /* Make sure we're already in task context. */
       ASSERT(in_task());
-    if (bbio->async_csum)
-        wait_for_completion(&bbio->csum_done);
-
       bbio->bio.bi_status = status;
       if (bbio->bio.bi_pool == &btrfs_clone_bioset) {
           struct btrfs_bio *orig_bbio = bbio->private;
fs/btrfs/bio.h +0 -4
index b7bd377a0162..bbf362b8668b 100644
@@ -58,7 +58,6 @@ struct btrfs_bio {
               struct btrfs_ordered_extent *ordered;
               struct btrfs_ordered_sum *sums;
               struct work_struct csum_work;
-            struct completion csum_done;
               struct bvec_iter csum_saved_iter;
               u64 orig_physical;
               u64 orig_logical;
@@ -93,9 +92,6 @@ struct btrfs_bio {
       /* Whether the bio is coming from copy_remapped_data_io(). */
       bool is_remap:1;
-    /* Whether the csum generation for data write is async. */
-    bool async_csum:1;
-
       /* Whether the bio is written using zone append. */
       bool can_use_append:1;
fs/btrfs/file-item.c +1 -2
index 4a7681557ec1..0fed4e0d32d5 100644
@@ -818,9 +818,8 @@ static void csum_one_bio_work(struct work_struct 
 *work)
       struct btrfs_bio *bbio = container_of(work, struct btrfs_bio, csum_work);
       ASSERT(btrfs_op(&bbio->bio) == BTRFS_MAP_WRITE);
-    ASSERT(bbio->async_csum == true);
       csum_one_bio(bbio);
-    complete(&bbio->csum_done);
+    bio_endio(&bbio->bio);
   }
   /*

fs/btrfs/file-item.c int btrfs_csum_one_bio(struct btrfs_bio *bbio, · line 857

Quoted 7 lines
fs/btrfs/file-item.c +1 -2
@@ -854,8 +853,7 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, 
 bool async)
           csum_one_bio(bbio);
           return 0;
       }
-    init_completion(&bbio->csum_done);
-    bbio->async_csum = true;
+    bio_inc_remaining(bio);

There seems to be a window where the bio can be finished before submission.

Firstly at btrfs_csum_one_bio() time, bio->bi_endio is not yet initialized, it's only properly assigned at btrfs_submit_bio().

Then we queue the csum generation work.

But by some bad timing, the bio submission is delayed, we can have the following sequence:

        Submission               |       Csum generation
---------------------------------+------------------------------------
btrfs_submit_chunk()             |

Quoted 7 lines
|- btrfs_csum_one_bio()          |
|  |- bio_inc_remaining()        |
|  |- schedule_work()            | csum_one_bio_work()
|                                | |- bio_endio()
|                                | Now the bio is finished, although
|                                | bi_end_io is NULL, nothing real
|                                | happened.

Damn it, I really need some tea before reviewing patches in the morning.

A bio has bi_remaining initialized to 1, so bio_inc_remaining() will change it to 2.

After bio_inc_remaining(), the next bio_endio() will not call bi_end_io(), but only decrease the bi_remaining back to 1.

So it won't call bi_end_io() in this case.

Please discard the above analysis.

Quoted 14 lines

|- btrfs_submit_bio()

This can be even worse, if the bio_endio() is called when btrfs_submit_bio() has only partially setup the bio (e.g. bi_end_io() is set, but bi_bdev is not set)

Not mention now it changed the context where the endio function is called.

Previously csum_one_bio_work() will never call bi_end_io() function, but now it can.

The change has a much larger impact than I initially thought.

Quoted 3 lines
fs/btrfs/file-item.c +0 -0
       INIT_WORK(&bbio->csum_work, csum_one_bio_work);
       schedule_work(&bbio->csum_work);

      return 0;

#6 lore raw

PATCH v2 3/3 btrfs: promote async checksumming out of EXPERIMENTAL

In reply to Daniel Vacek

There was no issue with this feature since it's introduction in dd57c78aec398 ("btrfs: introduce btrfs_bio::async_csum"). No need for hiding it.

---

v2: Introduced this change.

---
 fs/btrfs/bio.c | 4 ----
 1 file changed, 4 deletions(-)
fs/btrfs/bio.c +0 -4
index 771b7d598aee..db426ee6e587 100644
@@ -569,11 +569,7 @@ static int btrfs_bio_csum(struct btrfs_bio *bbio)
 {
 	if (bbio->bio.bi_opf & REQ_META)
 		return btree_csum_one_bio(bbio);
-#ifdef CONFIG_BTRFS_EXPERIMENTAL
 	return btrfs_csum_one_bio(bbio, true);
-#else
-	return btrfs_csum_one_bio(bbio, false);
-#endif
 }
 
 /*
Signature · 1 line
2.53.0
#7 lore raw

Re: [PATCH v2 3/3] btrfs: promote async checksumming out of EXPERIMENTAL

Quoted 5 lines · Daniel Vacek

There was no issue with this feature since it's introduction in dd57c78aec398 ("btrfs: introduce btrfs_bio::async_csum"). No need for hiding it.

Oh, I was doing this already, and it turns out that we have a lot of things to cleanup:

---
 fs/btrfs/bio.c       | 136 +------------------------------------------
 fs/btrfs/disk-io.c   |  20 +------
 fs/btrfs/file-item.c |   6 +-
 fs/btrfs/file-item.h |   2 +-
 fs/btrfs/fs.h        |  10 ----
 fs/btrfs/super.c     |   1 -
 6 files changed, 4 insertions(+), 171 deletions(-)

The main missing part is the should_async_write() now always return false (you missed that EXPERIMENTAL flag there).

Then it means the whole async submission part is no longer required, resulting the above code removal.

Thanks,
Qu

Quoted 23 lines

---

v2: Introduced this change.

---
  fs/btrfs/bio.c | 4 ----
  1 file changed, 4 deletions(-)
fs/btrfs/bio.c +0 -4
index 771b7d598aee..db426ee6e587 100644
@@ -569,11 +569,7 @@ static int btrfs_bio_csum(struct btrfs_bio *bbio)
  {
  	if (bbio->bio.bi_opf & REQ_META)
  		return btree_csum_one_bio(bbio);
-#ifdef CONFIG_BTRFS_EXPERIMENTAL
  	return btrfs_csum_one_bio(bbio, true);
-#else
-	return btrfs_csum_one_bio(bbio, false);
-#endif
  }
 
  /*
#8 lore raw

Re: [PATCH v2 3/3] btrfs: promote async checksumming out of EXPERIMENTAL

Quoted 19 lines · Qu Wenruo
Quoted 5 lines · Daniel Vacek

There was no issue with this feature since it's introduction in dd57c78aec398 ("btrfs: introduce btrfs_bio::async_csum"). No need for hiding it.

Oh, I was doing this already, and it turns out that we have a lot of things to cleanup:

---
  fs/btrfs/bio.c       | 136 +------------------------------------------
  fs/btrfs/disk-io.c   |  20 +------
  fs/btrfs/file-item.c |   6 +-
  fs/btrfs/file-item.h |   2 +-
  fs/btrfs/fs.h        |  10 ----
  fs/btrfs/super.c     |   1 -
  6 files changed, 4 insertions(+), 171 deletions(-)
Quoted 5 lines

The main missing part is the should_async_write() now always return false (you missed that EXPERIMENTAL flag there).

Then it means the whole async submission part is no longer required, resulting the above code removal.

Ah, ok. Then drop this one.

--nX

Quoted 28 lines

Thanks,
Qu

Quoted 23 lines

---

v2: Introduced this change.

---
  fs/btrfs/bio.c | 4 ----
  1 file changed, 4 deletions(-)
fs/btrfs/bio.c +0 -4
index 771b7d598aee..db426ee6e587 100644
@@ -569,11 +569,7 @@ static int btrfs_bio_csum(struct btrfs_bio *bbio)
  {
      if (bbio->bio.bi_opf & REQ_META)
              return btree_csum_one_bio(bbio);
-#ifdef CONFIG_BTRFS_EXPERIMENTAL
      return btrfs_csum_one_bio(bbio, true);
-#else
-     return btrfs_csum_one_bio(bbio, false);
-#endif
  }
 
  /*