1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +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 02978e1f01
commit dee104668e

View File

@ -8273,7 +8273,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;