Skip to contentSkip to conversation

md: don't impose the MD_SB_DISKS limit on arrays without metadata.

PATCH Applied NeilBrown 2 participants 2 messages Feb 28, 2017 MD RAID

lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 md: don't impose the MD_SB_DISKS limit on arrays without metadata.

These arrays, created with "mdadm --build" don't benefit from a limit. The default will be used, which is '0' and is interpreted as "don't impose a limit".

---
 drivers/md/md.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/md.c +1 -2
index ba485dcf1064..e0ac7f5a8e68 100644
@@ -6464,9 +6464,8 @@ static int set_array_info(struct mddev *mddev, mdu_array_info_t *info)
 	mddev->layout        = info->layout;
 	mddev->chunk_sectors = info->chunk_size >> 9;
 
-	mddev->max_disks     = MD_SB_DISKS;
-
 	if (mddev->persistent) {
+		mddev->max_disks     = MD_SB_DISKS;
 		mddev->flags         = 0;
 		mddev->sb_flags         = 0;
 	}
Signature · 1 line
2.11.0
Applied
#1 lore raw
Quoted 7 lines · Neil Brown

These arrays, created with "mdadm --build" don't benefit from a limit. The default will be used, which is '0' and is interpreted as "don't impose a limit".

applied, thanks!

Quoted 22 lines
---
 drivers/md/md.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/md.c +1 -2
index ba485dcf1064..e0ac7f5a8e68 100644
@@ -6464,9 +6464,8 @@ static int set_array_info(struct mddev *mddev, mdu_array_info_t *info)
 	mddev->layout        = info->layout;
 	mddev->chunk_sectors = info->chunk_size >> 9;
 
-	mddev->max_disks     = MD_SB_DISKS;
-
 	if (mddev->persistent) {
+		mddev->max_disks     = MD_SB_DISKS;
 		mddev->flags         = 0;
 		mddev->sb_flags         = 0;
 	}
Signature · 1 line
2.11.0