mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: not zeroing for non-zeroed thin pool snaps
Do not zero initial 4KB of thin snapshot volume for thin pool with disabled zeroing.
This commit is contained in:
parent
d00d45a8b6
commit
5597dc3652
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Do not zero init 4KB of thin snapshot for non-zeroing thin pool (2.02.94).
|
||||
Issue an error msg if lvconvert --type used incorrectly with other options.
|
||||
Use LOG_DEBUG/ERR msg severity instead default for lvm2-activation-generator.
|
||||
Support ARG_GROUPABLE with merge_synonym (for --raidwritemostly).
|
||||
|
@ -5829,7 +5829,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
|
||||
if (!seg_is_thin(lp) && !lp->zero && !lp->snapshot)
|
||||
log_warn("WARNING: \"%s\" not zeroed", lv->name);
|
||||
else if ((!seg_is_thin(lp) ||
|
||||
(lv_is_thin_volume(lv) &&
|
||||
(lv_is_thin_volume(lv) && !lp->snapshot &&
|
||||
!first_seg(first_seg(lv)->pool_lv)->zero_new_blocks)) &&
|
||||
!set_lv(cmd, lv, UINT64_C(0), 0)) {
|
||||
log_error("Aborting. Failed to wipe %s.",
|
||||
|
@ -54,4 +54,11 @@ lvcreate -K -s --name sn2 $vg/sn1
|
||||
lvcreate -K -s --name sn3 $vg/sn2
|
||||
lvcreate -K -s --name sn4 $vg/sn3
|
||||
|
||||
lvremove -ff $vg
|
||||
|
||||
lvcreate -L10M --zero n -T $vg/pool -V10M --name $lv1
|
||||
mkfs.ext4 $DM_DEV_DIR/$vg/$lv1
|
||||
lvcreate -K -s $vg/$lv1 --name snap
|
||||
fsck -p $DM_DEV_DIR/$vg/snap
|
||||
|
||||
vgremove -ff $vg
|
||||
|
Loading…
Reference in New Issue
Block a user