mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-19 07:33:14 +03:00
RAID: Revert previous commit that allowed identical table loads.
Revert commit 31c24dd9f2
. This commit
was used to force a RAID device-mapper table to be loaded into the
kernel despite the fact that it was identical to the one already
loaded. The effect allowed a RAID array with a transiently failed
device to refresh and reintegrate the failed device. This operation
is better done in the kernel on a 'resume'. Since,
'lvchange --refresh' already performs a suspend/resume cycle, the
above commit is not needed once the kernel change is made. Reverting
the commit removes an unnecessary (at least for now) change to the
device-mapper interface.
This commit is contained in:
@@ -161,7 +161,6 @@ static int _raid_add_target_line(struct dev_manager *dm __attribute__((unused)),
|
||||
uint32_t s;
|
||||
uint64_t flags = 0;
|
||||
uint64_t rebuilds = 0;
|
||||
char *raid_health = NULL;
|
||||
|
||||
if (!seg->area_count) {
|
||||
log_error(INTERNAL_ERROR "_raid_add_target_line called "
|
||||
@@ -191,20 +190,6 @@ static int _raid_add_target_line(struct dev_manager *dm __attribute__((unused)),
|
||||
if (mirror_in_sync())
|
||||
flags = DM_NOSYNC;
|
||||
|
||||
/*
|
||||
* If the RAID LV is not 'PARTIAL' and the status indicates
|
||||
* that the array has failed devices, it means that the
|
||||
* failed devices have returned and can be reintegrated.
|
||||
*
|
||||
* We reload the (potentially identical) table to force the
|
||||
* kernel to re-read the RAID superblocks - possibly restoring
|
||||
* transiently failed devices.
|
||||
*/
|
||||
if (!(seg->lv->status & PARTIAL_LV) &&
|
||||
lv_raid_dev_health(seg->lv, &raid_health) &&
|
||||
strchr(raid_health, 'D'))
|
||||
dm_tree_node_force_identical_table_reload(node);
|
||||
|
||||
if (!dm_tree_node_add_raid_target(node, len, _raid_name(seg),
|
||||
seg->region_size, seg->stripe_size,
|
||||
rebuilds, flags))
|
||||
|
Reference in New Issue
Block a user