mirror-linux/drivers/md
Shida Zhang 3ef825dfd4 bcache: use bio cloning for detached device requests
Previously, bcache hijacked the bi_end_io and bi_private fields of
the incoming bio when the backing device was in a detached state.
This is fragile and breaks if the bio is needed to be processed by
other layers.

This patch transitions to using a cloned bio embedded within a private
structure. This ensures the original bio's metadata remains untouched.

Fixes: 53280e3984 ("bcache: fix improper use of bi_end_io")
Co-developed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
Acked-by: Coly Li <colyli@fnnas.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-22 07:24:50 -07:00
..
bcache bcache: use bio cloning for detached device requests 2026-01-22 07:24:50 -07:00
dm-pcache dm-pcache: zero cache_info before default init 2025-11-18 19:02:08 +01:00
dm-vdo treewide: Remove in_irq() 2025-10-24 21:39:27 +02:00
persistent-data lib/crc: remove CONFIG_LIBCRC32C 2025-04-04 11:31:42 -07:00
Kconfig dm docs: fix typos 2025-10-03 18:48:02 -07:00
Makefile dm docs: fix typos 2025-10-03 18:48:02 -07:00
dm-audit.c
dm-audit.h
dm-bio-prison-v1.c
dm-bio-prison-v1.h
dm-bio-prison-v2.c
dm-bio-prison-v2.h
dm-bio-record.h
dm-bufio.c dm docs: fix typos 2025-10-03 18:48:02 -07:00
dm-builtin.c
dm-cache-background-tracker.c
dm-cache-background-tracker.h
dm-cache-block-types.h
dm-cache-metadata.c
dm-cache-metadata.h
dm-cache-policy-internal.h
dm-cache-policy-smq.c dm: use vmalloc_array() to simplify code 2025-08-19 11:12:50 +02:00
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: support shrinking the origin device 2025-03-06 16:13:47 +01:00
dm-clone-metadata.c
dm-clone-metadata.h
dm-clone-target.c
dm-core.h dm: optimize REQ_PREFLUSH with data when using the linear target 2025-09-18 12:58:02 +02:00
dm-crypt.c for-6.17/block-20250728 2025-07-28 16:43:54 -07:00
dm-delay.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dm-dust.c dm: Allow .prepare_ioctl to handle ioctls directly 2025-05-04 11:35:05 +02:00
dm-ebs-target.c dm: Allow .prepare_ioctl to handle ioctls directly 2025-05-04 11:35:05 +02:00
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c block: add a bio_init_inline helper 2025-09-09 07:31:59 -06:00
dm-ima.c dm-ima: drop a useless argument 2025-08-19 11:12:50 +02:00
dm-ima.h
dm-init.c
dm-integrity.c dm docs: fix typos 2025-10-03 18:48:02 -07:00
dm-io-rewind.c
dm-io-tracker.h
dm-io.c
dm-ioctl.c dm mpath: Interface for explicit probing of active paths 2025-05-04 11:35:06 +02:00
dm-kcopyd.c
dm-linear.c mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c dm: fix "writen"->"written" 2025-09-01 13:35:18 +02:00
dm-log.c
dm-mpath.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dm-mpath.h
dm-path-selector.c dm-mpath: make dm_unregister_path_selector return void 2025-06-30 16:20:04 +02:00
dm-path-selector.h dm-mpath: make dm_unregister_path_selector return void 2025-06-30 16:20:04 +02:00
dm-ps-historical-service-time.c dm-mpath: don't print the "loaded" message if registering fails 2025-06-30 16:20:17 +02:00
dm-ps-io-affinity.c dm-mpath: make dm_unregister_path_selector return void 2025-06-30 16:20:04 +02:00
dm-ps-queue-length.c dm-mpath: don't print the "loaded" message if registering fails 2025-06-30 16:20:17 +02:00
dm-ps-round-robin.c dm-mpath: don't print the "loaded" message if registering fails 2025-06-30 16:20:17 +02:00
dm-ps-service-time.c dm-mpath: don't print the "loaded" message if registering fails 2025-06-30 16:20:17 +02:00
dm-raid.c dm docs: fix typos 2025-10-03 18:48:02 -07:00
dm-raid1.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dm-region-hash.c dm: use vmalloc_array() to simplify code 2025-08-19 11:12:50 +02:00
dm-rq.c dm: use generic functions instead of disable_discard and disable_write_zeroes 2025-05-04 11:35:05 +02:00
dm-rq.h
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c
dm-stats.c
dm-stats.h
dm-stripe.c dm-stripe: fix a possible integer overflow 2025-08-11 13:17:32 +02:00
dm-switch.c dm: use vmalloc_array() to simplify code 2025-08-19 11:12:50 +02:00
dm-sysfs.c
dm-table.c dm-table: fix checking for request-based stackable devices 2025-08-04 08:58:53 -07:00
dm-target.c dm error: mark as DM_TARGET_PASSES_INTEGRITY 2025-08-19 11:12:50 +02:00
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c dm: use vmalloc_array() to simplify code 2025-08-19 11:12:50 +02:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c dm-verity: fix unreliable memory allocation 2025-11-21 12:51:41 +01:00
dm-verity-fec.h
dm-verity-loadpin.c
dm-verity-target.c dm-verity: remove support for asynchronous hashes 2025-07-31 15:39:55 +02:00
dm-verity-verify-sig.c dm-verity: fix a memory leak if some arguments are specified multiple times 2025-06-03 19:01:42 +02:00
dm-verity-verify-sig.h
dm-verity.h dm-verity: remove support for asynchronous hashes 2025-07-31 15:39:55 +02:00
dm-writecache.c mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
dm-zero.c
dm-zone.c dm: fix zone reset all operation processing 2025-11-13 09:10:04 -07:00
dm-zoned-metadata.c
dm-zoned-reclaim.c
dm-zoned-target.c md: dm-zoned-target: Initialize return variable r to avoid uninitialized use 2025-07-31 15:39:55 +02:00
dm-zoned.h
dm.c dm: fix failure when empty flush's bi_sector points beyond the device end 2025-11-20 19:50:42 +01:00
dm.h block: introduce disk_report_zone() 2025-11-05 08:07:21 -07:00
md-autodetect.c
md-bitmap.c md/md-llbitmap: introduce new lockless bitmap 2025-09-06 17:27:51 +08:00
md-bitmap.h md/md-llbitmap: introduce new lockless bitmap 2025-09-06 17:27:51 +08:00
md-cluster.c for-6.18/block-20250929 2025-10-02 10:16:56 -07:00
md-cluster.h md: switch md-cluster to use md_submodle_head 2025-03-05 00:28:39 +08:00
md-linear.c md: allow configuring logical block size 2025-11-11 11:20:15 +08:00
md-llbitmap.c md/md-llbitmap: Remove unneeded semicolon 2025-11-08 16:55:35 +08:00
md.c md: Fix forward incompatibility from configurable logical block size 2025-12-27 10:14:07 +08:00
md.h md: allow configuring logical block size 2025-11-11 11:20:15 +08:00
raid0.c md/raid0: fix NULL pointer dereference in create_strip_zones() for dm-raid 2025-11-30 09:36:50 +08:00
raid0.h
raid1-10.c md/md-bitmap: add md_bitmap_registered/enabled() helper 2025-09-06 17:11:45 +08:00
raid1.c md: allow configuring logical block size 2025-11-11 11:20:15 +08:00
raid1.h md/raid1: convert to use bio_submit_split_bioset() 2025-09-10 05:23:45 -06:00
raid5-cache.c md/raid5: remove redundant __GFP_NOWARN 2025-11-08 17:49:36 +08:00
raid5-log.h
raid5-ppl.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid5.c md/raid5: fix possible null-pointer dereferences in raid5_store_group_thread_cnt() 2025-12-27 09:51:35 +08:00
raid5.h
raid10.c md: allow configuring logical block size 2025-11-11 11:20:15 +08:00
raid10.h md/raid10: add a new r10bio flag R10BIO_Returned 2025-09-10 05:23:45 -06:00