diff options
author | Neil Brown <neilb@suse.de> | 2008-06-26 01:33:37 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-06-26 01:33:37 +0200 |
commit | e8eb8763b4ed35dc9e51ab450372132f95372dd3 (patch) | |
tree | 695798f757f09d8b9f8ada43123a280bb8ef379f | |
parent | Improve error message when mdadm fails to stop an array. (diff) | |
download | mdadm-e8eb8763b4ed35dc9e51ab450372132f95372dd3.tar.xz mdadm-e8eb8763b4ed35dc9e51ab450372132f95372dd3.zip |
Add "bitmap=" to "--detail --brief" output when relevant.
Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net> for the suggestion.
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | Detail.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -147,6 +147,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) } if (brief) { + mdu_bitmap_file_t bmf; printf("ARRAY %s level=%s num-devices=%d", dev, c?c:"-unknown-", array.raid_disks ); @@ -155,6 +156,13 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) else printf(" metadata=%02d.%02d", array.major_version, array.minor_version); + + /* Only try GET_BITMAP_FILE for 0.90.01 and later */ + if (vers >= 9001 && + ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && + bmf.pathname[0]) { + printf(" bitmap=%s", bmf.pathname); + } } else { mdu_bitmap_file_t bmf; unsigned long long larray_size; |