acrn-kernel/drivers/md
Alex Lyakas fd9a2c7003 md: Whenassemble the array, consult the superblock of the freshest device
[ Upstream commit dc1cc22ed58f11d58d8553c5ec5f11cbfc3e3039 ]

Upon assembling the array, both kernel and mdadm allow the devices to have event
counter difference of 1, and still consider them as up-to-date.
However, a device whose event count is behind by 1, may in fact not be up-to-date,
and array resync with such a device may cause data corruption.
To avoid this, consult the superblock of the freshest device about the status
of a device, whose event counter is behind by 1.

Signed-off-by: Alex Lyakas <alex.lyakas@zadara.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/1702470271-16073-1-git-send-email-alex.lyakas@zadara.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:12:53 +00:00
..
bcache bcache: avoid NULL checking to c->root in run_cache_set() 2023-12-20 17:00:22 +01:00
persistent-data dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2024-01-01 12:39:05 +00:00
Kconfig dm audit: fix Kconfig so DM_AUDIT depends on BLK_DEV_DM 2024-01-20 11:50:08 +01:00
Makefile
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 thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2024-01-01 12:39:05 +00: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 smq: ensure IO doesn't prevent cleaner policy progress 2023-08-03 10:24:17 +02:00
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 a race condition in retrieve_deps 2023-10-06 14:56:32 +02:00
dm-crypt.c
dm-delay.c dm-delay: fix a race between delay_presuspend and delay_bio 2023-12-03 07:32:11 +01:00
dm-dust.c
dm-ebs-target.c
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-ima.c
dm-ima.h
dm-init.c dm init: add dm-mod.waitfor to wait for asynchronously probed block devices 2023-07-23 13:49:38 +02:00
dm-integrity.c dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata() 2024-01-01 12:39:07 +00:00
dm-io-rewind.c
dm-io-tracker.h
dm-io.c
dm-ioctl.c dm: fix a race condition in retrieve_deps 2023-10-06 14:56:32 +02:00
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-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 dm raid: protect md_stop() with 'reconfig_mutex' 2023-08-03 10:24:05 +02:00
dm-raid1.c
dm-region-hash.c
dm-rq.c
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 a race condition in retrieve_deps 2023-10-06 14:56:32 +02:00
dm-target.c
dm-thin-metadata.c dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2024-01-01 12:39:05 +00:00
dm-thin-metadata.h
dm-thin.c
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c dm-verity: align struct dm_verity_fec_io properly 2023-12-08 08:51:14 +01:00
dm-verity-fec.h
dm-verity-loadpin.c dm: verity-loadpin: Add NULL pointer check for 'bdev' parameter 2023-07-23 13:49:43 +02:00
dm-verity-target.c dm verity: don't perform FEC for failed readahead IO 2023-12-08 08:51:14 +01:00
dm-verity-verify-sig.c
dm-verity-verify-sig.h
dm-verity.h dm-verity: align struct dm_verity_fec_io properly 2023-12-08 08:51:14 +01:00
dm-writecache.c
dm-zero.c
dm-zone.c
dm-zoned-metadata.c
dm-zoned-reclaim.c
dm-zoned-target.c dm zoned: free dmz->ddev array in dmz_put_zoned_devices 2023-10-10 22:00:44 +02:00
dm-zoned.h
dm.c dm: don't attempt to queue IO under RCU protection 2023-09-23 11:11:10 +02:00
dm.h
md-autodetect.c
md-bitmap.c md/md-bitmap: hold 'reconfig_mutex' in backlog_store() 2023-09-13 09:42:41 +02:00
md-bitmap.h
md-cluster.c
md-cluster.h
md-faulty.c
md-linear.c md: add error_handlers for raid0 and linear 2023-09-13 09:42:44 +02:00
md-linear.h
md-multipath.c
md-multipath.h
md.c md: Whenassemble the array, consult the superblock of the freshest device 2024-02-05 20:12:53 +00:00
md.h md: add error_handlers for raid0 and linear 2023-09-13 09:42:44 +02:00
raid0.c md: raid0: account for split bio in iostat accounting 2023-09-13 09:42:44 +02:00
raid0.h
raid1-10.c
raid1.c md/raid1: Use blk_opf_t for read and write operations 2024-01-25 15:27:43 -08:00
raid1.h
raid5-cache.c md/raid5-cache: fix null-ptr-deref for r5l_flush_stripe_to_raid() 2023-09-13 09:42:44 +02:00
raid5-log.h
raid5-ppl.c
raid5.c Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"" 2024-01-25 15:27:52 -08:00
raid5.h
raid10.c md/raid10: use dereference_rdev_and_rrdev() to get devices 2023-09-13 09:42:41 +02:00
raid10.h