LVM: add logic to allow mirrored log
PATCH 1/1 LVM: add logic to allow mirrored log
Patch name: lvm-add-logic-to-allow-mirrored-log.patch
Insert the couple of lines that adds the logic necessary to create the mirrored/redundant log.
RFC: Jonathan Brassow <[email protected]>
lib/metadata/mirror.c +7 -1
@@ -1330,7 +1330,7 @@ static struct logical_volume *_set_up_mistruct alloc_handle *ah, struct logical_volume *lv, uint32_t log_count, - uint32_t region_size __attribute((unused)), + uint32_t region_size, alloc_policy_t alloc, int in_sync) {
@@ -1374,6 +1374,12 @@ static struct logical_volume *_set_up_mireturn NULL ; } +if ((log_count >1 ) && + !_form_mirror (cmd, ah, log_lv, log_count-1 , region_size,1 )) { +log_error ("Failed to form mirrored log." ); +return NULL ; + } +if (!_init_mirror_log (cmd, log_lv, in_sync, &lv->tags,1 )) {log_error ("Failed to create mirror log." );return NULL ;