master - cleanup: drop extra cmd passed arg
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7b5a8f61a79c88...
Commit: 7b5a8f61a79c88e9a99f3cec590163a143e70237
Parent: b64703401da1f4bef60579a0b3766c087fcfe96a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 18 23:24:32 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: drop extra cmd passed arg
Use vg->cmd when needed cmd struct.
---
lib/metadata/lv_manip.c | 55 ++++++++++++++++++++++------------------------
1 files changed, 26 insertions(+), 29 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 4507f8e..b67a2b7 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4273,14 +4273,13 @@ int lv_rename(struct cmd_context *cmd, struct logical_volume *lv,
#define SIZE_BUF 128
/* TODO: unify stripe size validation across source code */
-static int _validate_stripesize(struct cmd_context *cmd,
- const struct volume_group *vg,
+static int _validate_stripesize(const struct volume_group *vg,
struct lvresize_params *lp)
{
if (lp->ac_stripesize_value > (STRIPE_SIZE_LIMIT * 2)) {
log_error("Stripe size cannot be larger than %s.",
- display_size(cmd, (uint64_t) STRIPE_SIZE_LIMIT));
+ display_size(vg->cmd, (uint64_t) STRIPE_SIZE_LIMIT));
return 0;
}
@@ -4289,8 +4288,8 @@ static int _validate_stripesize(struct cmd_context *cmd,
else if (lp->ac_stripesize_value > vg->extent_size) {
log_print_unless_silent("Reducing stripe size %s to maximum, "
"physical extent size %s.",
- display_size(cmd, lp->ac_stripesize_value),
- display_size(cmd, vg->extent_size));
+ display_size(vg->cmd, lp->ac_stripesize_value),
+ display_size(vg->cmd, vg->extent_size));
lp->stripe_size = vg->extent_size;
} else
lp->stripe_size = lp->ac_stripesize_value;
@@ -4303,14 +4302,13 @@ static int _validate_stripesize(struct cmd_context *cmd,
return 1;
}
-static int _request_confirmation(struct cmd_context *cmd,
- const struct volume_group *vg,
+static int _request_confirmation(const struct volume_group *vg,
const struct logical_volume *lv,
const struct lvresize_params *lp)
{
struct lvinfo info = { 0 };
- if (!lv_info(cmd, lv, 0, &info, 1, 0) && driver_version(NULL, 0)) {
+ if (!lv_info(vg->cmd, lv, 0, &info, 1, 0) && driver_version(NULL, 0)) {
log_error("lv_info failed: aborting");
return 0;
}
@@ -4329,7 +4327,7 @@ static int _request_confirmation(struct cmd_context *cmd,
log_warn("WARNING: Reducing active%s logical volume to %s",
info.open_count ? " and open" : "",
- display_size(cmd, (uint64_t) lp->extents * vg->extent_size));
+ display_size(vg->cmd, (uint64_t) lp->extents * vg->extent_size));
log_warn("THIS MAY DESTROY YOUR DATA (filesystem etc.)");
@@ -4424,9 +4422,9 @@ static int _adjust_amount(dm_percent_t percent, int policy_threshold, int *polic
return 1;
}
-static int _adjust_policy_params(struct cmd_context *cmd,
- struct logical_volume *lv, struct lvresize_params *lp)
+static int _adjust_policy_params(struct logical_volume *lv, struct lvresize_params *lp)
{
+ struct cmd_context *cmd = lv->vg->cmd;
dm_percent_t percent;
int policy_threshold, policy_amount;
@@ -4529,9 +4527,8 @@ static uint32_t lvseg_get_stripes(struct lv_segment *seg, uint32_t *stripesize)
return 0;
}
-static int _lvresize_poolmetadata_prepare(struct cmd_context *cmd,
- struct lvresize_params *lp,
- const struct logical_volume *pool_lv)
+static int _lvresize_poolmetadata_prepare(struct logical_volume *pool_lv,
+ struct lvresize_params *lp)
{
uint32_t extents;
struct logical_volume *lv = first_seg(pool_lv)->metadata_lv;
@@ -4548,7 +4545,7 @@ static int _lvresize_poolmetadata_prepare(struct cmd_context *cmd,
lp->poolmetadatasize += vg->extent_size -
(lp->poolmetadatasize % vg->extent_size);
log_print_unless_silent("Rounding pool metadata size to boundary between physical extents: %s",
- display_size(cmd, lp->poolmetadatasize));
+ display_size(vg->cmd, lp->poolmetadatasize));
}
if (!(extents = extents_from_size(vg->cmd, lp->poolmetadatasize,
@@ -4574,7 +4571,7 @@ static int _lvresize_poolmetadata_prepare(struct cmd_context *cmd,
/* FIXME Split here and move validation code earlier alongside rest of validation code */
if (extents == lv->le_count) {
log_print_unless_silent("Metadata volume %s has already %s.",
- lv->name, display_size(cmd, lv->size));
+ display_lvname(lv), display_size(vg->cmd, lv->size));
return 2;
}
@@ -4583,12 +4580,12 @@ static int _lvresize_poolmetadata_prepare(struct cmd_context *cmd,
return 1;
}
-static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *vg,
+static int _lvresize_poolmetadata(struct logical_volume *pool_lv,
struct lvresize_params *lp,
- const struct logical_volume *pool_lv,
struct dm_list *pvh)
{
struct logical_volume *lv = first_seg(pool_lv)->metadata_lv;
+ struct volume_group *vg = lv->vg;
alloc_policy_t alloc = lp->ac_alloc ? : lv->alloc;
struct lv_segment *mseg = last_seg(lv);
uint32_t seg_mirrors = lv_mirror_count(lv);
@@ -4597,8 +4594,8 @@ static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *
return_0;
log_print_unless_silent("Extending logical volume %s to %s.",
- lv->name,
- display_size(cmd, (uint64_t) lp->poolmetadataextents *
+ display_lvname(lv),
+ display_size(vg->cmd, (uint64_t) lp->poolmetadataextents *
vg->extent_size));
if (!lv_extend(lv,
mseg->segtype,
@@ -4613,7 +4610,7 @@ static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *
return 1;
}
-static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv,
+static int _lvresize_check_lv(struct logical_volume *lv,
struct lvresize_params *lp)
{
struct volume_group *vg = lv->vg;
@@ -4669,7 +4666,7 @@ static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv
return 0;
}
- if (lp->ac_stripesize && !_validate_stripesize(cmd, vg, lp))
+ if (lp->ac_stripesize && !_validate_stripesize(vg, lp))
return_0;
if (lp->ac_stripes) {
@@ -5126,7 +5123,7 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
return 1;
}
-static int _lvresize_check_type(struct cmd_context *cmd, const struct logical_volume *lv,
+static int _lvresize_check_type(const struct logical_volume *lv,
struct lvresize_params *lp)
{
if (lv_is_origin(lv)) {
@@ -5194,7 +5191,7 @@ static struct logical_volume *_lvresize_volume(struct cmd_context *cmd,
/* Request confirmation before operations that are often mistakes. */
if ((lp->resizefs || (lp->resize == LV_REDUCE)) &&
- !_request_confirmation(cmd, vg, lv, lp))
+ !_request_confirmation(vg, lv, lp))
return_NULL;
if (lp->resizefs) {
@@ -5264,10 +5261,10 @@ static struct logical_volume *_lvresize_volume(struct cmd_context *cmd,
int lv_resize_prepare(struct cmd_context *cmd, struct logical_volume *lv,
struct lvresize_params *lp, struct dm_list *pvh)
{
- if (!_lvresize_check_lv(cmd, lv, lp))
+ if (!_lvresize_check_lv(lv, lp))
return_0;
- if (lp->ac_policy && !_adjust_policy_params(cmd, lv, lp))
+ if (lp->ac_policy && !_adjust_policy_params(lv, lp))
return_0;
if (lp->size && !_lvresize_adjust_size(lv->vg, lp->size, lp->sign,
@@ -5285,11 +5282,11 @@ int lv_resize_prepare(struct cmd_context *cmd, struct logical_volume *lv,
lp->poolmetadatasize = 0;
}
- if (lp->extents && !_lvresize_check_type(cmd, lv, lp))
+ if (lp->extents && !_lvresize_check_type(lv, lp))
return_0;
if (lp->poolmetadatasize &&
- !_lvresize_poolmetadata_prepare(cmd, lp, lv))
+ !_lvresize_poolmetadata_prepare(lv, lp))
return_0;
return 1;
@@ -5320,7 +5317,7 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
return_0;
if (lp->poolmetadataextents) {
- if (!_lvresize_poolmetadata(cmd, vg, lp, lv, pvh))
+ if (!_lvresize_poolmetadata(lv, lp, pvh))
return_0;
lock_lv = lv;
}
8 years, 3 months
master - cleanup: relocate size assign
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b64703401da1f4...
Commit: b64703401da1f4bef60579a0b3766c087fcfe96a
Parent: ca878a3426197b629c76e98cfc049948da470cd7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 18 23:22:48 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: relocate size assign
Directly set thin-pool size when thin data LV size changes.
---
lib/metadata/lv_manip.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index b283756..4507f8e 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -1730,7 +1730,7 @@ static int _setup_alloced_segment(struct logical_volume *lv, uint64_t status,
uint32_t region_size)
{
uint32_t s, extents, area_multiple;
- struct lv_segment *seg;
+ struct lv_segment *seg, *thin_pool_seg;
area_multiple = _calc_area_multiple(segtype, area_count, 0);
extents = aa[0].len * area_multiple;
@@ -1753,6 +1753,15 @@ static int _setup_alloced_segment(struct logical_volume *lv, uint64_t status,
lv->le_count += extents;
lv->size += (uint64_t) extents * lv->vg->extent_size;
+ if (lv_is_thin_pool_data(lv)) {
+ /* Update thin pool segment from the layered LV */
+ thin_pool_seg = get_only_segment_using_this_lv(lv);
+ thin_pool_seg->lv->le_count =
+ thin_pool_seg->len =
+ thin_pool_seg->area_len = lv->le_count;
+ thin_pool_seg->lv->size = lv->size;
+ }
+
return 1;
}
@@ -5239,11 +5248,6 @@ static struct logical_volume *_lvresize_volume(struct cmd_context *cmd,
display_size(cmd, (uint64_t) lv->le_count * vg->extent_size), lv->le_count);
if (lock_lv) {
- /* Update thin pool segment from the layered LV */
- seg->area_len = lv->le_count;
- seg->len = lv->le_count;
- lock_lv->le_count = lv->le_count;
- lock_lv->size = lv->size;
/* If thin metadata, must suspend thin pool */
} else if (lv_is_thin_pool_metadata(lv)) {
if (!(lock_lv = find_pool_lv(lv)))
8 years, 3 months
master - cleanup: adjust once
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ca878a3426197b...
Commit: ca878a3426197b629c76e98cfc049948da470cd7
Parent: 178cbb580a9c07b777a2abf1e82d250310531e86
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jan 19 11:44:11 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: adjust once
---
lib/metadata/lv_manip.c | 151 +++++++++++++++++++++++------------------------
1 files changed, 73 insertions(+), 78 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 13e088c..b283756 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4680,32 +4680,30 @@ static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv
return 1;
}
-static int _lvresize_adjust_size(struct cmd_context *cmd, struct logical_volume *lv,
- struct lvresize_params *lp)
+static int _lvresize_adjust_size(struct volume_group *vg,
+ uint64_t size, sign_t sign,
+ uint32_t *extents)
{
- struct volume_group *vg = lv->vg;
+ uint32_t extent_size = vg->extent_size;
+ uint32_t adjust;
/*
* First adjust to an exact multiple of extent size.
+ * When changing to an absolute size, we round that size up.
* When extending by a relative amount we round that amount up.
* When reducing by a relative amount we remove at most that amount.
- * When changing to an absolute size, we round that size up.
*/
- if (lp->size) {
- if (lp->size % vg->extent_size) {
- if (lp->sign == SIGN_MINUS)
- lp->size -= lp->size % vg->extent_size;
- else
- lp->size += vg->extent_size -
- (lp->size % vg->extent_size);
+ if ((adjust = (size % extent_size))) {
+ if (sign != SIGN_MINUS) /* not reducing */
+ size += extent_size;
- log_print_unless_silent("Rounding size to boundary between physical extents: %s",
- display_size(cmd, lp->size));
- }
-
- lp->extents = lp->size / vg->extent_size;
+ size -= adjust;
+ log_print_unless_silent("Rounding size to boundary between physical extents: %s.",
+ display_size(vg->cmd, size));
}
+ *extents = size / extent_size;
+
return 1;
}
@@ -4813,7 +4811,7 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
uint32_t physical_extents_used = 0;
uint32_t seg_stripes = 0, seg_stripesize = 0;
uint32_t seg_mirrors = 0;
- struct lv_segment *seg, *mirr_seg;
+ struct lv_segment *seg, *seg_last;
uint32_t sz, str;
uint32_t seg_logical_extents;
uint32_t seg_physical_extents;
@@ -4822,19 +4820,18 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
uint32_t size_rest;
uint32_t existing_logical_extents = lv->le_count;
uint32_t existing_physical_extents, saved_existing_physical_extents;
+ uint32_t existing_extents;
uint32_t seg_size = 0;
uint32_t new_extents;
int reducing = 0;
- if (!_lvresize_extents_from_percent(lv, lp, pvh))
- return_0;
-
if (lv_is_thin_pool(lv))
/* Manipulate the thin data layer underneath */
lv = seg_lv(first_seg(lv), 0);
+ seg_last = last_seg(lv);
/* Use segment type of last segment */
- lp->segtype = last_seg(lv)->segtype;
+ lp->segtype = seg_last->segtype;
/* FIXME Support LVs with mixed segment types */
if (lp->segtype != get_segtype_from_string(cmd, lp->ac_type ? : lp->segtype->name)) {
@@ -4849,17 +4846,17 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
lp->extents_are_pes = 0;
}
+ existing_extents = (lp->extents_are_pes)
+ ? existing_physical_extents : existing_logical_extents;
+
/* Initial decision on whether we are extending or reducing */
if (lp->sign == SIGN_MINUS ||
- (lp->sign == SIGN_NONE &&
- ((lp->extents_are_pes && lp->extents < existing_physical_extents) ||
- (!lp->extents_are_pes && lp->extents < existing_logical_extents))))
+ (lp->sign == SIGN_NONE && (lp->extents < existing_extents)))
reducing = 1;
/* If extending, find properties of last segment */
if (!reducing) {
- mirr_seg = last_seg(lv);
- seg_mirrors = seg_is_mirrored(mirr_seg) ? lv_mirror_count(mirr_seg->lv) : 0;
+ seg_mirrors = seg_is_mirrored(seg_last) ? lv_mirror_count(lv) : 0;
if (!lp->ac_mirrors && seg_mirrors) {
log_print_unless_silent("Extending %" PRIu32 " mirror images.", seg_mirrors);
@@ -4872,21 +4869,21 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
return 0;
}
- if (seg_is_raid10(mirr_seg)) {
+ if (seg_is_raid10(seg_last)) {
if (!seg_mirrors) {
log_error(INTERNAL_ERROR "Missing mirror segments for %s.",
display_lvname(lv));
return 0;
}
/* FIXME Warn if command line values are being overridden? */
- lp->stripes = mirr_seg->area_count / seg_mirrors;
- lp->stripe_size = mirr_seg->stripe_size;
+ lp->stripes = seg_last->area_count / seg_mirrors;
+ lp->stripe_size = seg_last->stripe_size;
} else if (!(lp->stripes == 1 || (lp->stripes > 1 && lp->stripe_size))) {
/* If extending, find stripes, stripesize & size of last segment */
/* FIXME Don't assume mirror seg will always be AREA_LV */
/* FIXME We will need to support resize for metadata LV as well,
* and data LV could be any type (i.e. mirror)) */
- dm_list_iterate_items(seg, seg_mirrors ? &seg_lv(mirr_seg, 0)->segments : &lv->segments) {
+ dm_list_iterate_items(seg, seg_mirrors ? &seg_lv(seg_last, 0)->segments : &lv->segments) {
/* Allow through "striped" and RAID 4/5/6/10 */
if (!seg_is_striped(seg) &&
(!seg_is_raid(seg) || seg_is_mirrored(seg)) &&
@@ -4931,35 +4928,61 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
}
}
+ if (lp->stripes > 1 && !lp->stripe_size) {
+ log_error("Stripesize for striped segment should not be 0!");
+ return 0;
+ }
+
/* Determine the amount to extend by */
if (lp->sign == SIGN_PLUS)
seg_size = lp->extents;
- else if (lp->extents_are_pes)
- seg_size = lp->extents - existing_physical_extents;
else
- seg_size = lp->extents - existing_logical_extents;
+ seg_size = lp->extents - existing_extents;
/* Convert PEs to LEs */
- if (lp->extents_are_pes && !seg_is_striped(last_seg(lv)) && !seg_is_virtual(last_seg(lv))) {
- area_multiple = _calc_area_multiple(last_seg(lv)->segtype, last_seg(lv)->area_count, 0);
- seg_size = seg_size * area_multiple / (last_seg(lv)->area_count - last_seg(lv)->segtype->parity_devs);
+ if (lp->extents_are_pes && !seg_is_striped(seg_last) && !seg_is_virtual(seg_last)) {
+ area_multiple = _calc_area_multiple(seg_last->segtype, seg_last->area_count, 0);
+ seg_size = seg_size * area_multiple / (seg_last->area_count - seg_last->segtype->parity_devs);
seg_size = (seg_size / area_multiple) * area_multiple;
}
- }
- /* If reducing, find stripes, stripesize & size of last segment */
- if (reducing) {
- if (lp->stripes || lp->stripe_size || lp->mirrors)
+ if (seg_size >= (MAX_EXTENT_COUNT - existing_logical_extents)) {
+ log_error("Unable to extend %s by %u logical extents: exceeds limit (%u).",
+ lp->lv_name, seg_size, MAX_EXTENT_COUNT);
+ return 0;
+ }
+
+ lp->extents = existing_logical_extents + seg_size;
+
+ /* Don't allow a cow to grow larger than necessary. */
+ if (lv_is_cow(lv)) {
+ logical_extents_used = cow_max_extents(origin_from_cow(lv), find_snapshot(lv)->chunk_size);
+ if (logical_extents_used < lp->extents) {
+ log_print_unless_silent("Reached maximum COW size %s (%" PRIu32 " extents).",
+ display_size(vg->cmd, (uint64_t) vg->extent_size * logical_extents_used),
+ logical_extents_used);
+ lp->extents = logical_extents_used; // CHANGES lp->extents
+ seg_size = lp->extents - existing_logical_extents; // Recalculate
+ if (lp->extents == existing_logical_extents) {
+ /* Signal that normal resizing is not required */
+ lp->sizeargs = 0;
+ return 1;
+ }
+ }
+ }
+ } else { /* If reducing, find stripes, stripesize & size of last segment */
+ if (lp->stripes || lp->stripe_size || lp->mirrors) {
+ lp->stripes = lp->stripe_size = lp->mirrors = 0;
log_print_unless_silent("Ignoring stripes, stripesize and mirrors "
"arguments when reducing.");
+ }
if (lp->sign == SIGN_MINUS) {
- new_extents = lp->extents_are_pes ? existing_physical_extents : existing_logical_extents;
- if (lp->extents >= new_extents) {
+ if (lp->extents >= existing_extents) {
log_error("Unable to reduce %s below 1 extent.", lp->lv_name);
return 0;
}
- new_extents -= lp->extents;
+ new_extents = existing_extents - lp->extents;
} else
new_extents = lp->extents;
@@ -4999,37 +5022,6 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
lp->mirrors = seg_mirrors;
}
- if (lp->stripes > 1 && !lp->stripe_size) {
- log_error("Stripesize for striped segment should not be 0!");
- return 0;
- }
-
- if (!reducing) {
- if (seg_size >= (MAX_EXTENT_COUNT - existing_logical_extents)) {
- log_error("Unable to extend %s by %u logical extents: exceeds limit (%u).",
- lp->lv_name, seg_size, MAX_EXTENT_COUNT);
- return 0;
- }
- lp->extents = existing_logical_extents + seg_size;
-
- /* Don't allow a cow to grow larger than necessary. */
- if (lv_is_cow(lv)) {
- logical_extents_used = cow_max_extents(origin_from_cow(lv), find_snapshot(lv)->chunk_size);
- if (logical_extents_used < lp->extents) {
- log_print_unless_silent("Reached maximum COW size %s (%" PRIu32 " extents).",
- display_size(vg->cmd, (uint64_t) vg->extent_size * logical_extents_used),
- logical_extents_used);
- lp->extents = logical_extents_used; // CHANGES lp->extents
- seg_size = lp->extents - existing_logical_extents; // Recalculate
- if (lp->extents == existing_logical_extents) {
- /* Signal that normal resizing is not required */
- lp->sizeargs = 0;
- return 1;
- }
- }
- }
- }
-
/* At this point, lp->extents should hold the correct NEW logical size required. */
if (!lp->extents) {
@@ -5274,10 +5266,13 @@ int lv_resize_prepare(struct cmd_context *cmd, struct logical_volume *lv,
if (lp->ac_policy && !_adjust_policy_params(cmd, lv, lp))
return_0;
- if (!_lvresize_adjust_size(cmd, lv, lp))
+ if (lp->size && !_lvresize_adjust_size(lv->vg, lp->size, lp->sign,
+ &lp->extents))
+ return_0;
+ else if (lp->extents && !_lvresize_extents_from_percent(lv, lp, pvh))
return_0;
- if (lp->sizeargs && !_lvresize_adjust_extents(cmd, lv, lp, pvh))
+ if (lp->extents && !_lvresize_adjust_extents(cmd, lv, lp, pvh))
return_0;
if ((lp->extents == lv->le_count) && lp->ac_policy) {
@@ -5286,7 +5281,7 @@ int lv_resize_prepare(struct cmd_context *cmd, struct logical_volume *lv,
lp->poolmetadatasize = 0;
}
- if (lp->sizeargs && !_lvresize_check_type(cmd, lv, lp))
+ if (lp->extents && !_lvresize_check_type(cmd, lv, lp))
return_0;
if (lp->poolmetadatasize &&
@@ -5316,7 +5311,7 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
if (!lockd_lv(cmd, lv, "ex", 0))
return_0;
- if (lp->sizeargs &&
+ if (lp->extents &&
!(lock_lv = _lvresize_volume(cmd, lv, lp, pvh)))
return_0;
8 years, 3 months
master - cleanup: update check function
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=178cbb580a9c07...
Commit: 178cbb580a9c07b777a2abf1e82d250310531e86
Parent: 4b9ae55a8d691eb15d34dce74f00230bd2423c5b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jan 15 14:41:02 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: update check function
Use display_lvname().
Use lv_is_lockd_sanlock_lv().
Order 'error' checks ahead of 'ignore' ones.
---
lib/metadata/lv_manip.c | 54 ++++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 1975c83..13e088c 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4614,7 +4614,8 @@ static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv
* Since external-origin can be activated read-only,
* there is no way to use extended areas.
*/
- log_error("Cannot resize external origin \"%s\".", lv->name);
+ log_error("Cannot resize external origin logical volume %s.",
+ display_lvname(lv));
return 0;
}
@@ -4626,47 +4627,31 @@ static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv
}
if (lv_is_raid_with_tracking(lv)) {
- log_error("Cannot resize %s while it is tracking a split image",
- lv->name);
+ log_error("Cannot resize logical volume %s while it is "
+ "tracking a split image.", display_lvname(lv));
return 0;
}
- if (lp->ac_stripes) {
- if (vg->fid->fmt->features & FMT_SEGMENTS)
- lp->stripes = lp->ac_stripes_value;
- else
- log_print_unless_silent("Varied striping not supported. Ignoring.");
- }
-
- if (lp->ac_mirrors) {
- if (vg->fid->fmt->features & FMT_SEGMENTS)
- lp->mirrors = lp->ac_mirrors_value;
- else
- log_print_unless_silent("Mirrors not supported. Ignoring.");
- }
-
- if (lp->ac_stripesize && !_validate_stripesize(cmd, vg, lp))
- return_0;
-
if (lp->ac_policy && !lv_is_cow(lv) && !lv_is_thin_pool(lv)) {
log_error("Policy-based resize is supported only for snapshot and thin pool volumes.");
return 0;
}
- /* FIXME: use a status flag instead of the name "lvmlock". */
-
- if (!lv_is_visible(lv) && !lv_is_thin_pool_metadata(lv) && strcmp(lv->name, "lvmlock")) {
- log_error("Can't resize internal logical volume %s", lv->name);
+ if (!lv_is_visible(lv) &&
+ !lv_is_thin_pool_metadata(lv) &&
+ !lv_is_lockd_sanlock_lv(lv)) {
+ log_error("Can't resize internal logical volume %s.", display_lvname(lv));
return 0;
}
if (lv_is_locked(lv)) {
- log_error("Can't resize locked LV %s", lv->name);
+ log_error("Can't resize locked logical volume %s.", display_lvname(lv));
return 0;
}
if (lv_is_converting(lv)) {
- log_error("Can't resize %s while lvconvert in progress", lv->name);
+ log_error("Can't resize logical volume %s while "
+ "lvconvert in progress.", display_lvname(lv));
return 0;
}
@@ -4675,6 +4660,23 @@ static int _lvresize_check_lv(struct cmd_context *cmd, struct logical_volume *lv
return 0;
}
+ if (lp->ac_stripesize && !_validate_stripesize(cmd, vg, lp))
+ return_0;
+
+ if (lp->ac_stripes) {
+ if (!(vg->fid->fmt->features & FMT_SEGMENTS))
+ log_print_unless_silent("Varied striping not supported. Ignoring.");
+ else
+ lp->stripes = lp->ac_stripes_value;
+ }
+
+ if (lp->ac_mirrors) {
+ if (!(vg->fid->fmt->features & FMT_SEGMENTS))
+ log_print_unless_silent("Mirrors not supported. Ignoring.");
+ else
+ lp->mirrors = lp->ac_mirrors_value;
+ }
+
return 1;
}
8 years, 3 months
master - cleanup: shuffle check of threshold
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4b9ae55a8d691e...
Commit: 4b9ae55a8d691eb15d34dce74f00230bd2423c5b
Parent: c99ca6f430eb3650115882b5b6a8f9dde6212b12
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jan 15 14:39:58 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: shuffle check of threshold
Check first threshold and then policy_amount.
---
lib/metadata/lv_manip.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index e0312e3..1975c83 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4445,15 +4445,18 @@ static int _adjust_policy_params(struct cmd_context *cmd,
}
}
- if (!policy_amount && policy_threshold < 100) {
+ if (policy_threshold >= 100) {
+ lp->extents = lp->poolmetadatasize = 0;
+ lp->sizeargs = 0;
+ return 1; /* nothing to do */
+ }
+
+ if (!policy_amount) {
log_error("Can't extend %s with %s autoextend percent set to 0%%.",
display_lvname(lv), first_seg(lv)->segtype->name);
return 0;
}
- if (policy_threshold >= 100)
- return 1; /* nothing to do */
-
if (!lv_is_active_locally(lv)) {
log_error("Can't read state of locally inactive LV %s.",
display_lvname(lv));
8 years, 3 months
master - cleanup: use log_print
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c99ca6f430eb36...
Commit: c99ca6f430eb3650115882b5b6a8f9dde6212b12
Parent: 2da7525c8371a94ee8fe700ff021e3b14dd2fd34
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jan 15 10:35:10 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 20 13:44:47 2016 +0100
cleanup: use log_print
Using log_print for ignoring message instead of log_warn.
Add some missing '.'.
---
lib/metadata/lv_manip.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 7ba52f9..e0312e3 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4269,17 +4269,17 @@ static int _validate_stripesize(struct cmd_context *cmd,
struct lvresize_params *lp)
{
- if ( lp->ac_stripesize_value > STRIPE_SIZE_LIMIT * 2) {
- log_error("Stripe size cannot be larger than %s",
+ if (lp->ac_stripesize_value > (STRIPE_SIZE_LIMIT * 2)) {
+ log_error("Stripe size cannot be larger than %s.",
display_size(cmd, (uint64_t) STRIPE_SIZE_LIMIT));
return 0;
}
if (!(vg->fid->fmt->features & FMT_SEGMENTS))
- log_warn("Varied stripesize not supported. Ignoring.");
+ log_print_unless_silent("Varied stripesize not supported. Ignoring.");
else if (lp->ac_stripesize_value > vg->extent_size) {
log_print_unless_silent("Reducing stripe size %s to maximum, "
- "physical extent size %s",
+ "physical extent size %s.",
display_size(cmd, lp->ac_stripesize_value),
display_size(cmd, vg->extent_size));
lp->stripe_size = vg->extent_size;
@@ -4287,7 +4287,7 @@ static int _validate_stripesize(struct cmd_context *cmd,
lp->stripe_size = lp->ac_stripesize_value;
if (lp->stripe_size & (lp->stripe_size - 1)) {
- log_error("Stripe size must be power of 2");
+ log_error("Stripe size must be power of 2.");
return 0;
}
8 years, 3 months
master - activation: remote node check doesn't work yet
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2da7525c8371a9...
Commit: 2da7525c8371a94ee8fe700ff021e3b14dd2fd34
Parent: 509410bbbcc6fb72e985029e98c19315da36318a
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Jan 20 02:54:11 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Jan 20 02:54:11 2016 +0000
activation: remote node check doesn't work yet
---
lib/activate/activate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index aa24a5f..ac7dacb 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1381,7 +1381,7 @@ static int _lv_is_active(const struct logical_volume *lv,
if (skip_cluster_query)
goto out;
- if ((r = cluster_lock_held(lv->lvid.s, NODE_REMOTE, &e)) >= 0)
+ if ((r = cluster_lock_held(lv->lvid.s, "", &e)) >= 0)
goto out;
/*
8 years, 3 months
master - clvmd: Initialise udev.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=509410bbbcc6fb...
Commit: 509410bbbcc6fb72e985029e98c19315da36318a
Parent: 2304286f68debd4755b44fa8b779b762142bfada
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Jan 20 00:58:09 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Jan 20 00:58:09 2016 +0000
clvmd: Initialise udev.
Since commit 2fc126b00d83991c6a2f3ed9aa61457294a4c45e, the library
code requires udev to be initialised for device scanning and
clvmd can fail to find VGs if devices/external_device_info_source
is set to "udev".
---
WHATS_NEW | 3 ++-
daemons/clvmd/lvm-functions.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index c5db715..6f909ab 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,8 +1,9 @@
Version 2.02.141 -
====================================
+ Initialise udev in clvmd for use in device scanning. (2.02.116)
Add seg_le_ranges report field for common format when displaying seg devices.
Honour report/list_item_separator for seg_metadata_le_ranges report field.
- Don't mark hidden devs in -o devices,metadata_devices,seg_pe_ranges (2.02.140).
+ Don't mark hidden devs in -o devices,metadata_devices,seg_pe_ranges.(2.02.140)
Change LV sizes in seg_pe_ranges report field to match underlying devices.
Add kernel_cache_settings report field for cache LV settings used in kernel.
diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c
index 03963cc..2537c57 100644
--- a/daemons/clvmd/lvm-functions.c
+++ b/daemons/clvmd/lvm-functions.c
@@ -901,8 +901,12 @@ int init_clvm(struct dm_hash_table *excl_uuid)
if (!get_initial_state(excl_uuid))
log_error("Cannot load initial lock states.");
+ if (!udev_init_library_context())
+ stack;
+
if (!(cmd = create_toolcontext(1, NULL, 0, 1, 1, 1))) {
log_error("Failed to allocate command context");
+ udev_fin_library_context();
return 0;
}
@@ -929,6 +933,7 @@ void destroy_lvm(void)
if (cmd) {
memlock_dec_daemon(cmd);
destroy_toolcontext(cmd);
+ udev_fin_library_context();
cmd = NULL;
}
}
8 years, 3 months
master - activation: Add lv_is_active_remotely.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2304286f68debd...
Commit: 2304286f68debd4755b44fa8b779b762142bfada
Parent: c812c2dbc7ced09a715e5689f941ba255821f0bc
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jan 19 22:01:59 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jan 19 22:01:59 2016 +0000
activation: Add lv_is_active_remotely.
---
lib/activate/activate.c | 49 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 4cd268e..aa24a5f 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -389,6 +389,10 @@ int lv_is_active_locally(const struct logical_volume *lv)
{
return 0;
}
+int lv_is_active_remotely(const struct logical_volume *lv)
+{
+ return 0;
+}
int lv_is_active_but_not_locally(const struct logical_volume *lv)
{
return 0;
@@ -1334,12 +1338,14 @@ int lvs_in_vg_opened(const struct volume_group *vg)
* _lv_is_active
* @lv: logical volume being queried
* @locally: set if active locally (when provided)
+ * @remotely: set if active remotely (when provided)
* @exclusive: set if active exclusively (when provided)
*
* Determine whether an LV is active locally or in a cluster.
* In addition to the return code which indicates whether or
* not the LV is active somewhere, two other values are set
* to yield more information about the status of the activation:
+ *
* return locally exclusively status
* ====== ======= =========== ======
* 0 0 0 not active
@@ -1352,9 +1358,10 @@ int lvs_in_vg_opened(const struct volume_group *vg)
* Returns: 0 or 1
*/
static int _lv_is_active(const struct logical_volume *lv,
- int *locally, int *exclusive)
+ int *locally, int *remotely, int *exclusive)
{
int r, l, e; /* remote, local, and exclusive */
+ int skip_cluster_query = 0;
r = l = e = 0;
@@ -1367,11 +1374,14 @@ static int _lv_is_active(const struct logical_volume *lv,
goto out;
}
- /* Active locally, and the caller doesn't care about exclusive */
- if (l && !exclusive)
+ /* Active locally, and the caller doesn't care about exclusive or remotely */
+ if (l && !exclusive && !remotely)
+ skip_cluster_query = 1;
+
+ if (skip_cluster_query)
goto out;
- if ((r = cluster_lock_held(lv->lvid.s, "", &e)) >= 0)
+ if ((r = cluster_lock_held(lv->lvid.s, NODE_REMOTE, &e)) >= 0)
goto out;
/*
@@ -1387,6 +1397,9 @@ static int _lv_is_active(const struct logical_volume *lv,
e = 0;
+ /* Also set remotely as a precaution, as we don't know */
+ r = 1;
+
/*
* We used to attempt activate_lv_excl_local(lv->vg->cmd, lv) here,
* but it's unreliable.
@@ -1397,53 +1410,65 @@ out:
*locally = l;
if (exclusive)
*exclusive = e;
+ if (remotely)
+ *remotely = r;
- log_very_verbose("%s is %sactive%s%s",
+ log_very_verbose("%s is %sactive%s%s%s%s",
display_lvname(lv),
(r || l) ? "" : "not ",
(exclusive && e) ? " exclusive" : "",
- e ? (l ? " locally" : " remotely") : "");
+ l ? " locally" : "",
+ (!skip_cluster_query && l && r) ? " and" : "",
+ (!skip_cluster_query && r) ? " remotely" : "");
return r || l;
}
int lv_is_active(const struct logical_volume *lv)
{
- return _lv_is_active(lv, NULL, NULL);
+ return _lv_is_active(lv, NULL, NULL, NULL);
}
int lv_is_active_locally(const struct logical_volume *lv)
{
int l;
- return _lv_is_active(lv, &l, NULL) && l;
+ return _lv_is_active(lv, &l, NULL, NULL) && l;
+}
+
+int lv_is_active_remotely(const struct logical_volume *lv)
+{
+ int r;
+
+ return _lv_is_active(lv, NULL, &r, NULL) && r;
}
int lv_is_active_but_not_locally(const struct logical_volume *lv)
{
int l;
- return _lv_is_active(lv, &l, NULL) && !l;
+
+ return _lv_is_active(lv, &l, NULL, NULL) && !l;
}
int lv_is_active_exclusive(const struct logical_volume *lv)
{
int e;
- return _lv_is_active(lv, NULL, &e) && e;
+ return _lv_is_active(lv, NULL, NULL, &e) && e;
}
int lv_is_active_exclusive_locally(const struct logical_volume *lv)
{
int l, e;
- return _lv_is_active(lv, &l, &e) && l && e;
+ return _lv_is_active(lv, &l, NULL, &e) && l && e;
}
int lv_is_active_exclusive_remotely(const struct logical_volume *lv)
{
int l, e;
- return _lv_is_active(lv, &l, &e) && !l && e;
+ return _lv_is_active(lv, &l, NULL, &e) && !l && e;
}
#ifdef DMEVENTD
8 years, 3 months
master - locking: Add node parameter to query_resource.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c812c2dbc7ced0...
Commit: c812c2dbc7ced09a715e5689f941ba255821f0bc
Parent: 7f6a1e6bbac41bb5d0e18876c23a7442c8c0d263
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jan 19 21:42:22 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jan 19 21:42:22 2016 +0000
locking: Add node parameter to query_resource.
---
daemons/clvmd/clvm.h | 8 +++++---
lib/activate/activate.c | 2 +-
lib/locking/cluster_locking.c | 7 +++----
lib/locking/locking.c | 4 ++--
lib/locking/locking.h | 7 ++++++-
lib/locking/locking_types.h | 2 +-
lib/locking/no_locking.c | 2 +-
7 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/daemons/clvmd/clvm.h b/daemons/clvmd/clvm.h
index 716af40..10ef852 100644
--- a/daemons/clvmd/clvm.h
+++ b/daemons/clvmd/clvm.h
@@ -76,8 +76,10 @@ static const char CLVMD_SOCKNAME[]= DEFAULT_RUN_DIR "/clvmd.sock";
#define CLVMD_CMD_SYNC_NAMES 45
/* Used internally by some callers, but not part of the protocol.*/
-#define NODE_ALL "*"
-#define NODE_LOCAL "."
-#define NODE_REMOTE "^"
+#ifndef NODE_ALL
+# define NODE_ALL "*"
+# define NODE_LOCAL "."
+# define NODE_REMOTE "^"
+#endif
#endif
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 8f5b72b..4cd268e 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1371,7 +1371,7 @@ static int _lv_is_active(const struct logical_volume *lv,
if (l && !exclusive)
goto out;
- if ((r = remote_lock_held(lv->lvid.s, &e)) >= 0)
+ if ((r = cluster_lock_held(lv->lvid.s, "", &e)) >= 0)
goto out;
/*
diff --git a/lib/locking/cluster_locking.c b/lib/locking/cluster_locking.c
index 800f33d..517d09c 100644
--- a/lib/locking/cluster_locking.c
+++ b/lib/locking/cluster_locking.c
@@ -34,7 +34,7 @@
#ifndef CLUSTER_LOCKING_INTERNAL
int lock_resource(struct cmd_context *cmd, const char *resource, uint32_t flags, const struct logical_volume *lv __attribute__((unused)));
-int query_resource(const char *resource, int *mode);
+int query_resource(const char *resource, const char *node, int *mode);
void locking_end(void);
int locking_init(int type, struct dm_config_tree *cf, uint32_t *flags);
#endif
@@ -530,13 +530,12 @@ static int decode_lock_type(const char *response)
}
#ifdef CLUSTER_LOCKING_INTERNAL
-static int _query_resource(const char *resource, int *mode)
+static int _query_resource(const char *resource, const char *node, int *mode)
#else
-int query_resource(const char *resource, int *mode)
+int query_resource(const char *resource, const char *node, int *mode)
#endif
{
int i, status, len, num_responses, saved_errno;
- const char *node = "";
char *args;
lvm_response_t *response = NULL;
diff --git a/lib/locking/locking.c b/lib/locking/locking.c
index 22e83d2..a11c09b 100644
--- a/lib/locking/locking.c
+++ b/lib/locking/locking.c
@@ -498,7 +498,7 @@ int locking_supports_remote_queries(void)
return (_locking.flags & LCK_SUPPORTS_REMOTE_QUERIES) ? 1 : 0;
}
-int remote_lock_held(const char *vol, int *exclusive)
+int cluster_lock_held(const char *vol, const char *node, int *exclusive)
{
int mode = LCK_NULL;
@@ -511,7 +511,7 @@ int remote_lock_held(const char *vol, int *exclusive)
/*
* If an error occured, expect that volume is active
*/
- if (!_locking.query_resource(vol, &mode)) {
+ if (!_locking.query_resource(vol, node, &mode)) {
stack;
return 1;
}
diff --git a/lib/locking/locking.h b/lib/locking/locking.h
index 706b59e..cb4f923 100644
--- a/lib/locking/locking.h
+++ b/lib/locking/locking.h
@@ -28,7 +28,12 @@ int vg_write_lock_held(void);
int locking_is_clustered(void);
int locking_supports_remote_queries(void);
-int remote_lock_held(const char *vol, int *exclusive);
+#ifndef NODE_ALL
+# define NODE_ALL "*"
+# define NODE_LOCAL "."
+# define NODE_REMOTE "^"
+#endif
+int cluster_lock_held(const char *vol, const char *node, int *exclusive);
/*
* LCK_VG:
diff --git a/lib/locking/locking_types.h b/lib/locking/locking_types.h
index 64d13db..5f0cd6b 100644
--- a/lib/locking/locking_types.h
+++ b/lib/locking/locking_types.h
@@ -18,7 +18,7 @@
typedef int (*lock_resource_fn) (struct cmd_context * cmd, const char *resource,
uint32_t flags, const struct logical_volume *lv);
-typedef int (*query_resource_fn) (const char *resource, int *mode);
+typedef int (*query_resource_fn) (const char *resource, const char *node, int *mode);
typedef void (*fin_lock_fn) (void);
typedef void (*reset_lock_fn) (void);
diff --git a/lib/locking/no_locking.c b/lib/locking/no_locking.c
index 6b0ac63..e909a24 100644
--- a/lib/locking/no_locking.c
+++ b/lib/locking/no_locking.c
@@ -70,7 +70,7 @@ static int _no_lock_resource(struct cmd_context *cmd, const char *resource,
return 1;
}
-static int _no_query_resource(const char *resource, int *mode)
+static int _no_query_resource(const char *resource, const char *node, int *mode)
{
log_very_verbose("Locking is disabled: Treating lock %s as not held.",
resource);
8 years, 3 months