diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2010-12-02 09:19:12 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-12-03 04:49:01 +0100 |
commit | 899aead007628048b1664f92e74bfac0169aaa04 (patch) | |
tree | fb7b9065dda246f64f7edc9d0e18f5ed5bef0b71 /sysfs.c | |
parent | FIX: Cannot exit monitor after takeover (diff) | |
download | mdadm-899aead007628048b1664f92e74bfac0169aaa04.tar.xz mdadm-899aead007628048b1664f92e74bfac0169aaa04.zip |
Add support to skip slot configuration
When disk is added, set valid slot numbers (positive) only.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -614,7 +614,8 @@ int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd, int resume) * yet, so just ignore status for now. */ sysfs_set_str(sra, sd, "state", "insync"); - rv |= sysfs_set_num(sra, sd, "slot", sd->disk.raid_disk); + if (sd->disk.raid_disk >= 0) + rv |= sysfs_set_num(sra, sd, "slot", sd->disk.raid_disk); if (resume) sysfs_set_num(sra, sd, "recovery_start", sd->recovery_start); } |