From 09131e3922ffbea35733aecbc538cdbf415b43ac Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 20 Sep 2018 14:15:49 -0500 Subject: [PATCH] metadata: add comment about negative impact of rounding --- lib/format_text/format-text.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 04a3a8d48..e987849d5 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -486,7 +486,20 @@ static struct raw_locn *_read_metadata_location_vg(struct device_area *dev_area, /* * Determine offset for new metadata + * + * Adjusting new offsets to begin on 512 boundaries is fairly new, and metadata + * previously begain immediately after the old, without rounding up. The + * rounding should have no practical benefit since it does not affect the + * actual disk io. + * + * FIXME: The rounding can have a negative effect: when the current metadata + * text size is just below the max, a command to remove something, that + * *reduces* the text metadata size, can still be rejected for being too large, + * even though it's smaller than the current size. In this case, the user + * would need to find something in the VG to remove that uses more text space + * to compensate for the increase due to rounding. */ + static uint64_t _next_rlocn_offset(struct raw_locn *rlocn_old, uint64_t old_last, struct mda_header *mdah, uint64_t mdac_area_start, uint64_t alignment) { uint64_t next_start;