diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-12-01 17:30:12 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-12-16 03:24:04 +0100 |
commit | 53e76b1def4d3d6c884e45f1ac723b5f3a1b7376 (patch) | |
tree | 3398e83cfb308681f6cff2eb17cc0d88a6d12912 /bitmap.c | |
parent | mdadm: don't show cluster name once the bitmap is cleared (diff) | |
download | mdadm-53e76b1def4d3d6c884e45f1ac723b5f3a1b7376.tar.xz mdadm-53e76b1def4d3d6c884e45f1ac723b5f3a1b7376.zip |
mdadm: do not display bitmap info if it is cleared
"mdadm -X DISK" is used to report information about a bitmap
file, it is better to not display all the related infos if
bitmap is cleared with "--bitmap=none" under grow mode.
To do that, the locate_bitmap is changed a little to have a
return value based on MD_FEATURE_BITMAP_OFFSET.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'bitmap.c')
-rw-r--r-- | bitmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -221,8 +221,12 @@ int bitmap_file_open(char *filename, struct supertype **stp) pr_err("No bitmap possible with %s metadata\n", st->ss->name); return -1; - } else - st->ss->locate_bitmap(st, fd); + } else { + if (st->ss->locate_bitmap(st, fd)) { + pr_err("%s doesn't have bitmap\n", filename); + fd = -1; + } + } *stp = st; } else { |