All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - lvmcache_get_mda: remove unused function
Date: Tue, 21 Apr 2020 19:51:04 +0000 (GMT)	[thread overview]
Message-ID: <20200421195104.7D019384B0C1@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3854931aea09b1ccd56a79ea53521be1287ff3a9
Commit:        3854931aea09b1ccd56a79ea53521be1287ff3a9
Parent:        2aa36209eb0087228391b9b01b6f03a6875bad9f
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Mon Jan 27 13:15:27 2020 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Tue Apr 21 10:58:05 2020 -0500

lvmcache_get_mda: remove unused function

---
 lib/cache/lvmcache.c | 30 ------------------------------
 lib/cache/lvmcache.h |  5 -----
 2 files changed, 35 deletions(-)

diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 2c8c614d7..2a52230b5 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -2567,36 +2567,6 @@ int lvmcache_vginfo_has_pvid(struct lvmcache_vginfo *vginfo, char *pvid)
 	return 0;
 }
 
-struct metadata_area *lvmcache_get_mda(struct cmd_context *cmd,
-				       const char *vgname,
-				       struct device *dev,
-				       int use_mda_num)
-{
-	struct lvmcache_vginfo *vginfo;
-	struct lvmcache_info *info;
-	struct metadata_area *mda;
-
-	if (!use_mda_num)
-		use_mda_num = 1;
-
-	if (!(vginfo = lvmcache_vginfo_from_vgname(vgname, NULL)))
-		return NULL;
-
-	dm_list_iterate_items(info, &vginfo->infos) {
-		if (info->dev != dev)
-			continue;
-
-		dm_list_iterate_items(mda, &info->mdas) {
-			if ((use_mda_num == 1) && (mda->status & MDA_PRIMARY))
-				return mda;
-			if ((use_mda_num == 2) && !(mda->status & MDA_PRIMARY))
-				return mda;
-		}
-		return NULL;
-	}
-	return NULL;
-}
-
 /*
  * This is used by the metadata repair command to check if
  * the metadata on a dev needs repair because it's old.
diff --git a/lib/cache/lvmcache.h b/lib/cache/lvmcache.h
index 0c8c78909..2416fe741 100644
--- a/lib/cache/lvmcache.h
+++ b/lib/cache/lvmcache.h
@@ -161,11 +161,6 @@ struct device *lvmcache_device(struct lvmcache_info *info);
 unsigned lvmcache_mda_count(struct lvmcache_info *info);
 uint64_t lvmcache_smallest_mda_size(struct lvmcache_info *info);
 
-struct metadata_area *lvmcache_get_mda(struct cmd_context *cmd,
-                                      const char *vgname,
-                                      struct device *dev,
-                                      int use_mda_num);
-
 bool lvmcache_has_duplicate_devs(void);
 void lvmcache_del_dev_from_duplicates(struct device *dev);
 bool lvmcache_dev_is_unused_duplicate(struct device *dev);




                 reply	other threads:[~2020-04-21 19:51 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=20200421195104.7D019384B0C1@sourceware.org \
    --to=teigland@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.