summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-08-19 14:54:55 +1000
committerNeilBrown <neilb@suse.de>2008-08-19 14:54:55 +1000
commit01f157d74ab29d3acf46800ffdaac3a0d0345b51 (patch)
tree57520e26c75ab39ba8689ee476fbd5ed65690161 /mdadm.h
parent9296754385aa1fecb45097ba06fc82cbc0e5f14a (diff)
downloadmdadm-01f157d74ab29d3acf46800ffdaac3a0d0345b51.tar.gz
mdadm-01f157d74ab29d3acf46800ffdaac3a0d0345b51.tar.xz
mdadm-01f157d74ab29d3acf46800ffdaac3a0d0345b51.zip
Extra option for set_array_state: you choose dirty or clean.
When we first start an array, it might be good to start recovery straight away. That requires setting the array to 'dirty', but only the metadata handler can know if that is required or not. So have a third possible 'consistent' option to set_array_state. Either 'no' or 'yes' or 'you choose'. Return value indicates what was chosen. '1' (no) should be chosen unless there is a good reason. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdadm.h b/mdadm.h
index 80a6f92..3e47fea 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -526,12 +526,16 @@ extern struct superswitch {
/* Tell the metadata handler the current state of the array.
* This covers whether it is known to be consistent (no pending writes)
- * when how far along a resync is known to have progressed
+ * and how far along a resync is known to have progressed
* (in a->resync_start).
* resync status is really irrelevant if the array is not consistent,
* but some metadata (DDF!) have a place to record the distinction.
+ * If 'consistent' is '2', then the array can mark it dirty if a
+ * resync/recovery/whatever is required, or leave it clean if not.
+ * Return value is 0 dirty (not consistent) and 1 if clean.
+ * it is only really important if consistent is passed in as '2'.
*/
- void (*set_array_state)(struct active_array *a, int consistent);
+ int (*set_array_state)(struct active_array *a, int consistent);
/* When the state of a device might have changed, we call set_disk to
* tell the metadata what the current state is.