mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Wipe initial 4KiB for non-zeroed thin volumes
If the thin pool has disabled zeroing (created with -Zn), we at least clear initial 4KiB of such thin volume (provisions 1st block). If lvcreate is executed with '-an' command will abort (same way like we for normal LV - however for normal LV option -Zn may skip clearing completely, for thin volumes this option is not supported (applies only for pools).
This commit is contained in:
parent
62e38da133
commit
24ab6328f7
@ -1,5 +1,6 @@
|
||||
Version 2.02.94 -
|
||||
====================================
|
||||
Use set_lv() (wipe initial 4KiB) for non zeroed thin volume.
|
||||
Allow cluster mirrors to handle the absence of the checkpoint lib (libSaCkpt).
|
||||
Revert free of allocated segtype in init segment error path (2.02.89).
|
||||
Test dm_hash_insert() failures in filter-persistent.c and fid_add_mda().
|
||||
|
@ -4457,7 +4457,10 @@ 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) && !set_lv(cmd, lv, UINT64_C(0), 0)) {
|
||||
else if ((!seg_is_thin(lp) ||
|
||||
(lv_is_thin_volume(lv) &&
|
||||
!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.",
|
||||
lp->snapshot ? "snapshot exception store" :
|
||||
"start of new LV");
|
||||
|
Loading…
Reference in New Issue
Block a user