summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 1eb88aa..1342412 100644
--- a/super1.c
+++ b/super1.c
@@ -795,6 +795,9 @@ static void add_to_super1(struct supertype *st, mdu_disk_info_t *dk)
*rp = 0xffff;
else
*rp = 0xfffe;
+ if (dk->number >= __le32_to_cpu(sb->max_dev) &&
+ __le32_to_cpu(sb->max_dev) < 384)
+ sb->max_dev = __cpu_to_le32(dk->number+1);
}
static void locate_bitmap1(struct supertype *st, int fd);