From 6c53d6dfa298cdf3b99a6efdafd6ec2eec9b30f6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Feb 2026 06:51:03 -0800 Subject: [PATCH] drop a 6.18 patch --- ..._logical-to-btrfs_bio-for-encryption.patch | 98 ------------------- ...n-t-zone-append-to-conventional-zone.patch | 29 +++--- queue-6.18/series | 1 - 3 files changed, 11 insertions(+), 117 deletions(-) delete mode 100644 queue-6.18/btrfs-add-orig_logical-to-btrfs_bio-for-encryption.patch diff --git a/queue-6.18/btrfs-add-orig_logical-to-btrfs_bio-for-encryption.patch b/queue-6.18/btrfs-add-orig_logical-to-btrfs_bio-for-encryption.patch deleted file mode 100644 index 412ef01849..0000000000 --- a/queue-6.18/btrfs-add-orig_logical-to-btrfs_bio-for-encryption.patch +++ /dev/null @@ -1,98 +0,0 @@ -From c433e314ab179a0f0506d002f55c50a0e6d076f1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 18 Nov 2025 17:08:40 +0100 -Subject: btrfs: add orig_logical to btrfs_bio for encryption - -From: Josef Bacik - -[ Upstream commit bd45e9e3f6232f76fa9bd0e40c1e3409e4449f5e ] - -When checksumming the encrypted bio on writes we need to know which -logical address this checksum is for. At the point where we get the -encrypted bio the bi_sector is the physical location on the target disk, -so we need to save the original logical offset in the btrfs_bio. Then -we can use this when checksumming the bio instead of the -bio->iter.bi_sector. - -Note: The patch was taken from v5 of fscrypt patchset -(https://lore.kernel.org/linux-btrfs/cover.1706116485.git.josef@toxicpanda.com/) -which was handled over time by various people: Omar Sandoval, Sweet Tea -Dorminy, Josef Bacik. - -Signed-off-by: Josef Bacik -Signed-off-by: Daniel Vacek -Reviewed-by: David Sterba -[ add note ] -Signed-off-by: David Sterba -Stable-dep-of: b39b26e017c7 ("btrfs: zoned: don't zone append to conventional zone") -Signed-off-by: Sasha Levin ---- - fs/btrfs/bio.c | 10 ++++++++++ - fs/btrfs/bio.h | 2 ++ - fs/btrfs/file-item.c | 2 +- - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c -index 1286c1ac19404..c3d860a2bca42 100644 ---- a/fs/btrfs/bio.c -+++ b/fs/btrfs/bio.c -@@ -94,6 +94,8 @@ static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info, - if (bbio_has_ordered_extent(bbio)) { - refcount_inc(&orig_bbio->ordered->refs); - bbio->ordered = orig_bbio->ordered; -+ bbio->orig_logical = orig_bbio->orig_logical; -+ orig_bbio->orig_logical += map_length; - } - bbio->csum_search_commit_root = orig_bbio->csum_search_commit_root; - atomic_inc(&orig_bbio->pending_ios); -@@ -726,6 +728,14 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) - goto end_bbio; - } - -+ /* -+ * For fscrypt writes we will get the encrypted bio after we've remapped -+ * our bio to the physical disk location, so we need to save the -+ * original bytenr so we know what we're checksumming. -+ */ -+ if (bio_op(bio) == REQ_OP_WRITE && is_data_bbio(bbio)) -+ bbio->orig_logical = logical; -+ - map_length = min(map_length, length); - if (use_append) - map_length = btrfs_append_map_length(bbio, map_length); -diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h -index 9a44b86d561b1..488cdbdd9e2f8 100644 ---- a/fs/btrfs/bio.h -+++ b/fs/btrfs/bio.h -@@ -59,6 +59,7 @@ struct btrfs_bio { - * - pointer to the checksums for this bio - * - original physical address from the allocator - * (for zone append only) -+ * - original logical address, used for checksumming fscrypt bios - */ - struct { - struct btrfs_ordered_extent *ordered; -@@ -67,6 +68,7 @@ struct btrfs_bio { - struct completion csum_done; - struct bvec_iter csum_saved_iter; - u64 orig_physical; -+ u64 orig_logical; - }; - - /* For metadata reads: parentness verification. */ -diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c -index 4b7c40f05e8f9..48f444bde5fa9 100644 ---- a/fs/btrfs/file-item.c -+++ b/fs/btrfs/file-item.c -@@ -815,7 +815,7 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async) - if (!sums) - return -ENOMEM; - -- sums->logical = bio->bi_iter.bi_sector << SECTOR_SHIFT; -+ sums->logical = bbio->orig_logical; - sums->len = bio->bi_iter.bi_size; - INIT_LIST_HEAD(&sums->list); - bbio->sums = sums; --- -2.51.0 - diff --git a/queue-6.18/btrfs-zoned-don-t-zone-append-to-conventional-zone.patch b/queue-6.18/btrfs-zoned-don-t-zone-append-to-conventional-zone.patch index c106433ffa..4ea268de65 100644 --- a/queue-6.18/btrfs-zoned-don-t-zone-append-to-conventional-zone.patch +++ b/queue-6.18/btrfs-zoned-don-t-zone-append-to-conventional-zone.patch @@ -24,15 +24,13 @@ Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- - fs/btrfs/bio.c | 19 +++++++++---------- - fs/btrfs/bio.h | 3 +++ + fs/btrfs/bio.c | 19 +++++++++---------- + fs/btrfs/bio.h | 3 +++ 2 files changed, 12 insertions(+), 10 deletions(-) -diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c -index c3d860a2bca42..9b71f3fde618b 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c -@@ -441,6 +441,8 @@ static void btrfs_clone_write_end_io(struct bio *bio) +@@ -439,6 +439,8 @@ static void btrfs_clone_write_end_io(str static void btrfs_submit_dev_bio(struct btrfs_device *dev, struct bio *bio) { @@ -41,7 +39,7 @@ index c3d860a2bca42..9b71f3fde618b 100644 if (!dev || !dev->bdev || test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state) || (btrfs_op(bio) == BTRFS_MAP_WRITE && -@@ -455,12 +457,13 @@ static void btrfs_submit_dev_bio(struct btrfs_device *dev, struct bio *bio) +@@ -453,12 +455,13 @@ static void btrfs_submit_dev_bio(struct * For zone append writing, bi_sector must point the beginning of the * zone */ @@ -57,7 +55,7 @@ index c3d860a2bca42..9b71f3fde618b 100644 } btrfs_debug(dev->fs_info, "%s: rw %d 0x%x, sector=%llu, dev=%lu (%s id %llu), size=%u", -@@ -708,7 +711,6 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) +@@ -706,7 +709,6 @@ static bool btrfs_submit_chunk(struct bt u64 logical = bio->bi_iter.bi_sector << SECTOR_SHIFT; u64 length = bio->bi_iter.bi_size; u64 map_length = length; @@ -65,9 +63,9 @@ index c3d860a2bca42..9b71f3fde618b 100644 struct btrfs_io_context *bioc = NULL; struct btrfs_io_stripe smap; blk_status_t status; -@@ -736,8 +738,10 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) - if (bio_op(bio) == REQ_OP_WRITE && is_data_bbio(bbio)) - bbio->orig_logical = logical; +@@ -726,8 +728,10 @@ static bool btrfs_submit_chunk(struct bt + goto end_bbio; + } + bbio->can_use_append = btrfs_use_zone_append(bbio); + @@ -77,7 +75,7 @@ index c3d860a2bca42..9b71f3fde618b 100644 map_length = btrfs_append_map_length(bbio, map_length); if (map_length < length) { -@@ -766,11 +770,6 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) +@@ -756,11 +760,6 @@ static bool btrfs_submit_chunk(struct bt } if (btrfs_op(bio) == BTRFS_MAP_WRITE) { @@ -89,7 +87,7 @@ index c3d860a2bca42..9b71f3fde618b 100644 if (is_data_bbio(bbio) && bioc && bioc->use_rst) { /* * No locking for the list update, as we only add to -@@ -797,7 +796,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) +@@ -787,7 +786,7 @@ static bool btrfs_submit_chunk(struct bt status = errno_to_blk_status(ret); if (status) goto fail; @@ -98,11 +96,9 @@ index c3d860a2bca42..9b71f3fde618b 100644 (btrfs_is_zoned(fs_info) && inode && inode->flags & BTRFS_INODE_NODATASUM)) { ret = btrfs_alloc_dummy_sum(bbio); -diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h -index 488cdbdd9e2f8..126bc68c87605 100644 --- a/fs/btrfs/bio.h +++ b/fs/btrfs/bio.h -@@ -99,6 +99,9 @@ struct btrfs_bio { +@@ -97,6 +97,9 @@ struct btrfs_bio { /* Whether the csum generation for data write is async. */ bool async_csum; @@ -112,6 +108,3 @@ index 488cdbdd9e2f8..126bc68c87605 100644 /* * This member must come last, bio_alloc_bioset will allocate enough * bytes for entire btrfs_bio but relies on bio being last. --- -2.51.0 - diff --git a/queue-6.18/series b/queue-6.18/series index 4e8ef61ced..ed0b599726 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -23,7 +23,6 @@ btrfs-headers-cleanup-to-remove-unnecessary-local-in.patch btrfs-remove-btrfs_bio-fs_info-by-extracting-it-from.patch btrfs-make-sure-all-btrfs_bio-end_io-are-called-in-t.patch btrfs-introduce-btrfs_bio-async_csum.patch -btrfs-add-orig_logical-to-btrfs_bio-for-encryption.patch btrfs-zoned-don-t-zone-append-to-conventional-zone.patch btrfs-qgroup-return-correct-error-when-deleting-qgro.patch btrfs-fix-block_group_tree-dirty_list-corruption.patch -- 2.47.3