1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

vdo: skip zeroing for VDO LV

Since VDO is always returns 'zero' on unprovisioned read
and every provisioned block is always 'zeroed' on partial writes,
we can avoid 'zeroing' of such LVs.
This commit is contained in:
Zdenek Kabelac 2021-08-26 23:04:56 +02:00
parent 62c599f781
commit 88360b0c51

View File

@ -8073,6 +8073,10 @@ static int _should_wipe_lv(struct lvcreate_params *lp,
first_seg(first_seg(lv)->pool_lv)->zero_new_blocks))
return 0;
/* VDO LV do not need to be zeroed */
if (lv_is_vdo(lv))
return 0;
if (warn && (lv_passes_readonly_filter(lv))) {
log_warn("WARNING: Read-only activated logical volume %s not zeroed.",
display_lvname(lv));