diff options
author | NeilBrown <neilb@suse.de> | 2008-08-19 17:55:15 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-08-19 17:55:15 +1000 |
commit | e9dd159873cfa0da1ec3e4f173c24f330ea526f8 (patch) | |
tree | f95abf6b0736b9f7a0bd3743d037bc8f3f7b793d /mdadm.h | |
parent | 3c558363a1991430e8a9e10c93ee9ee3f8996940 (diff) | |
download | mdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.tar.gz mdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.tar.xz mdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.zip |
Allow an externally managed array to be marked readonly
If the metadata_version is
-mdXXX/whatever
rather than
/mdXXX/whatever
then the array is readonly and should be left alone by mdmon.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -807,7 +807,14 @@ static inline int ROUND_UP(int a, int base) static inline int is_subarray(char *vers) { - return (*vers == '/'); + /* The version string for a 'subarray' (an array in a container) + * is + * /containername/componentname for normal read-write arrays + * -containername/componentname for read-only arrays. + * containername is e.g. md0, md_d1 + * componentname is dependant on the metadata. e.g. '1' 'S1' ... + */ + return (*vers == '/' || *vers == '-'); } #define LEVEL_MULTIPATH (-4) |