diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-12-21 19:26:21 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-12-21 19:26:21 +0100 |
commit | d23534e4646313a67296b295666d165a87bb2c92 (patch) | |
tree | d99d9b4beb269ac0f8b1bbe6c0ca3cfab97f5c4a /sysfs.c | |
parent | Introduce MaxSector (diff) | |
download | mdadm-d23534e4646313a67296b295666d165a87bb2c92.tar.xz mdadm-d23534e4646313a67296b295666d165a87bb2c92.zip |
Teach sysfs_add_disk() callers to use ->recovery_start versus 'insync' parameter
Also fixup 'in_sync' versus 'insync' typo.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -572,7 +572,7 @@ int sysfs_set_array(struct mdinfo *info, int vers) return rv; } -int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd, int in_sync) +int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd) { char dv[100]; char nm[100]; @@ -598,11 +598,11 @@ int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd, int in_sync) rv = sysfs_set_num(sra, sd, "offset", sd->data_offset); rv |= sysfs_set_num(sra, sd, "size", (sd->component_size+1) / 2); if (sra->array.level != LEVEL_CONTAINER) { - if (in_sync) + if (sd->recovery_start == MaxSector) /* This can correctly fail if array isn't started, * yet, so just ignore status for now. */ - sysfs_set_str(sra, sd, "state", "in_sync"); + sysfs_set_str(sra, sd, "state", "insync"); rv |= sysfs_set_num(sra, sd, "slot", sd->disk.raid_disk); } return rv; |