All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: stable-2.02 - label: use open_rw
Date: Sun, 18 Oct 2020 21:02:23 +0000 (GMT)	[thread overview]
Message-ID: <20201018210223.8EC2A3858D35@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ba7740df50e93d9a7a2ec919511ba2541e9cc52c
Commit:        ba7740df50e93d9a7a2ec919511ba2541e9cc52c
Parent:        8792d417f3bcec4b9142234786c9a8d9474db3ae
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Sun Oct 18 00:25:33 2020 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Sun Oct 18 21:26:38 2020 +0200

label: use open_rw

Add missing declaration for label_scan_open_rw()
which has been already introduced without declaration
and use it for wiping LV.
---
 lib/label/label.h       | 2 ++
 lib/metadata/lv_manip.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/label/label.h b/lib/label/label.h
index ea29c84ee..e4da686f8 100644
--- a/lib/label/label.h
+++ b/lib/label/label.h
@@ -118,6 +118,8 @@ void label_scan_confirm(struct device *dev);
 int label_scan_setup_bcache(void);
 int label_scan_open(struct device *dev);
 int label_scan_open_excl(struct device *dev);
+int label_scan_open_rw(struct device *dev);
+
 int label_scan_pvscan_all(struct cmd_context *cmd, struct dm_list *scan_devs);
 
 /*
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index e4ea30d12..0751a7a2b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -7219,7 +7219,7 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
 		return 0;
 	}
 
-	if (!label_scan_open(dev)) {
+	if (!label_scan_open_rw(dev)) {
 		log_error("Failed to open %s/%s for wiping and zeroing.", lv->vg->name, lv->name);
 		goto out;
 	}



                 reply	other threads:[~2020-10-18 21:02 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=20201018210223.8EC2A3858D35@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.