diff --git a/WHATS_NEW b/WHATS_NEW index 5937bad0a..4ff8dcbd0 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -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. diff --git a/lib/format1/lvm1-label.c b/lib/format1/lvm1-label.c index f5ce1e892..3b8a655e9 100644 --- a/lib/format1/lvm1-label.c +++ b/lib/format1/lvm1-label.c @@ -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, diff --git a/lib/format_pool/pool_label.c b/lib/format_pool/pool_label.c index 0f1d1f791..2e30a7b19 100644 --- a/lib/format_pool/pool_label.c +++ b/lib/format_pool/pool_label.c @@ -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, diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c index ad323b6d2..6d9cfbdd6 100644 --- a/lib/format_text/text_label.c +++ b/lib/format_text/text_label.c @@ -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, diff --git a/lib/label/label.c b/lib/label/label.c index 0e9951767..7a7c50021 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -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, §or, 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); diff --git a/lib/label/label.h b/lib/label/label.h index cd6e5b78e..ea1129019 100644 --- a/lib/label/label.h +++ b/lib/label/label.h @@ -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);