linux-stable/drivers/md
Mikulas Patocka 90736eb323 dm mirror log: clear log bits up to BITS_PER_LONG boundary
Commit 85e123c27d ("dm mirror log: round up region bitmap size to
BITS_PER_LONG") introduced a regression on 64-bit architectures in the
lvm testsuite tests: lvcreate-mirror, mirror-names and vgsplit-operation.

If the device is shrunk, we need to clear log bits beyond the end of the
device. The code clears bits up to a 32-bit boundary and then calculates
lc->sync_count by summing set bits up to a 64-bit boundary (the commit
changed that; previously, this boundary was 32-bit too). So, it was using
some non-zeroed bits in the calculation and this caused misbehavior.

Fix this regression by clearing bits up to BITS_PER_LONG boundary.

Fixes: 85e123c27d ("dm mirror log: round up region bitmap size to BITS_PER_LONG")
Cc: stable@vger.kernel.org
Reported-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
2022-06-23 14:55:43 -04:00
..
bcache
persistent-data
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-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-clone-metadata.c
dm-clone-metadata.h
dm-clone-target.c
dm-core.h dm: fix BLK_STS_DM_REQUEUE handling when dm_io represents split bio 2022-06-23 14:33:13 -04:00
dm-crypt.c
dm-delay.c
dm-dust.c
dm-ebs-target.c
dm-era-target.c dm era: commit metadata in postsuspend after worker stops 2022-06-21 13:35:01 -04:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-ima.c
dm-ima.h
dm-init.c
dm-integrity.c
dm-io-tracker.h
dm-io.c
dm-ioctl.c
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c dm mirror log: clear log bits up to BITS_PER_LONG boundary 2022-06-23 14:55:43 -04:00
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-ps-historical-service-time.c
dm-ps-io-affinity.c
dm-ps-queue-length.c
dm-ps-round-robin.c
dm-ps-service-time.c
dm-raid.c Revert "md: don't unregister sync_thread with reconfig_mutex held" 2022-06-15 10:30:14 -07:00
dm-raid1.c
dm-region-hash.c
dm-rq.c dm: fix bio_set allocation 2022-06-08 14:04:14 -04: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-switch.c
dm-sysfs.c
dm-table.c dm: fix bio_set allocation 2022-06-08 14:04:14 -04:00
dm-target.c
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c
dm-verity-fec.h
dm-verity-target.c
dm-verity-verify-sig.c
dm-verity-verify-sig.h
dm-verity.h
dm-writecache.c
dm-zero.c
dm-zone.c
dm-zoned-metadata.c
dm-zoned-reclaim.c
dm-zoned-target.c
dm-zoned.h
dm.c dm: fix BLK_STS_DM_REQUEUE handling when dm_io represents split bio 2022-06-23 14:33:13 -04:00
dm.h dm: fix bio_set allocation 2022-06-08 14:04:14 -04:00
Kconfig
Makefile
md-autodetect.c
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 Revert "md: don't unregister sync_thread with reconfig_mutex held" 2022-06-15 10:30:14 -07:00
md.h Revert "md: don't unregister sync_thread with reconfig_mutex held" 2022-06-15 10:30:14 -07:00
raid0.c
raid0.h
raid1-10.c
raid1.c
raid1.h
raid5-cache.c
raid5-log.h
raid5-ppl.c md/raid5-ppl: Fix argument order in bio_alloc_bioset() 2022-06-15 10:32:48 -07:00
raid5.c
raid5.h
raid10.c
raid10.h