1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

thin: correct ptr test for thin snapshot merging

The correct test needs to actually check  'lv->snapshot' is not NULL,
so the 'find_snapshot()' can work.

Test lv_is_snapshot was actually irrelavant for this case.

Also initialize device_id.
This commit is contained in:
Zdenek Kabelac 2021-03-09 16:23:08 +01:00
parent b2616cd456
commit 413a114cdb

View File

@ -174,9 +174,9 @@ progress_t poll_thin_merge_progress(struct cmd_context *cmd,
const char *name __attribute__((unused)), const char *name __attribute__((unused)),
struct daemon_parms *parms) struct daemon_parms *parms)
{ {
uint32_t device_id; uint32_t device_id = 0;
if (!lv_thin_device_id(lv, &device_id) && !lv_is_snapshot(lv)) { if (!lv_thin_device_id(lv, &device_id) || !lv->snapshot) {
stack; stack;
return PROGRESS_CHECK_FAILED; return PROGRESS_CHECK_FAILED;
} }