diff options
author | Alasdair Kergon <agk@redhat.com> | 2007-11-16 21:16:20 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2007-11-16 21:16:20 +0000 |
commit | 3e50ea9eef8088304abf0feba160a5a24977c746 (patch) | |
tree | 8d535fe9330ab831261f0e409ebf3d49e3641fe3 /lib/locking/file_locking.c | |
parent | a68d8ec833dabf288874b1bd84421313a36d5f9f (diff) | |
download | lvm2-3e50ea9eef8088304abf0feba160a5a24977c746.tar.gz lvm2-3e50ea9eef8088304abf0feba160a5a24977c746.tar.xz lvm2-3e50ea9eef8088304abf0feba160a5a24977c746.zip |
Decode cluster locking state in log message. (untested)
Change file locking state messages from debug to very verbose.
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r-- | lib/locking/file_locking.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c index 4d83f629..65c9fbf9 100644 --- a/lib/locking/file_locking.c +++ b/lib/locking/file_locking.c @@ -208,8 +208,6 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource, { char lockfile[PATH_MAX]; - assert(resource); - switch (flags & LCK_SCOPE_MASK) { case LCK_VG: if (!*resource) /* FIXME Deprecated */ @@ -238,27 +236,30 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource, case LCK_LV: switch (flags & LCK_TYPE_MASK) { case LCK_UNLOCK: - log_debug("Unlocking LV %s", resource); + log_very_verbose("Unlocking LV %s", resource); if (!lv_resume_if_active(cmd, resource)) return 0; break; case LCK_NULL: - log_debug("Locking LV %s (NL)", resource); + log_very_verbose("Locking LV %s (NL)", resource); if (!lv_deactivate(cmd, resource)) return 0; break; case LCK_READ: - log_debug("Locking LV %s (R)", resource); + log_very_verbose("Locking LV %s (R)", resource); if (!lv_activate_with_filter(cmd, resource, 0)) return 0; break; + case LCK_PREAD: + log_very_verbose("Locking LV %s (PR) - ignored", resource); + break; case LCK_WRITE: - log_debug("Locking LV %s (W)", resource); + log_very_verbose("Locking LV %s (W)", resource); if (!lv_suspend_if_active(cmd, resource)) return 0; break; case LCK_EXCL: - log_debug("Locking LV %s (EX)", resource); + log_very_verbose("Locking LV %s (EX)", resource); if (!lv_activate_with_filter(cmd, resource, 1)) return 0; break; |