1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

label: Remove unused verify functions.

label_verify has never been used so remove it.
This commit is contained in:
Alasdair G Kergon 2017-11-28 01:36:55 +00:00
parent 02e934c444
commit a9812ec9d3
6 changed files with 1 additions and 36 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
Remove label_verify that has never been used.
Ensure very large numbers used as arguments are not casted to lower values.
Enhance reading and validation of options stripes and stripes_size.
Fix printing of default stripe size when user is not using stripes.

View File

@ -109,7 +109,6 @@ struct label_ops _lvm1_ops = {
.can_handle = _lvm1_can_handle,
.write = _lvm1_write,
.read = _lvm1_read,
.verify = _lvm1_can_handle,
.initialise_label = _lvm1_initialise_label,
.destroy_label = _lvm1_destroy_label,
.destroy = _lvm1_destroy,

View File

@ -83,7 +83,6 @@ struct label_ops _pool_ops = {
.can_handle = _pool_can_handle,
.write = _pool_write,
.read = _pool_read,
.verify = _pool_can_handle,
.initialise_label = _pool_initialise_label,
.destroy_label = _pool_destroy_label,
.destroy = _label_pool_destroy,

View File

@ -464,7 +464,6 @@ struct label_ops _text_ops = {
.can_handle = _text_can_handle,
.write = _text_write,
.read = _text_read,
.verify = _text_can_handle,
.initialise_label = _text_initialise_label,
.destroy_label = _text_destroy_label,
.destroy = _fmt_text_destroy,

View File

@ -353,33 +353,6 @@ int label_write(struct device *dev, struct label *label)
return r;
}
/* Unused */
int label_verify(struct device *dev)
{
struct labeller *l;
char buf[LABEL_SIZE] __attribute__((aligned(8)));
uint64_t sector;
struct lvmcache_info *info;
int r = 0;
if (!dev_open_readonly(dev)) {
if ((info = lvmcache_info_from_pvid(dev->pvid, dev, 0)))
_update_lvmcache_orphan(info);
return_0;
}
if (!(l = _find_labeller(dev, buf, &sector, UINT64_C(0))))
goto out;
r = l->ops->verify ? l->ops->verify(l, buf, sector) : 1;
out:
if (!dev_close(dev))
stack;
return r;
}
void label_destroy(struct label *label)
{
label->labeller->ops->destroy_label(label->labeller, label);

View File

@ -65,11 +65,6 @@ struct label_ops {
int (*read) (struct labeller * l, struct device * dev,
void *buf, struct label ** label);
/*
* Additional consistency checks for the paranoid.
*/
int (*verify) (struct labeller * l, void *buf, uint64_t sector);
/*
* Populate label_type etc.
*/
@ -102,7 +97,6 @@ int label_remove(struct device *dev);
int label_read(struct device *dev, struct label **result,
uint64_t scan_sector);
int label_write(struct device *dev, struct label *label);
int label_verify(struct device *dev);
struct label *label_create(struct labeller *labeller);
void label_destroy(struct label *label);