MD: set journal disk ->raid_disk
authorShaohua Li <shli@fb.com>
Fri, 9 Oct 2015 04:54:12 +0000 (21:54 -0700)
committerNeilBrown <neilb@suse.com>
Sun, 1 Nov 2015 02:48:29 +0000 (13:48 +1100)
commitf2076e7d0643d15b11db979acc7cffd2e8d69e77
tree6c0129f2dc73fedcf4be0c168df780f59a5e65df
parenta3dfbdaadba2612faf11f025b8156c36e3700247
MD: set journal disk ->raid_disk

Set journal disk ->raid_disk to >=0, I choose raid_disks + 1 instead of
0, because we already have a disk with ->raid_disk 0 and this causes
sysfs entry creation conflict. A lot of places assumes disk with
->raid_disk >=0 is normal raid disk, so we add check for journal disk.

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md.c
drivers/md/raid5.c