]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super1.c
super1: fix sb->max_dev when adding a new disk in linear array
authorLidong Zhong <lzhong@suse.com>
Thu, 25 May 2017 09:28:11 +0000 (17:28 +0800)
committerJes Sorensen <jsorensen@fb.com>
Fri, 26 May 2017 18:35:35 +0000 (14:35 -0400)
commit68fee4af1703dc0bc0d1c9c99fd750e8dca3a131
treec11651c9fd5b473ef1a2099e86d1b2ee18662e13
parent9b8fea914f82281c440cdce9dee6a3775265861c
super1: fix sb->max_dev when adding a new disk in linear array

The value of sb->max_dev will always be increased by 1 when adding
a new disk in linear array. It causes an inconsistence between each
disk in the array and the "Array State" value of "mdadm --examine DISK"
is wrong. For example, when adding the first new disk into linear array
it will be:

Array State : RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
('A' == active, '.' == missing, 'R' == replacing)

Adding the second disk into linear array it will be

Array State : .AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
('A' == active, '.' == missing, 'R' == replacing)

Signed-off-by: Lidong Zhong <lzhong@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super1.c