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

metadata: add comment about negative impact of rounding

This commit is contained in:
David Teigland 2018-09-20 14:15:49 -05:00
parent 30c94b0324
commit 09131e3922

View File

@ -486,7 +486,20 @@ static struct raw_locn *_read_metadata_location_vg(struct device_area *dev_area,
/* /*
* Determine offset for new metadata * 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) 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; uint64_t next_start;