diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2013-06-25 02:23:59 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-06-25 22:38:24 -0400 |
commit | c4a39551451666229b4ea5e8aae8ca0131d00665 (patch) | |
tree | e14b0de074da6e062275795b6530e5661d7c5acf /drivers/md/dm-raid.c | |
parent | eea136d69f9facb2d3807386bbac1e6b1161795f (diff) |
MD: Remember the last sync operation that was performed
MD: Remember the last sync operation that was performed
This patch adds a field to the mddev structure to track the last
sync operation that was performed. This is especially useful when
it comes to what is recorded in mismatch_cnt in sysfs. If the
last operation was "data-check", then it reports the number of
descrepancies found by the user-initiated check. If it was a
"repair" operation, then it is reporting the number of
descrepancies repaired. etc.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 21e8e4660c59..4880b69e2e9e 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
@@ -1388,6 +1388,7 @@ static void raid_status(struct dm_target *ti, status_type_t type, | |||
1388 | * performing a "check" of the array. | 1388 | * performing a "check" of the array. |
1389 | */ | 1389 | */ |
1390 | DMEMIT(" %llu", | 1390 | DMEMIT(" %llu", |
1391 | (strcmp(rs->md.last_sync_action, "check")) ? 0 : | ||
1391 | (unsigned long long) | 1392 | (unsigned long long) |
1392 | atomic64_read(&rs->md.resync_mismatches)); | 1393 | atomic64_read(&rs->md.resync_mismatches)); |
1393 | break; | 1394 | break; |
@@ -1651,7 +1652,7 @@ static void raid_resume(struct dm_target *ti) | |||
1651 | 1652 | ||
1652 | static struct target_type raid_target = { | 1653 | static struct target_type raid_target = { |
1653 | .name = "raid", | 1654 | .name = "raid", |
1654 | .version = {1, 5, 1}, | 1655 | .version = {1, 5, 2}, |
1655 | .module = THIS_MODULE, | 1656 | .module = THIS_MODULE, |
1656 | .ctr = raid_ctr, | 1657 | .ctr = raid_ctr, |
1657 | .dtr = raid_dtr, | 1658 | .dtr = raid_dtr, |