WSL2-Linux-Kernel/drivers/md
Mike Snitzer fa8db4948f dm: don't use bio_trim() afterall
bio_trim() has an early return, which makes it _not_ idempotent, if the
offset is 0 and the bio's bi_size already matches the requested size.
Prior to DM, all users of bio_trim() were fine with this.  But DM has
exposed the fact that bio_trim()'s early return is incompatible with a
cloned bio whose integrity payload must be trimmed via
bio_integrity_trim().

Fix this by reverting DM back to doing the equivalent of bio_trim() but
in an idempotent manner (so bio_integrity_trim is always performed).

Follow-on work is needed to assess what benefit bio_trim()'s early
return is providing to its existing callers.

Reported-by: Milan Broz <gmazyland@gmail.com>
Fixes: 57c36519e4 ("dm: fix clone_bio() to trigger blk_recount_segments()")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-02-06 17:24:37 -05:00
..
bcache
persistent-data
Kconfig
Makefile
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 Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08: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-cache-policy.c
dm-cache-policy.h
dm-cache-target.c
dm-core.h dm: don't reuse bio for flushes 2018-12-19 09:13:34 -07:00
dm-crypt.c dm crypt: fix parsing of extended IV arguments 2019-01-10 15:17:33 -05:00
dm-delay.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm flakey: Properly corrupt multi-page bios. 2018-12-18 09:02:27 -05:00
dm-integrity.c Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
dm-io.c
dm-ioctl.c
dm-kcopyd.c dm kcopyd: Fix bug causing workqueue stalls 2018-12-18 09:02:26 -05:00
dm-linear.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c
dm-mpath.c dm mpath: only flush workqueue when needed 2018-12-18 09:02:25 -05:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm raid: fix false -EBUSY when handling check/repair message 2018-12-18 13:48:35 -05:00
dm-raid1.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-region-hash.c
dm-round-robin.c
dm-rq.c dm: add memory barrier before waitqueue_active 2019-02-06 17:24:37 -05:00
dm-rq.h
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c dm snapshot: Fix excessive memory usage and workqueue stalls 2018-12-18 09:02:26 -05:00
dm-stats.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
dm-stats.h
dm-stripe.c
dm-switch.c
dm-sysfs.c
dm-table.c dm: do not allow readahead to limit IO size 2018-12-18 14:23:41 -05:00
dm-target.c
dm-thin-metadata.c dm thin: fix passdown_double_checking_shared_status() 2019-01-15 16:10:41 -05:00
dm-thin-metadata.h dm thin: fix passdown_double_checking_shared_status() 2019-01-15 16:10:41 -05:00
dm-thin.c dm thin: fix passdown_double_checking_shared_status() 2019-01-15 16:10:41 -05:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-verity-fec.c
dm-verity-fec.h
dm-verity-target.c dm verity: log the hash algorithm implementation 2018-12-18 09:02:27 -05:00
dm-verity.h
dm-writecache.c dm writecache: fix typo in error msg for creating writecache_flush_thread 2018-12-18 09:02:26 -05:00
dm-zero.c
dm-zoned-metadata.c
dm-zoned-reclaim.c
dm-zoned-target.c
dm-zoned.h
dm.c dm: don't use bio_trim() afterall 2019-02-06 17:24:37 -05:00
dm.h
md-bitmap.c
md-bitmap.h
md-cluster.c
md-cluster.h
md-faulty.c
md-linear.c
md-linear.h
md-multipath.c
md-multipath.h
md.c md: Make bio_alloc_mddev use bio_alloc_bioset 2019-01-14 06:31:56 -07:00
md.h
raid0.c
raid0.h
raid1-10.c
raid1.c
raid1.h
raid5-cache.c md/raid5: fix 'out of memory' during raid cache recovery 2019-01-28 11:44:40 -08:00
raid5-log.h
raid5-ppl.c
raid5.c md/raid5: fix 'out of memory' during raid cache recovery 2019-01-28 11:44:40 -08:00
raid5.h
raid10.c md: fix raid10 hang issue caused by barrier 2018-12-20 08:53:24 -08:00
raid10.h