diff options
author | David Teigland <teigland@redhat.com> | 2020-02-07 10:26:59 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2020-02-07 10:26:59 -0600 |
commit | 744b75f88158156f7d8ffe6c2bc5af9856e63258 (patch) | |
tree | 152eb53063e6df38de30f3e8bfba4c63a5ee66f8 | |
parent | b756cb3e49b762b3a5160f9748aeb5bf995ae80e (diff) | |
download | lvm2-744b75f88158156f7d8ffe6c2bc5af9856e63258.tar.gz |
writecache: check for invalid cachevol
-rw-r--r-- | tools/lvconvert.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c index a83b019ae..a1fb8c1df 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -5578,6 +5578,11 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd, goto bad; } + if (lv_fast == lv) { + log_error("Invalid cachevol LV."); + goto bad; + } + if (!seg_is_linear(first_seg(lv_fast))) { log_error("LV %s must be linear to use as a writecache.", display_lvname(lv_fast)); goto bad; |