diff options
author | NeilBrown <neilb@suse.de> | 2011-12-23 04:10:41 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-12-23 04:10:41 +0100 |
commit | c0c1acd691e3809647f464f88e57405a01e12b30 (patch) | |
tree | dca7eaf66aa8781b799a4294bd0103c9d260325b /super0.c | |
parent | super1: use awrite when writing a new bitmap. (diff) | |
download | mdadm-c0c1acd691e3809647f464f88e57405a01e12b30.tar.xz mdadm-c0c1acd691e3809647f464f88e57405a01e12b30.zip |
Grow/bitmap: support adding bitmap via sysfs.
Adding a bitmap via ioctl can only add it at a fixed location.
That location is not suitable for 4K-block devices.
So allow setting the bitmap location via sysfs if kernel supports it
and aim to always use 4K alignments.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r-- | super0.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -360,6 +360,9 @@ static void getinfo_super0(struct supertype *st, struct mdinfo *info, char *map) info->array.state = sb->state; info->component_size = sb->size*2; + if (sb->state & (1<<MD_SB_BITMAP_PRESENT)) + info->bitmap_offset = 8; + info->disk.state = sb->this_disk.state; info->disk.major = sb->this_disk.major; info->disk.minor = sb->this_disk.minor; |