summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Wojcik <krzysztof.wojcik@intel.com>2011-03-24 10:15:01 +1100
committerNeilBrown <neilb@suse.de>2011-03-24 10:15:01 +1100
commitb4add146a02286102916a815f2ed0ba3f76cfd7b (patch)
tree805dcc995957b9e895ad6f9ce4aa1497f97af92b
parente53d022c726ffbc83b8bfc574df76bb7984d1982 (diff)
downloadmdadm-b4add146a02286102916a815f2ed0ba3f76cfd7b.tar.gz
FIX: imsm: Do not change serial if disk failed
This patch rollback one change connected with mdadm-OROM compatibility: adding ':0' at the end of disk serial number if disk is detected as failed. Current mdadm's implementation does not distinguish two cases when disk is marked as failed: 1. If disk is really failed- disconnected, broken 2. Just marked as failed by mdadm- using "-f" option Second case is not yet fully handled and compatible with IMSM standard. Changing serial number of existing, operational disk causes problems in "thunderdome" and "load_super" functions that use serial numbers to disks comparisons and searching. The change must be recalled until full support will be developed. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-intel.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/super-intel.c b/super-intel.c
index 2b41e08..5f5f0d9 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5218,8 +5218,6 @@ static int mark_failure(struct imsm_dev *dev, struct imsm_disk *disk, int idx)
__u32 ord;
int slot;
struct imsm_map *map;
- char buf[MAX_RAID_SERIAL_LEN+3];
- unsigned int len, shift = 0;
/* new failures are always set in map[0] */
map = get_imsm_map(dev, 0);
@@ -5232,11 +5230,6 @@ static int mark_failure(struct imsm_dev *dev, struct imsm_disk *disk, int idx)
if (is_failed(disk) && (ord & IMSM_ORD_REBUILD))
return 0;
- sprintf(buf, "%s:0", disk->serial);
- if ((len = strlen(buf)) >= MAX_RAID_SERIAL_LEN)
- shift = len - MAX_RAID_SERIAL_LEN + 1;
- strncpy((char *)disk->serial, &buf[shift], MAX_RAID_SERIAL_LEN);
-
disk->status |= FAILED_DISK;
set_imsm_ord_tbl_ent(map, slot, idx | IMSM_ORD_REBUILD);
if (map->failed_disk_num == 0xff)