diff options
author | Neil Brown <neilb@suse.de> | 2008-07-12 12:27:38 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-12 12:27:38 +0200 |
commit | f7e7067b47d2ca9994f9222dfa5833ac84ce3b22 (patch) | |
tree | 9519e435af3001dd2ccb2ee01d114067213aa615 /super1.c | |
parent | Add some comments to explain some of the bits of superswitch. (diff) | |
download | mdadm-f7e7067b47d2ca9994f9222dfa5833ac84ce3b22.tar.xz mdadm-f7e7067b47d2ca9994f9222dfa5833ac84ce3b22.zip |
Add subarray field to supertype.
When loading the metadata for a subarray (super_by_fd), we set
->subarray to be the name read from md/metadata_version so that
getinfo_super can return info about the correct array.
With this we can differentiate between a container and
an array within the container by looking at ->subarray[0].
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1065,6 +1065,9 @@ static int load_super1(struct supertype *st, int fd, char *devname) free_super1(st); + if (st->subarray[0]) + return 1; + if (st->ss == NULL || st->minor_version == -1) { int bestvers = -1; struct supertype tst; |