diff options
author | Neil Brown <neilb@suse.de> | 2008-05-27 09:18:38 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-27 09:18:38 +1000 |
commit | 4e5528c6f7b66f40617dabb232bc6c016bb86204 (patch) | |
tree | 2350d3462e587c1a28ea19f2aa908bc368cc3d57 /mdadm.h | |
parent | d52690acc48b3dcea1785d038fa12fc3de11d0a1 (diff) | |
download | mdadm-4e5528c6f7b66f40617dabb232bc6c016bb86204.tar.gz mdadm-4e5528c6f7b66f40617dabb232bc6c016bb86204.tar.xz mdadm-4e5528c6f7b66f40617dabb232bc6c016bb86204.zip |
Implement mark_clean for ddf and remove mark_dirty and mark_sync
mark_dirty is just a special case of mark_clean - with sync_pos == 0.
mark_sync is not required. We don't modify the metadata when sync
finishes. Only when the array becomes non-writeable at which point we
use mark_clean to record how far the resync progressed.
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -411,9 +411,16 @@ extern struct superswitch { /* for mdmon */ int (*open_new)(struct supertype *c, struct active_array *a, int inst); + /* This tells the metadata handler that all data up to sync_pos is + * known to be insync, and will stay insync until told otherwise. + * All data beyond sync_pos may not be insync. + * If sync_pos == 0, this marks the array as 'dirty'. + * If sync_pos == ~0, this marks it as fully 'clean'. + * If other numbers cannot be stored, they should be treated as 0. + * mark_clean is always called with a sync_pos of 0 before any + * write to an array with redundancy is allowed. + */ void (*mark_clean)(struct active_array *a, unsigned long long sync_pos); - void (*mark_dirty)(struct active_array *a); - void (*mark_sync)(struct active_array *a, unsigned long long resync); void (*set_disk)(struct active_array *a, int n, int state); void (*sync_metadata)(struct active_array *a); |