summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-15 11:35:28 -0700
committerDan Williams <dan.j.williams@intel.com>2009-09-15 11:35:28 -0700
commitee5aad5ae21d2c279169a84e4ad05aa08d4fbf47 (patch)
treee726464b8fcfec490852487c3ce0f5b9616aa191
parented57a7e8ba06237dc6f4a8f581d12353158ce798 (diff)
downloadmdadm-ee5aad5ae21d2c279169a84e4ad05aa08d4fbf47.tar.gz
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>
-rw-r--r--super-intel.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/super-intel.c b/super-intel.c
index 4e2b75f..6264551 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -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;