1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

writecache: check for invalid cachevol

This commit is contained in:
David Teigland 2020-02-07 10:26:59 -06:00
parent b756cb3e49
commit 744b75f881

View File

@ -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;