diff options
author | NeilBrown <neilb@suse.de> | 2009-04-14 02:28:34 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-04-14 02:28:34 -0400 |
commit | acb180b0e335ad88acfed6c8a33e39c05b95dc49 (patch) | |
tree | fa980978bb66b178fd8c2f474194754139c0921d /drivers/md/bitmap.c | |
parent | 6d56e278444bc8323b1bcfcada126b8e4dbba0f4 (diff) |
md: improve usefulness and accuracy of sysfs file md/sync_completed.
The sync_completed file reports how much of a resync (or recovery or
reshape) has been completed.
However due to the possibility of out-of-order completion of writes,
it is not certain to be accurate.
We have an internal value - mddev->curr_resync_completed - which is an
accurate value (though it might not always be quite so uptodate).
So:
- make curr_resync_completed be uptodate a little more often,
particularly when raid5 reshape updates status in the metadata
- report curr_resync_completed in the sysfs file
- allow poll/select to report all updates to md/sync_completed.
This makes sync_completed completed usable by any external metadata
handler that wants to record this status information in its metadata.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index f8a9f7ab2cb8..e4510c976b34 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1479,6 +1479,7 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector) | |||
1479 | s += blocks; | 1479 | s += blocks; |
1480 | } | 1480 | } |
1481 | bitmap->last_end_sync = jiffies; | 1481 | bitmap->last_end_sync = jiffies; |
1482 | sysfs_notify(&bitmap->mddev->kobj, NULL, "sync_completed"); | ||
1482 | } | 1483 | } |
1483 | 1484 | ||
1484 | static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed) | 1485 | static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed) |