[lvm-devel] [PATCH 6/9] Add LCK_UNLOCK_FS and unlock_fs
Zdenek Kabelac
zkabelac at redhat.com
Wed Dec 8 12:57:52 UTC 2010
Use new bit in LCK flags - LCK_UNLOCK_FS
And add new wrapper unlock_fs() around lock_vol for clustering.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/locking/locking.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/locking/locking.h b/lib/locking/locking.h
index cb1a55f..df33aec 100644
--- a/lib/locking/locking.h
+++ b/lib/locking/locking.h
@@ -94,6 +94,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
#define LCK_CLUSTER_VG 0x00000080U /* VG is clustered */
#define LCK_CACHE 0x00000100U /* Operation on cache only using P_ lock */
#define LCK_ORIGIN_ONLY 0x00000200U /* Operation should bypass any snapshots */
+#define LCK_UNLOCK_FS 0x00000400U /* Operation waits to settle devices */
/*
* Additional lock bits for cluster communication via args[1]
@@ -125,6 +126,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
#define LCK_VG_REVERT (LCK_VG | LCK_READ | LCK_CACHE | LCK_HOLD)
#define LCK_VG_BACKUP (LCK_VG | LCK_CACHE)
+#define LCK_VG_UNLOCK_FS (LCK_VG | LCK_UNLOCK_FS)
#define LCK_LV_EXCLUSIVE (LCK_LV | LCK_EXCL)
#define LCK_LV_SUSPEND (LCK_LV | LCK_WRITE)
@@ -169,6 +171,8 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
lock_vol((vg)->cmd, (vg)->name, LCK_VG_REVERT)
#define remote_backup_metadata(vg) \
lock_vol((vg)->cmd, (vg)->name, LCK_VG_BACKUP)
+#define unlock_fs(cmd) \
+ lock_vol(cmd, VG_ORPHANS, LCK_VG_UNLOCK_FS)
/* Process list of LVs */
int suspend_lvs(struct cmd_context *cmd, struct dm_list *lvs);
--
1.7.3.3
More information about the lvm-devel
mailing list