1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-24 14:50:34 +03:00

snapshot: create origin of virtual snap read only

When creating old fashioned way thick virtual snapshot,
use read-only 'zero' _vorigin device.
This commit is contained in:
Zdenek Kabelac 2021-02-09 22:31:31 +01:00
parent 96910de4c7
commit 3cc9efc0ed

View File

@ -8747,7 +8747,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
/* Create zero origin volume for spare snapshot */
if (lp->virtual_extents &&
!(origin_lv = _create_virtual_origin(cmd, vg, lv->name,
lp->permission,
(lp->permission & ~LVM_WRITE),
lp->virtual_extents)))
goto revert_new_lv;