]> sourceware.org Git - lvm2.git/commitdiff
metadata: remove an unused and incorrect overflow check
authorDavid Teigland <teigland@redhat.com>
Thu, 20 Sep 2018 18:53:50 +0000 (13:53 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 20 Sep 2018 18:53:50 +0000 (13:53 -0500)
Remove another instance of an invalid check for metadata
overflow during read.  The previous instance was removed
in commit 5fb15b193.

This was checking for metadata that that overflowed the
circular disk metadata buffer during read, but such metadata
cannot be written, so it shouldn't be possible to find see.
Also, the check was incorrect and could trigger when there
was no overflow.

lib/format_text/format-text.c

index 7857091feb2dc7e61f57ef12de2662d09d396d93..04a3a8d485f2beab3ef0974dd049341a2bc7acec 100644 (file)
@@ -567,14 +567,6 @@ static struct volume_group *_vg_read_raw_area(struct format_instance *fid,
        if (rlocn->offset + rlocn->size > mdah->size)
                wrap = (uint32_t) ((rlocn->offset + rlocn->size) - mdah->size);
 
-       if (wrap > rlocn->offset) {
-               log_error("Metadata for VG %s on %s at %llu size %llu is too large for circular buffer.",
-                         vgname, dev_name(area->dev),
-                         (unsigned long long)(area->start + rlocn->offset),
-                         (unsigned long long)rlocn->size);
-               goto out;
-       }
-
        vg = text_read_metadata(fid, NULL, vg_fmtdata, use_previous_vg, area->dev, primary_mda,
                                (off_t) (area->start + rlocn->offset),
                                (uint32_t) (rlocn->size - wrap),
This page took 0.056552 seconds and 5 git commands to generate.