summaryrefslogtreecommitdiff
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-12-23 14:10:41 +1100
committerNeilBrown <neilb@suse.de>2011-12-23 14:10:41 +1100
commitc0c1acd691e3809647f464f88e57405a01e12b30 (patch)
treedca7eaf66aa8781b799a4294bd0103c9d260325b /super0.c
parentb6db6fab11aedf2f04831d777e68a557b6d1f450 (diff)
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/super0.c b/super0.c
index f3d0c07c..dab85db8 100644
--- a/super0.c
+++ b/super0.c
@@ -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;