diff options
| author | Yu Kuai <[email protected]> | 2024-06-11 13:22:48 +0000 |
|---|---|---|
| committer | Song Liu <[email protected]> | 2024-06-12 16:32:57 +0000 |
| commit | d249e541887a966df37544f7c4d301cdee0f0e27 (patch) | |
| tree | 1b4e96d964786e967c14eb929b2a54ed983a7b6a /drivers/md/dm-raid.c | |
| parent | md: use new helpers in md_do_sync() (diff) | |
| download | kernel-d249e541887a966df37544f7c4d301cdee0f0e27.tar.gz kernel-d249e541887a966df37544f7c4d301cdee0f0e27.zip | |
md: replace last_sync_action with new enum type
The only difference is that "none" is removed and initial
last_sync_action will be idle.
On the one hand, this value is introduced by commit c4a395514516
("MD: Remember the last sync operation that was performed"), and the
usage described in commit message is not affected. On the other hand,
last_sync_action is not used in mdadm or mdmon, and none of the tests
that I can find.
Signed-off-by: Yu Kuai <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/md/dm-raid.c')
| -rw-r--r-- | drivers/md/dm-raid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index abe88d1e6735..052c00c1eb15 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3542,7 +3542,7 @@ static void raid_status(struct dm_target *ti, status_type_t type, recovery = rs->md.recovery; state = decipher_sync_action(mddev, recovery); progress = rs_get_progress(rs, recovery, state, resync_max_sectors); - resync_mismatches = (mddev->last_sync_action && !strcasecmp(mddev->last_sync_action, "check")) ? + resync_mismatches = mddev->last_sync_action == ACTION_CHECK ? atomic64_read(&mddev->resync_mismatches) : 0; /* HM FIXME: do we want another state char for raid0? It shows 'D'/'A'/'-' now */ |
