All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - vdo: skip zeroing for VDO LV
Date: Tue, 31 Aug 2021 20:06:06 +0000 (GMT)	[thread overview]
Message-ID: <20210831200606.E488E3858C27@sourceware.org> (raw)

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));



                 reply	other threads:[~2021-08-31 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210831200606.E488E3858C27@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.