mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: remove lvmcache_has_bad_metadata
This commit is contained in:
parent
adfa16c899
commit
fb80ed3143
15
lib/cache/lvmcache.c
vendored
15
lib/cache/lvmcache.c
vendored
@ -191,21 +191,6 @@ static void _destroy_device_list(struct dm_list *head)
|
|||||||
dm_list_init(head);
|
dm_list_init(head);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lvmcache_has_bad_metadata(struct device *dev)
|
|
||||||
{
|
|
||||||
struct lvmcache_info *info;
|
|
||||||
|
|
||||||
if (!(info = lvmcache_info_from_pvid(dev->pvid, dev, 0))) {
|
|
||||||
/* shouldn't happen */
|
|
||||||
log_error("No lvmcache info for checking bad metadata on %s", dev_name(dev));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (info->mda1_bad || info->mda2_bad)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lvmcache_save_bad_mda(struct lvmcache_info *info, struct metadata_area *mda)
|
void lvmcache_save_bad_mda(struct lvmcache_info *info, struct metadata_area *mda)
|
||||||
{
|
{
|
||||||
if (mda->mda_num == 1)
|
if (mda->mda_num == 1)
|
||||||
|
2
lib/cache/lvmcache.h
vendored
2
lib/cache/lvmcache.h
vendored
@ -186,8 +186,6 @@ int lvmcache_vginfo_has_pvid(struct lvmcache_vginfo *vginfo, const char *pvid_ar
|
|||||||
uint64_t lvmcache_max_metadata_size(void);
|
uint64_t lvmcache_max_metadata_size(void);
|
||||||
void lvmcache_save_metadata_size(uint64_t val);
|
void lvmcache_save_metadata_size(uint64_t val);
|
||||||
|
|
||||||
bool lvmcache_has_bad_metadata(struct device *dev);
|
|
||||||
|
|
||||||
bool lvmcache_has_old_metadata(struct cmd_context *cmd, const char *vgname, const char *vgid, struct device *dev);
|
bool lvmcache_has_old_metadata(struct cmd_context *cmd, const char *vgname, const char *vgid, struct device *dev);
|
||||||
|
|
||||||
void lvmcache_get_outdated_devs(struct cmd_context *cmd,
|
void lvmcache_get_outdated_devs(struct cmd_context *cmd,
|
||||||
|
Loading…
Reference in New Issue
Block a user