mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-24 17:57:48 +03:00
activation: fix locking resource name for activation lock
Avoid cutting away 1st. character for activation lock. Unlike with VG name locks like #orphan we should not cut-off 1st. characted from resource name.
This commit is contained in:
parent
e61313843f
commit
9bd7615fef
@ -1,5 +1,6 @@
|
||||
Version 2.02.176 -
|
||||
===================================
|
||||
Avoid cutting 1st. character of resource name for activation lock.
|
||||
Support for encrypted devices in fsadm.
|
||||
Improve thin pool overprovisioning and repair warning messages.
|
||||
|
||||
|
@ -51,8 +51,8 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
|
||||
switch (flags & LCK_SCOPE_MASK) {
|
||||
case LCK_ACTIVATION:
|
||||
if (dm_snprintf(lockfile, sizeof(lockfile),
|
||||
"%s/A_%s", _lock_dir, resource + 1) < 0) {
|
||||
log_error("Too long locking filename %s/A_%s.", _lock_dir, resource + 1);
|
||||
"%s/A_%s", _lock_dir, resource) < 0) {
|
||||
log_error("Too long locking filename %s/A_%s.", _lock_dir, resource);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user