diff options
author | NeilBrown <neilb@suse.de> | 2008-10-25 18:20:49 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-10-25 18:20:49 +1100 |
commit | b3d3195538e315b3863235731112eee7398d4340 (patch) | |
tree | 7decf7dd32fe805c1206efc93e54fea1f23af378 /mdadm.c | |
parent | 11cd8b79c0690bf39b40a25352f86a82a838622a (diff) | |
download | mdadm-b3d3195538e315b3863235731112eee7398d4340.tar.gz mdadm-b3d3195538e315b3863235731112eee7398d4340.tar.xz mdadm-b3d3195538e315b3863235731112eee7398d4340.zip |
Allow WRITEMOSTLY to be cleared on --readd using --readwrite.
Previously it was possible to set the WRITEMOSTLY flag when
adding a device to an array, but not to clear the flag when re-adding.
This is now possible with --readwrite.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -360,6 +360,12 @@ int main(int argc, char *argv[]) writemostly = 1; continue; + case O(MANAGE,'w'): + /* clear write-mostly for following devices */ + writemostly = 2; + continue; + + case O(GROW,'z'): case O(CREATE,'z'): /* size */ if (size >= 0) { @@ -745,21 +751,6 @@ int main(int argc, char *argv[]) runstop = -1; continue; - case O(MANAGE,'o'): - if (readonly < 0) { - fprintf(stderr, Name ": Cannot have both readonly and readwrite\n"); - exit(2); - } - readonly = 1; - continue; - case O(MANAGE,'w'): - if (readonly > 0) { - fprintf(stderr, Name ": Cannot have both readwrite and readonly.\n"); - exit(2); - } - readonly = -1; - continue; - case O(MISC,'Q'): case O(MISC,'D'): case O(MISC,'E'): |