diff options
author | NeilBrown <neilb@suse.de> | 2009-11-17 13:15:34 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-11-17 13:15:34 +1100 |
commit | b42f577a0dbe0b232600478f4a5068b2f63a2684 (patch) | |
tree | fca53e53e4a4df5ea6999c887eee026b22240b58 /super0.c | |
parent | b8ab2a50aba72c7316d92d0fb414167844673136 (diff) | |
download | mdadm-b42f577a0dbe0b232600478f4a5068b2f63a2684.tar.gz |
Improve error messages when metadata handler does not support request.
->validate_geometry is called to validate overall parameters,
and to validate each individual device.
If it ever fails, it needs to report the reason, as common code
cannot possible know.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r-- | super0.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1079,12 +1079,22 @@ static int validate_geometry0(struct supertype *st, int level, unsigned long long ldsize; int fd; - if (level == LEVEL_CONTAINER) + if (level == LEVEL_CONTAINER) { + if (verbose) + fprintf(stderr, Name ": 0.90 metadata does not support containers\n"); return 0; - if (raiddisks > MD_SB_DISKS) + } + if (raiddisks > MD_SB_DISKS) { + if (verbose) + fprintf(stderr, Name ": 0.90 metadata supports at most %d devices per array\n", + MD_SB_DISKS); return 0; - if (size > (0x7fffffffULL<<9)) + } + if (size > (0x7fffffffULL<<9)) { + if (verbose) + fprintf(stderr, Name ": 0.90 metadata supports at most 2 terrabytes per device\n"); return 0; + } if (!subdev) return 1; |