imsm: kill USABLE_DISK flag

'USABLE_DISK' is not a 'persistent' status flag it is an internal status
flag used for the in memory representation of the disk in the Windows
driver.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams 2009-09-15 11:35:28 -07:00
parent ed57a7e8ba
commit ee5aad5ae2
1 changed files with 4 additions and 8 deletions

View File

@ -64,7 +64,6 @@ struct imsm_disk {
#define SPARE_DISK __cpu_to_le32(0x01) /* Spare */
#define CONFIGURED_DISK __cpu_to_le32(0x02) /* Member of some RaidDev */
#define FAILED_DISK __cpu_to_le32(0x04) /* Permanent failure */
#define USABLE_DISK __cpu_to_le32(0x08) /* Fully usable unless FAILED_DISK is set */
__u32 status; /* 0xF0 - 0xF3 */
__u32 owner_cfg_num; /* which config 0,1,2... owns this disk */
#define IMSM_DISK_FILLERS 4
@ -687,10 +686,9 @@ static void print_imsm_disk(struct imsm_super *mpb, int index, __u32 reserved)
snprintf(str, MAX_RAID_SERIAL_LEN + 1, "%s", disk->serial);
printf(" Disk%02d Serial : %s\n", index, str);
s = disk->status;
printf(" State :%s%s%s%s\n", s&SPARE_DISK ? " spare" : "",
printf(" State :%s%s%s\n", s&SPARE_DISK ? " spare" : "",
s&CONFIGURED_DISK ? " active" : "",
s&FAILED_DISK ? " failed" : "",
s&USABLE_DISK ? " usable" : "");
s&FAILED_DISK ? " failed" : "");
printf(" Id : %08x\n", __le32_to_cpu(disk->scsi_id));
sz = __le32_to_cpu(disk->total_blocks) - reserved;
printf(" Usable Size : %llu%s\n", (unsigned long long)sz,
@ -2568,7 +2566,7 @@ static int add_to_super_imsm_volume(struct supertype *st, mdu_disk_info_t *dk,
super->anchor->num_disks++;
}
set_imsm_ord_tbl_ent(map, dk->number, dl->index);
dl->disk.status = CONFIGURED_DISK | USABLE_DISK;
dl->disk.status = CONFIGURED_DISK;
/* if we are creating the first raid device update the family number */
if (super->current_vol == 0) {
@ -2636,7 +2634,7 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
size /= 512;
serialcpy(dd->disk.serial, dd->serial);
dd->disk.total_blocks = __cpu_to_le32(size);
dd->disk.status = USABLE_DISK | SPARE_DISK;
dd->disk.status = SPARE_DISK;
if (sysfs_disk_to_scsi_id(fd, &id) == 0)
dd->disk.scsi_id = __cpu_to_le32(id);
else
@ -3462,8 +3460,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st)
s = d ? d->disk.status : 0;
if (s & FAILED_DISK)
skip = 1;
if (!(s & USABLE_DISK))
skip = 1;
if (ord & IMSM_ORD_REBUILD)
skip = 1;