diff options
| author | Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> | 2019-11-06 20:11:35 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-11-06 19:58:01 -0800 |
| commit | 51dd17d6277653306bf10e6ca537847ee9d54696 (patch) | |
| tree | fc1918347ef31cbb4800207e351ad2cbc8f397ad | |
| parent | dc9caf5d1d20933805e9c754a160842b23c83615 (diff) | |
| download | meta-openembedded-51dd17d6277653306bf10e6ca537847ee9d54696.tar.gz | |
lvm2/libdevmapper: 2.03.05 -> 2.03.06
1) Remove five patches for they have been merged in new version.
0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch
0001-configure-Fix-setting-of-CLDFLAGS-default.patch
0001-activation-add-synchronization-point.patch
0002-activation-extend-handling-of-pending_delete.patch
0003-snapshot-always-activate.patch
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch | 78 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb (renamed from meta-oe/recipes-support/lvm2/libdevmapper_2.03.05.bb) | 0 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2.inc | 3 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0001-activation-add-synchronization-point.patch | 82 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch | 39 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0002-activation-extend-handling-of-pending_delete.patch | 124 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0003-snapshot-always-activate.patch | 40 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2_2.03.06.bb (renamed from meta-oe/recipes-support/lvm2/lvm2_2.03.05.bb) | 4 |
8 files changed, 1 insertions, 369 deletions
diff --git a/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch b/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch deleted file mode 100644 index 07cb88ffba..0000000000 --- a/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch +++ /dev/null | |||
| @@ -1,78 +0,0 @@ | |||
| 1 | From 4a3e707402032788e09282e0f54fdf82c8a0f8fc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Marian Csontos <mcsontos@redhat.com> | ||
| 3 | Date: Mon, 19 Aug 2019 14:54:43 +0200 | ||
| 4 | Subject: [PATCH] configure: Fix setting of CLDFLAGS default | ||
| 5 | |||
| 6 | --- | ||
| 7 | configure | 6 +++--- | ||
| 8 | configure.ac | 6 +++--- | ||
| 9 | 2 files changed, 6 insertions(+), 6 deletions(-) | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://sourceware.org/git/?p=lvm2.git;a=commit;h=4a3e707402032788e09282e0f54fdf82c8a0f8fc] | ||
| 12 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | ||
| 13 | |||
| 14 | diff --git a/configure b/configure | ||
| 15 | index ff3a59b6b..4c8476502 100755 | ||
| 16 | --- a/configure | ||
| 17 | +++ b/configure | ||
| 18 | @@ -3077,7 +3077,7 @@ if test -z "$CFLAGS"; then : | ||
| 19 | fi | ||
| 20 | case "$host_os" in | ||
| 21 | linux*) | ||
| 22 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym" | ||
| 23 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym" | ||
| 24 | # equivalent to -rdynamic | ||
| 25 | ELDFLAGS="-Wl,--export-dynamic" | ||
| 26 | # FIXME Generate list and use --dynamic-list=.dlopen.sym | ||
| 27 | @@ -3098,7 +3098,7 @@ case "$host_os" in | ||
| 28 | ;; | ||
| 29 | darwin*) | ||
| 30 | CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" | ||
| 31 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" | ||
| 32 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}" | ||
| 33 | ELDFLAGS= | ||
| 34 | CLDWHOLEARCHIVE="-all_load" | ||
| 35 | CLDNOWHOLEARCHIVE= | ||
| 36 | @@ -3111,7 +3111,7 @@ case "$host_os" in | ||
| 37 | BLKDEACTIVATE=no | ||
| 38 | ;; | ||
| 39 | *) | ||
| 40 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" | ||
| 41 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}" | ||
| 42 | ;; | ||
| 43 | esac | ||
| 44 | |||
| 45 | diff --git a/configure.ac b/configure.ac | ||
| 46 | index 5da694631..830edb8da 100644 | ||
| 47 | --- a/configure.ac | ||
| 48 | +++ b/configure.ac | ||
| 49 | @@ -30,7 +30,7 @@ AC_CANONICAL_TARGET([]) | ||
| 50 | AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"]) | ||
| 51 | case "$host_os" in | ||
| 52 | linux*) | ||
| 53 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym" | ||
| 54 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym" | ||
| 55 | # equivalent to -rdynamic | ||
| 56 | ELDFLAGS="-Wl,--export-dynamic" | ||
| 57 | # FIXME Generate list and use --dynamic-list=.dlopen.sym | ||
| 58 | @@ -51,7 +51,7 @@ case "$host_os" in | ||
| 59 | ;; | ||
| 60 | darwin*) | ||
| 61 | CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" | ||
| 62 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" | ||
| 63 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}" | ||
| 64 | ELDFLAGS= | ||
| 65 | CLDWHOLEARCHIVE="-all_load" | ||
| 66 | CLDNOWHOLEARCHIVE= | ||
| 67 | @@ -64,7 +64,7 @@ case "$host_os" in | ||
| 68 | BLKDEACTIVATE=no | ||
| 69 | ;; | ||
| 70 | *) | ||
| 71 | - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" | ||
| 72 | + CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}" | ||
| 73 | ;; | ||
| 74 | esac | ||
| 75 | |||
| 76 | -- | ||
| 77 | 2.21.0 | ||
| 78 | |||
diff --git a/meta-oe/recipes-support/lvm2/libdevmapper_2.03.05.bb b/meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb index be558ce1d2..be558ce1d2 100644 --- a/meta-oe/recipes-support/lvm2/libdevmapper_2.03.05.bb +++ b/meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc index 41bf78a3f9..01c9df45c1 100644 --- a/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/meta-oe/recipes-support/lvm2/lvm2.inc | |||
| @@ -15,9 +15,8 @@ SRC_URI = "git://sourceware.org/git/lvm2.git \ | |||
| 15 | file://0001-Avoid-bashisms-in-init-scripts.patch \ | 15 | file://0001-Avoid-bashisms-in-init-scripts.patch \ |
| 16 | file://0005-do-not-build-manual.patch \ | 16 | file://0005-do-not-build-manual.patch \ |
| 17 | file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \ | 17 | file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \ |
| 18 | file://0001-configure-Fix-setting-of-CLDFLAGS-default.patch \ | ||
| 19 | " | 18 | " |
| 20 | SRCREV = "60bd9e8406ac28a04aa5e8165149f7a5d4f3265a" | 19 | SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02" |
| 21 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
| 22 | 21 | ||
| 23 | inherit autotools-brokensep pkgconfig systemd license | 22 | inherit autotools-brokensep pkgconfig systemd license |
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-activation-add-synchronization-point.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-activation-add-synchronization-point.patch deleted file mode 100644 index a864f1e219..0000000000 --- a/meta-oe/recipes-support/lvm2/lvm2/0001-activation-add-synchronization-point.patch +++ /dev/null | |||
| @@ -1,82 +0,0 @@ | |||
| 1 | From f8466749dd73f5b0ccf4fc86c8a7585c4140b3f9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zdenek Kabelac <zkabelac@redhat.com> | ||
| 3 | Date: Fri, 16 Aug 2019 23:49:59 +0200 | ||
| 4 | Subject: [PATCH 1/3] activation: add synchronization point | ||
| 5 | |||
| 6 | Resuming of 'error' table entry followed with it's dirrect removal | ||
| 7 | is now troublesame with latest udev as it may skip processing of | ||
| 8 | udev rules for already 'dropped' device nodes. | ||
| 9 | |||
| 10 | As we cannot 'synchronize' with udev while we know we have devices | ||
| 11 | in suspended state - rework 'cleanup' so it collects nodes | ||
| 12 | for removal into pending_delete list and process the list with | ||
| 13 | synchronization once we are without any suspended nodes. | ||
| 14 | |||
| 15 | Upstream-Status: Backport | ||
| 16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 17 | --- | ||
| 18 | WHATS_NEW | 9 +++++++++ | ||
| 19 | lib/activate/dev_manager.c | 20 ++++++++++++-------- | ||
| 20 | 2 files changed, 21 insertions(+), 8 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/WHATS_NEW b/WHATS_NEW | ||
| 23 | index 3a58de5f9..0b48e032b 100644 | ||
| 24 | --- a/WHATS_NEW | ||
| 25 | +++ b/WHATS_NEW | ||
| 26 | @@ -1,3 +1,12 @@ | ||
| 27 | +Version 2.03.06 - | ||
| 28 | +================================ | ||
| 29 | + Synchronize with udev when dropping snapshot. | ||
| 30 | + Add missing device synchronization point before removing pvmove node. | ||
| 31 | + Correctly set read_ahead for LVs when pvmove is finished. | ||
| 32 | + Remove unsupported OPTIONS+="event_timeout" udev rule from 11-dm-lvm.rules. | ||
| 33 | + Prevent creating VGs with PVs with different logical block sizes. | ||
| 34 | + Fix metadata writes from corrupting with large physical block size. | ||
| 35 | + | ||
| 36 | Version 2.03.05 - 15th June 2019 | ||
| 37 | ================================ | ||
| 38 | Fix command definition for pvchange -a. | ||
| 39 | diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c | ||
| 40 | index 981f4674a..7101ffa12 100644 | ||
| 41 | --- a/lib/activate/dev_manager.c | ||
| 42 | +++ b/lib/activate/dev_manager.c | ||
| 43 | @@ -3558,13 +3558,6 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, const | ||
| 44 | const char *name, *uuid; | ||
| 45 | struct dm_str_list *dl; | ||
| 46 | |||
| 47 | - /* Deactivate any tracked pending delete nodes */ | ||
| 48 | - dm_list_iterate_items(dl, &dm->pending_delete) { | ||
| 49 | - log_debug_activation("Deleting tracked UUID %s.", dl->str); | ||
| 50 | - if (!dm_tree_deactivate_children(root, dl->str, strlen(dl->str))) | ||
| 51 | - return_0; | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | while ((child = dm_tree_next_child(&handle, root, 0))) { | ||
| 55 | if (!(name = dm_tree_node_get_name(child))) | ||
| 56 | continue; | ||
| 57 | @@ -3585,10 +3578,21 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, const | ||
| 58 | if (non_toplevel_tree_dlid && !strcmp(non_toplevel_tree_dlid, uuid)) | ||
| 59 | continue; | ||
| 60 | |||
| 61 | - if (!dm_tree_deactivate_children(root, uuid, strlen(uuid))) | ||
| 62 | + if (!str_list_add(dm->mem, &dm->pending_delete, uuid)) | ||
| 63 | return_0; | ||
| 64 | } | ||
| 65 | |||
| 66 | + /* Deactivate any tracked pending delete nodes */ | ||
| 67 | + if (!dm_list_empty(&dm->pending_delete) && !dm_get_suspended_counter()) { | ||
| 68 | + fs_unlock(); | ||
| 69 | + dm_tree_set_cookie(root, fs_get_cookie()); | ||
| 70 | + dm_list_iterate_items(dl, &dm->pending_delete) { | ||
| 71 | + log_debug_activation("Deleting tracked UUID %s.", dl->str); | ||
| 72 | + if (!dm_tree_deactivate_children(root, dl->str, strlen(dl->str))) | ||
| 73 | + return_0; | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | return 1; | ||
| 78 | } | ||
| 79 | |||
| 80 | -- | ||
| 81 | 2.21.0 | ||
| 82 | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch deleted file mode 100644 index 5a6db4b886..0000000000 --- a/meta-oe/recipes-support/lvm2/lvm2/0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | From e48f8328f9d35f23a24e5b27237e8ebf1dbfa269 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Thu, 10 Oct 2019 22:38:00 -0400 | ||
| 4 | Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule | ||
| 5 | |||
| 6 | The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216, | ||
| 7 | that is ~5 years ago. | ||
| 8 | |||
| 9 | Since systemd/udev version 243, there's a new message printed if unsupported | ||
| 10 | OPTIONS value is used: | ||
| 11 | |||
| 12 | Invalid value for OPTIONS key, ignoring: 'event_timeout=180' | ||
| 13 | |||
| 14 | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666 | ||
| 15 | |||
| 16 | Signed-off-by: Peter Rajnoha <prajnoha@redhat.com> | ||
| 17 | |||
| 18 | Upstream-Status: Backport [https://github.com/lvmteam/lvm2/commit/125f27ac37bc9b93cc96f64052b9681b3d479ee1] | ||
| 19 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 20 | --- | ||
| 21 | udev/11-dm-lvm.rules.in | 2 -- | ||
| 22 | 1 file changed, 2 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in | ||
| 25 | index 91cb991..7c58994 100644 | ||
| 26 | --- a/udev/11-dm-lvm.rules.in | ||
| 27 | +++ b/udev/11-dm-lvm.rules.in | ||
| 28 | @@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE | ||
| 29 | |||
| 30 | ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end" | ||
| 31 | |||
| 32 | -OPTIONS+="event_timeout=180" | ||
| 33 | - | ||
| 34 | # Do not create symlinks for inappropriate subdevices. | ||
| 35 | ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable" | ||
| 36 | ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable" | ||
| 37 | -- | ||
| 38 | 2.23.0 | ||
| 39 | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-activation-extend-handling-of-pending_delete.patch b/meta-oe/recipes-support/lvm2/lvm2/0002-activation-extend-handling-of-pending_delete.patch deleted file mode 100644 index e30731593b..0000000000 --- a/meta-oe/recipes-support/lvm2/lvm2/0002-activation-extend-handling-of-pending_delete.patch +++ /dev/null | |||
| @@ -1,124 +0,0 @@ | |||
| 1 | From d06ad77b47f4dfd25bc3da88c0621ac073ad8ce5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zdenek Kabelac <zkabelac@redhat.com> | ||
| 3 | Date: Fri, 23 Aug 2019 13:08:34 +0200 | ||
| 4 | Subject: [PATCH 2/3] activation: extend handling of pending_delete | ||
| 5 | |||
| 6 | With previous patch 30a98e4d6710a543692d40d11428ae4baea11b7b we | ||
| 7 | started to put devices one pending_delete list instead | ||
| 8 | of directly scheduling their removal. | ||
| 9 | |||
| 10 | However we have operations like 'snapshot merge' where we are | ||
| 11 | resuming device tree in 2 subsequent activation calls - so | ||
| 12 | 1st such call will still have suspened devices and no chance | ||
| 13 | to push 'remove' ioctl. | ||
| 14 | |||
| 15 | Since we curently cannot easily solve this by doing just single | ||
| 16 | activation call (which would be preferred solution) - we introduce | ||
| 17 | a preservation of pending_delete via command structure and | ||
| 18 | then restore it on next activation call. | ||
| 19 | |||
| 20 | This way we keep to remove devices later - although it might be | ||
| 21 | not the best moment - this may need futher tunning. | ||
| 22 | |||
| 23 | Also we don't keep the list of operation in 1 trasaction | ||
| 24 | (unless we do verify udev symlinks) - this could probably | ||
| 25 | also make it more correct in terms of which 'remove' can | ||
| 26 | be combined we already running 'resume'. | ||
| 27 | |||
| 28 | Upstream-Status: Backport | ||
| 29 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 30 | --- | ||
| 31 | lib/activate/dev_manager.c | 24 +++++++++++------------- | ||
| 32 | lib/commands/toolcontext.c | 8 ++++++++ | ||
| 33 | lib/commands/toolcontext.h | 1 + | ||
| 34 | 3 files changed, 20 insertions(+), 13 deletions(-) | ||
| 35 | |||
| 36 | diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c | ||
| 37 | index 7101ffa12..7a7689291 100644 | ||
| 38 | --- a/lib/activate/dev_manager.c | ||
| 39 | +++ b/lib/activate/dev_manager.c | ||
| 40 | @@ -3591,6 +3591,7 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, const | ||
| 41 | if (!dm_tree_deactivate_children(root, dl->str, strlen(dl->str))) | ||
| 42 | return_0; | ||
| 43 | } | ||
| 44 | + dm_list_init(&dm->pending_delete); | ||
| 45 | } | ||
| 46 | |||
| 47 | return 1; | ||
| 48 | @@ -3717,25 +3718,22 @@ out_no_root: | ||
| 49 | int dev_manager_activate(struct dev_manager *dm, const struct logical_volume *lv, | ||
| 50 | struct lv_activate_opts *laopts) | ||
| 51 | { | ||
| 52 | + dm_list_splice(&dm->pending_delete, &lv->vg->cmd->pending_delete); | ||
| 53 | + | ||
| 54 | if (!_tree_action(dm, lv, laopts, ACTIVATE)) | ||
| 55 | return_0; | ||
| 56 | |||
| 57 | - /* | ||
| 58 | - * When lvm2 resumes a device and shortly after that it removes it, | ||
| 59 | - * udevd rule will try to blindly call 'dmsetup info' on already removed | ||
| 60 | - * device leaving the trace inside syslog about failing operation. | ||
| 61 | - * | ||
| 62 | - * TODO: It's not completely clear this call here is the best fix. | ||
| 63 | - * Maybe there can be a better sequence, but ATM we do usually resume | ||
| 64 | - * error device i.e. on cache deletion and remove it. | ||
| 65 | - * TODO2: there could be more similar cases! | ||
| 66 | - */ | ||
| 67 | - if (!dm_list_empty(&dm->pending_delete)) | ||
| 68 | - fs_unlock(); | ||
| 69 | - | ||
| 70 | if (!_tree_action(dm, lv, laopts, CLEAN)) | ||
| 71 | return_0; | ||
| 72 | |||
| 73 | + if (!dm_list_empty(&dm->pending_delete)) { | ||
| 74 | + log_debug("Preserving %d device(s) for removal while being suspended.", | ||
| 75 | + dm_list_size(&dm->pending_delete)); | ||
| 76 | + if (!(str_list_dup(lv->vg->cmd->mem, &lv->vg->cmd->pending_delete, | ||
| 77 | + &dm->pending_delete))) | ||
| 78 | + return_0; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | return 1; | ||
| 82 | } | ||
| 83 | |||
| 84 | diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c | ||
| 85 | index 1e03ea235..0a9355361 100644 | ||
| 86 | --- a/lib/commands/toolcontext.c | ||
| 87 | +++ b/lib/commands/toolcontext.c | ||
| 88 | @@ -1734,6 +1734,8 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd, | ||
| 89 | cmd->current_settings = cmd->default_settings; | ||
| 90 | |||
| 91 | cmd->initialized.config = 1; | ||
| 92 | + | ||
| 93 | + dm_list_init(&cmd->pending_delete); | ||
| 94 | out: | ||
| 95 | if (!cmd->initialized.config) { | ||
| 96 | destroy_toolcontext(cmd); | ||
| 97 | @@ -1922,6 +1924,12 @@ int refresh_toolcontext(struct cmd_context *cmd) | ||
| 98 | |||
| 99 | cmd->initialized.config = 1; | ||
| 100 | |||
| 101 | + if (!dm_list_empty(&cmd->pending_delete)) { | ||
| 102 | + log_debug(INTERNAL_ERROR "Unprocessed pending delete for %d devices.", | ||
| 103 | + dm_list_size(&cmd->pending_delete)); | ||
| 104 | + dm_list_init(&cmd->pending_delete); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | if (cmd->initialized.connections && !init_connections(cmd)) | ||
| 108 | return_0; | ||
| 109 | |||
| 110 | diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h | ||
| 111 | index 6e4530c8a..54ddec320 100644 | ||
| 112 | --- a/lib/commands/toolcontext.h | ||
| 113 | +++ b/lib/commands/toolcontext.h | ||
| 114 | @@ -237,6 +237,7 @@ struct cmd_context { | ||
| 115 | const char *report_list_item_separator; | ||
| 116 | const char *time_format; | ||
| 117 | unsigned rand_seed; | ||
| 118 | + struct dm_list pending_delete; /* list of LVs for removal */ | ||
| 119 | }; | ||
| 120 | |||
| 121 | /* | ||
| 122 | -- | ||
| 123 | 2.21.0 | ||
| 124 | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0003-snapshot-always-activate.patch b/meta-oe/recipes-support/lvm2/lvm2/0003-snapshot-always-activate.patch deleted file mode 100644 index 953e4ad659..0000000000 --- a/meta-oe/recipes-support/lvm2/lvm2/0003-snapshot-always-activate.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 9143445478871b47ba28b41f5e88d4c415f8205b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zdenek Kabelac <zkabelac@redhat.com> | ||
| 3 | Date: Mon, 26 Aug 2019 15:13:55 +0200 | ||
| 4 | Subject: [PATCH 3/3] snapshot: always activate | ||
| 5 | |||
| 6 | Drop the 'cluster-only' optimization so we do resume ALL device | ||
| 7 | before we try to wait on cookie before 'removal' operation. | ||
| 8 | |||
| 9 | It's more correct order of operation - alhtough possibly slightly | ||
| 10 | less efficient - but until we have correct list of operations | ||
| 11 | 'in-progress' we can't do anything better. | ||
| 12 | |||
| 13 | Upstream-Status: Backport | ||
| 14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 15 | --- | ||
| 16 | lib/metadata/snapshot_manip.c | 8 +------- | ||
| 17 | 1 file changed, 1 insertion(+), 7 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c | ||
| 20 | index 5ccf251c7..65d8dbd13 100644 | ||
| 21 | --- a/lib/metadata/snapshot_manip.c | ||
| 22 | +++ b/lib/metadata/snapshot_manip.c | ||
| 23 | @@ -361,13 +361,7 @@ int vg_remove_snapshot(struct logical_volume *cow) | ||
| 24 | return 0; | ||
| 25 | } | ||
| 26 | |||
| 27 | - /* | ||
| 28 | - * For merged snapshot and clustered VG activate cow LV so | ||
| 29 | - * the following call to deactivate_lv() can clean-up table | ||
| 30 | - * entries. For this clustered lock need to be held. | ||
| 31 | - */ | ||
| 32 | - if (vg_is_clustered(cow->vg) && | ||
| 33 | - merging_snapshot && !activate_lv(cow->vg->cmd, cow)) { | ||
| 34 | + if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) { | ||
| 35 | log_error("Failed to activate %s.", cow->name); | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | -- | ||
| 39 | 2.21.0 | ||
| 40 | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.03.05.bb b/meta-oe/recipes-support/lvm2/lvm2_2.03.06.bb index b80f1fd4bb..e2b551bbc6 100644 --- a/meta-oe/recipes-support/lvm2/lvm2_2.03.05.bb +++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.06.bb | |||
| @@ -3,10 +3,6 @@ require lvm2.inc | |||
| 3 | SRC_URI += " \ | 3 | SRC_URI += " \ |
| 4 | file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ | 4 | file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ |
| 5 | file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ | 5 | file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ |
| 6 | file://0001-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch \ | ||
| 7 | file://0001-activation-add-synchronization-point.patch \ | ||
| 8 | file://0002-activation-extend-handling-of-pending_delete.patch \ | ||
| 9 | file://0003-snapshot-always-activate.patch \ | ||
| 10 | " | 6 | " |
| 11 | 7 | ||
| 12 | DEPENDS += "autoconf-archive-native" | 8 | DEPENDS += "autoconf-archive-native" |
