|
|
2c1b57 |
From 2a24dc1b0988a7d924de6339754d4160762a61f7 Mon Sep 17 00:00:00 2001
|
|
|
2c1b57 |
From: Pawel Baldysiak <pawel.baldysiak@intel.com>
|
|
|
2c1b57 |
Date: Wed, 26 Apr 2017 11:08:07 +0200
|
|
|
2c1b57 |
Subject: [RHEL7.5 PATCH 103/169] IMSM: Initialize my_vol_raid_dev_num
|
|
|
2c1b57 |
during vol creation
|
|
|
2c1b57 |
|
|
|
2c1b57 |
This field was not initialized so far. This ID needs to be unique
|
|
|
2c1b57 |
for every newly created array in container.
|
|
|
2c1b57 |
|
|
|
2c1b57 |
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
|
|
|
2c1b57 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
2c1b57 |
---
|
|
|
2c1b57 |
super-intel.c | 11 +++++++++--
|
|
|
2c1b57 |
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
2c1b57 |
|
|
|
2c1b57 |
diff --git a/super-intel.c b/super-intel.c
|
|
|
2c1b57 |
index fbff215..36f77d3 100644
|
|
|
2c1b57 |
--- a/super-intel.c
|
|
|
2c1b57 |
+++ b/super-intel.c
|
|
|
2c1b57 |
@@ -232,8 +232,13 @@ struct imsm_super {
|
|
|
2c1b57 |
__u32 orig_family_num; /* 0x40 - 0x43 original family num */
|
|
|
2c1b57 |
__u32 pwr_cycle_count; /* 0x44 - 0x47 simulated power cycle count for array */
|
|
|
2c1b57 |
__u32 bbm_log_size; /* 0x48 - 0x4B - size of bad Block Mgmt Log in bytes */
|
|
|
2c1b57 |
-#define IMSM_FILLERS 35
|
|
|
2c1b57 |
- __u32 filler[IMSM_FILLERS]; /* 0x4C - 0xD7 RAID_MPB_FILLERS */
|
|
|
2c1b57 |
+ __u16 num_raid_devs_created; /* 0x4C - 0x4D Used for generating unique
|
|
|
2c1b57 |
+ * volume IDs for raid_dev created in this array
|
|
|
2c1b57 |
+ * (starts at 1)
|
|
|
2c1b57 |
+ */
|
|
|
2c1b57 |
+ __u16 filler1; /* 0x4E - 0x4F */
|
|
|
2c1b57 |
+#define IMSM_FILLERS 34
|
|
|
2c1b57 |
+ __u32 filler[IMSM_FILLERS]; /* 0x50 - 0xD7 RAID_MPB_FILLERS */
|
|
|
2c1b57 |
struct imsm_disk disk[1]; /* 0xD8 diskTbl[numDisks] */
|
|
|
2c1b57 |
/* here comes imsm_dev[num_raid_devs] */
|
|
|
2c1b57 |
/* here comes BBM logs */
|
|
|
2c1b57 |
@@ -5368,6 +5373,8 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
|
|
|
2c1b57 |
set_imsm_ord_tbl_ent(map, i, IMSM_ORD_REBUILD);
|
|
|
2c1b57 |
}
|
|
|
2c1b57 |
mpb->num_raid_devs++;
|
|
|
2c1b57 |
+ mpb->num_raid_devs_created++;
|
|
|
2c1b57 |
+ dev->my_vol_raid_dev_num = mpb->num_raid_devs_created;
|
|
|
2c1b57 |
|
|
|
2c1b57 |
if (s->consistency_policy <= CONSISTENCY_POLICY_RESYNC) {
|
|
|
2c1b57 |
dev->rwh_policy = RWH_OFF;
|
|
|
2c1b57 |
--
|
|
|
2c1b57 |
2.7.4
|
|
|
2c1b57 |
|