From ea3018409974672dc987e9b026338fa569acee53 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Thu, 13 Aug 2009 14:27:32 +0000 Subject: [PATCH] Make lvchange --refresh only take a read lock on volume group. --- WHATS_NEW | 1 + tools/lvchange.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index aad645d0f..de6118d7b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.52 - ================================= + Make lvchange --refresh only take a read lock on volume group. Fix bug where non-blocking file locks could be granted in error. Make lvm2app pv_t, lv_t, vg_t handle definitions consistent with lvm_t. Fix vgextend error path - if ORPHAN lock fails, unlock / release vg (2.02.49). diff --git a/tools/lvchange.c b/tools/lvchange.c index 27a50d956..b16fd14a7 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -690,12 +690,11 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv) return EINVALID_CMD_LINE; } - int avail_only = + int avail_only = /* i.e. only one of -a or --refresh is given */ !(arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) || arg_count(cmd, readahead_ARG) || arg_count(cmd, persistent_ARG) || arg_count(cmd, addtag_ARG) || arg_count(cmd, deltag_ARG) || - arg_count(cmd, refresh_ARG) || arg_count(cmd, alloc_ARG) || - arg_count(cmd, resync_ARG)); + arg_count(cmd, resync_ARG) || arg_count(cmd, alloc_ARG)); if (arg_count(cmd, ignorelockingfailure_ARG) && !avail_only) { log_error("Only -a permitted with --ignorelockingfailure");