All of lore.kernel.org
 help / color / mirror / Atom feed
* master - lvmdiskscan: use the new label_scan
@ 2018-04-23 13:54 David Teigland
  0 siblings, 0 replies; 2+ messages in thread
From: David Teigland @ 2018-04-23 13:54 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=96a61337b00a250f69e7a8e6ac390c47c36c2c0f
Commit:        96a61337b00a250f69e7a8e6ac390c47c36c2c0f
Parent:        28255e3eeef13a0e73a40d533623b22dd9db89cb
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Wed Feb 14 16:43:26 2018 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Apr 20 11:22:46 2018 -0500

lvmdiskscan: use the new label_scan

instead of doing it's own.
---
 tools/lvmdiskscan.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/lvmdiskscan.c b/tools/lvmdiskscan.c
index cb688b5..7e2fc88 100644
--- a/tools/lvmdiskscan.c
+++ b/tools/lvmdiskscan.c
@@ -87,7 +87,6 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),
 	uint64_t size;
 	struct dev_iter *iter;
 	struct device *dev;
-	struct label *label;
 
 	/* initialise these here to avoid problems with the lvm shell */
 	disks_found = 0;
@@ -105,10 +104,10 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),
 		return ECMD_FAILED;
 	}
 
-	/* Do scan */
+	label_scan(cmd);
+
 	for (dev = dev_iter_get(iter); dev; dev = dev_iter_get(iter)) {
-		/* Try if it is a PV first */
-		if ((label_read(dev, &label, UINT64_C(0)))) {
+		if (lvmcache_has_dev_info(dev)) {
 			if (!dev_get_size(dev, &size)) {
 				log_error("Couldn't get size of \"%s\"",
 					  dev_name(dev));



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* master - lvmdiskscan: use the new label_scan
@ 2018-04-23 13:50 David Teigland
  0 siblings, 0 replies; 2+ messages in thread
From: David Teigland @ 2018-04-23 13:50 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=96a61337b00a250f69e7a8e6ac390c47c36c2c0f
Commit:        96a61337b00a250f69e7a8e6ac390c47c36c2c0f
Parent:        28255e3eeef13a0e73a40d533623b22dd9db89cb
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Wed Feb 14 16:43:26 2018 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Apr 20 11:22:46 2018 -0500

lvmdiskscan: use the new label_scan

instead of doing it's own.
---
 tools/lvmdiskscan.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/lvmdiskscan.c b/tools/lvmdiskscan.c
index cb688b5..7e2fc88 100644
--- a/tools/lvmdiskscan.c
+++ b/tools/lvmdiskscan.c
@@ -87,7 +87,6 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),
 	uint64_t size;
 	struct dev_iter *iter;
 	struct device *dev;
-	struct label *label;
 
 	/* initialise these here to avoid problems with the lvm shell */
 	disks_found = 0;
@@ -105,10 +104,10 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),
 		return ECMD_FAILED;
 	}
 
-	/* Do scan */
+	label_scan(cmd);
+
 	for (dev = dev_iter_get(iter); dev; dev = dev_iter_get(iter)) {
-		/* Try if it is a PV first */
-		if ((label_read(dev, &label, UINT64_C(0)))) {
+		if (lvmcache_has_dev_info(dev)) {
 			if (!dev_get_size(dev, &size)) {
 				log_error("Couldn't get size of \"%s\"",
 					  dev_name(dev));



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-23 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 13:54 master - lvmdiskscan: use the new label_scan David Teigland
  -- strict thread matches above, loose matches on Subject: below --
2018-04-23 13:50 David Teigland

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.