2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/md
Zheng Qixing b7ee30f0ef md: fix sync_action incorrect display during resync
During raid resync, if a disk becomes faulty, the operation is
briefly interrupted. The MD_RECOVERY_RECOVER flag triggered by
the disk failure causes sync_action to incorrectly show "recover"
instead of "resync". The same issue affects reshape operations.

Reproduction steps:
  mdadm -Cv /dev/md1 -l1 -n4 -e1.2 /dev/sd{a..d} // -> resync happened
  mdadm -f /dev/md1 /dev/sda                     // -> resync interrupted
  cat sync_action
  -> recover

Add progress checks in md_sync_action() for resync/recover/reshape
to ensure the interface correctly reports the actual operation type.

Fixes: 4b10a3bc67 ("md: ensure resync is prioritized over recovery")
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250816002534.1754356-3-zhengqixing@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
2025-08-16 08:52:33 +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 lib/crc: remove CONFIG_LIBCRC32C 2025-04-04 11:31:42 -07:00
dm-audit.c
dm-audit.h
dm-bio-prison-v1.c dm cache: Remove unused functions in bio-prison-v1 2024-11-20 11:38:04 +01:00
dm-bio-prison-v1.h dm cache: Remove unused functions in bio-prison-v1 2024-11-20 11:38:04 +01:00
dm-bio-prison-v2.c dm: use bio_list_merge_init 2024-04-01 11:53:37 -06:00
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: Remove unused btracker_nr_writebacks_queued 2024-11-20 11:38:04 +01:00
dm-cache-background-tracker.h dm cache: Remove unused btracker_nr_writebacks_queued 2024-11-20 11:38:04 +01:00
dm-cache-block-types.h
dm-cache-metadata.c dm cache: Remove unused dm_cache_size 2024-11-20 11:38:04 +01:00
dm-cache-metadata.h dm cache: Remove unused dm_cache_size 2024-11-20 11:38:04 +01:00
dm-cache-policy-internal.h
dm-cache-policy-smq.c dm: update relevant MODULE_AUTHOR entries to latest dm-devel mailing list 2024-02-20 14:22:55 -05: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: Make use of __assign_bit() API 2024-09-02 16:53:53 +02:00
dm-clone-metadata.h
dm-clone-target.c block: add a bdev_limits helper 2024-10-29 09:15:00 -06:00
dm-core.h dm: use generic functions instead of disable_discard and disable_write_zeroes 2025-05-04 11:35:05 +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: Constify struct dm_block_validator 2024-07-19 12:08:15 +02:00
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 init: Handle minors larger than 255 2024-07-02 20:53:41 +02:00
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-io: Warn on creating multiple atomic write bios for a region 2025-01-17 22:24:09 +01:00
dm-ioctl.c dm mpath: Interface for explicit probing of active paths 2025-05-04 11:35:06 +02:00
dm-kcopyd.c dm io: Support IO priority 2024-02-20 14:22:51 -05:00
dm-linear.c mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
dm-log-userspace-base.c dm: update relevant MODULE_AUTHOR entries to latest dm-devel mailing list 2024-02-20 14:22:55 -05:00
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: update relevant MODULE_AUTHOR entries to latest dm-devel mailing list 2024-02-20 14:22:55 -05:00
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-raid1.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dm-raid.c block-6.17-20250808 2025-08-09 08:47:28 +03:00
dm-region-hash.c dm: update relevant MODULE_AUTHOR entries to latest dm-devel mailing list 2024-02-20 14:22:55 -05: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 io: Support IO priority 2024-02-20 14:22:51 -05:00
dm-snap-transient.c
dm-snap.c dm: always manage discard support in terms of max_hw_discard_sectors 2024-05-20 15:51:19 -04:00
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: Allow .prepare_ioctl to handle ioctls directly 2025-05-04 11:35:05 +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 mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
dm-thin-metadata.c dm: Constify struct dm_block_validator 2024-07-19 12:08:15 +02:00
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-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow 2024-11-04 17:34:56 +01:00
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: always "map" the data blocks 2024-07-03 21:41:11 +02:00
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: always manage discard support in terms of max_hw_discard_sectors 2024-05-20 15:51:19 -04:00
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: Remove unused functions 2024-11-20 11:38:04 +01:00
dm-zoned-reclaim.c dm: Fix dm-zoned-reclaim zone write pointer alignment 2024-12-10 09:15:33 -07:00
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: zoned: Remove unused functions 2024-11-20 11:38:04 +01:00
dm.c dm-table: fix checking for request-based stackable devices 2025-08-04 08:58:53 -07:00
dm.h dm: limit swapping tables for devices with zone write plugs 2025-05-04 11:35:05 +02:00
Kconfig CRC cleanups for 6.15 2025-04-08 12:09:28 -07:00
Makefile md: reintroduce md-linear 2025-01-13 07:36:29 -08:00
md-autodetect.c md: reintroduce md-linear 2025-01-13 07:36:29 -08:00
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: switch md-cluster to use md_submodle_head 2025-03-05 00:28:39 +08:00
md-linear.c md: switch personalities to use md_submodule_head 2025-03-05 00:27:20 +08:00
md.c md: fix sync_action incorrect display during resync 2025-08-16 08:52:33 +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: remove struct pool_info and related code 2025-08-03 13:08:12 +08:00
raid1.h md/raid1: remove struct pool_info and related code 2025-08-03 13:08:12 +08:00
raid5-cache.c lib/crc32: standardize on crc32c() name for Castagnoli CRC32 2025-02-08 20:06:30 -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: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid5.h md/md-bitmap: move bitmap_{start, end}write to md upper layer 2025-01-13 08:56:11 -08:00
raid10.c md: rename recovery_cp to resync_offset 2025-07-31 01:26:04 +08:00
raid10.h md/md-bitmap: remove the last parameter for bimtap_ops->endwrite() 2025-01-13 08:56:10 -08:00