Dan Williams: imsm: kill USABLE_DISK flag

Martin F. Krafft madduck at alioth.debian.org
Tue Oct 27 19:21:28 UTC 2009


Module: mdadm
Branch: master
Commit: ee5aad5ae21d2c279169a84e4ad05aa08d4fbf47
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=ee5aad5ae21d2c279169a84e4ad05aa08d4fbf47

Author: Dan Williams <dan.j.williams at intel.com>
Date:   Tue Sep 15 11:35:28 2009 -0700

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 at intel.com>


---

 super-intel.c |   12 ++++--------
 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;
 




More information about the pkg-mdadm-commits mailing list