linux/drivers/md
Li Nan 7202082b7b md: prevent incorrect update of resync/recovery offset
In md_do_sync(), when md_sync_action returns ACTION_FROZEN, subsequent
call to md_sync_position() will return MaxSector. This causes
'curr_resync' (and later 'recovery_offset') to be set to MaxSector too,
which incorrectly signals that recovery/resync has completed, even though
disk data has not actually been updated.

To fix this issue, skip updating any offset values when the sync action
is FROZEN. The same holds true for IDLE.

Fixes: 7d9f107a4e ("md: use new helpers in md_do_sync()")
Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250904073452.3408516-1-linan666@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
2025-09-05 00:31:18 +08:00
..
bcache bcache: switch from pages to folios in read_super() 2025-07-02 18:56:42 -06:00
dm-vdo vdo: omit need_resched() before cond_resched() 2025-07-31 15:39:55 +02:00
persistent-data
Kconfig
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-bufio: fix sched in atomic context 2025-07-10 16:48:50 +02: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-clone-metadata.c
dm-clone-metadata.h
dm-clone-target.c
dm-core.h
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-ebs-target.c
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm-flakey: Fix corrupt_bio_byte setup checks 2025-06-23 12:04:52 +02:00
dm-ima.c dm: ima: avoid extra calls to strlen() 2025-06-27 13:07:17 +02:00
dm-ima.h
dm-init.c
dm-integrity.c block: rename tuple_size field in blk_integrity to metadata_size 2025-07-01 14:00:14 +02:00
dm-io-rewind.c
dm-io-tracker.h
dm-io.c
dm-ioctl.c
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 mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07: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 block-6.17-20250808 2025-08-09 08:47:28 +03: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-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 Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
dm-switch.c
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 mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c dm: set DM_TARGET_PASSES_CRYPTO feature for dm-thin 2025-07-31 16:30:02 +02:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c dm-verity: remove support for asynchronous hashes 2025-07-31 15:39:55 +02: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: Remove unnecessary return in dm_zone_endio() 2025-06-27 12:59:11 +02: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-table: fix checking for request-based stackable devices 2025-08-04 08:58:53 -07:00
dm.h
md-autodetect.c
md-bitmap.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
md-bitmap.h md/md-bitmap: remove parameter slot from bitmap_create() 2025-05-30 15:47:23 +08:00
md-cluster.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
md-cluster.h
md-linear.c
md.c md: prevent incorrect update of resync/recovery offset 2025-09-05 00:31:18 +08:00
md.h md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid0.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid0.h
raid1-10.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid1.c md/raid1: fix data lost for writemostly rdev 2025-09-05 00:30:04 +08:00
raid1.h md/raid1: remove struct pool_info and related code 2025-08-03 13:08:12 +08:00
raid5-cache.c
raid5-log.h
raid5-ppl.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid5.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid5.h
raid10.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid10.h