All of lore.kernel.org
 help / color / mirror / Atom feed
* main - vdo: skip zeroing for VDO LV
@ 2021-08-31 20:06 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2021-08-31 20:06 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=88360b0c512d96dfe05c11362ff389ef6bfec6b4
Commit:        88360b0c512d96dfe05c11362ff389ef6bfec6b4
Parent:        62c599f78151e65105c92c87ac406e3f3f360b1a
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Thu Aug 26 23:04:56 2021 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue Aug 31 22:05:47 2021 +0200

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.
---
 lib/metadata/lv_manip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index a26d3d533..730e3f0df 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -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));



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-31 20:06 main - vdo: skip zeroing for VDO LV Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.