mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: check for overflown pool earlier
Check for pool early before we actually start to modify metadata. This requires locally active thin-pool.
This commit is contained in:
parent
5695c6aca6
commit
c7b4359ff4
@ -1,5 +1,6 @@
|
||||
Version 2.02.133 -
|
||||
======================================
|
||||
Check for enough space in thin-pool in command before creating new thin.
|
||||
Make libblkid detect all copies of the same signature if use_blkid_wiping=1.
|
||||
Fix vgimportclone with -n to not add number unnecessarily to base VG name.
|
||||
Cleanup vgimportclone script and remove dependency on awk, grep, cut and tr.
|
||||
|
@ -7087,12 +7087,18 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
}
|
||||
}
|
||||
|
||||
if (seg_is_thin_volume(lp) &&
|
||||
lv_is_new_thin_pool(pool_lv)) {
|
||||
thin_pool_was_active = lv_is_active(pool_lv);
|
||||
if (!check_new_thin_pool(pool_lv))
|
||||
return_NULL;
|
||||
/* New pool is now inactive */
|
||||
if (seg_is_thin_volume(lp)) {
|
||||
if (lv_is_new_thin_pool(pool_lv)) {
|
||||
thin_pool_was_active = lv_is_active(pool_lv);
|
||||
if (!check_new_thin_pool(pool_lv))
|
||||
return_NULL;
|
||||
/* New pool is now inactive */
|
||||
} else if (!pool_below_threshold(first_seg(pool_lv))) {
|
||||
log_error("Cannot create new thin volume, free space in "
|
||||
"thin pool %s reached threshold.",
|
||||
display_lvname(pool_lv));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (seg_is_cache(lp) &&
|
||||
|
Loading…
Reference in New Issue
Block a user