mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add clustered VG flag to LV lock requests.
This commit is contained in:
parent
0fb173aa3a
commit
4c60a35226
@ -1,5 +1,6 @@
|
|||||||
Version 2.01.15 -
|
Version 2.01.15 -
|
||||||
=================================
|
=================================
|
||||||
|
Add clustered VG flag to LV lock requests.
|
||||||
Change LV locking macros to take lv instead of lvid.
|
Change LV locking macros to take lv instead of lvid.
|
||||||
Prepend 'cluster' activation parameter to mirror log when appropriate.
|
Prepend 'cluster' activation parameter to mirror log when appropriate.
|
||||||
Pass exclusive flag to lv_activate and on to target activation code.
|
Pass exclusive flag to lv_activate and on to target activation code.
|
||||||
|
@ -65,6 +65,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
|
|||||||
#define LCK_NONBLOCK 0x00000010 /* Don't block waiting for lock? */
|
#define LCK_NONBLOCK 0x00000010 /* Don't block waiting for lock? */
|
||||||
#define LCK_HOLD 0x00000020 /* Hold lock when lock_vol returns? */
|
#define LCK_HOLD 0x00000020 /* Hold lock when lock_vol returns? */
|
||||||
#define LCK_LOCAL 0x00000040 /* Don't propagate to other nodes */
|
#define LCK_LOCAL 0x00000040 /* Don't propagate to other nodes */
|
||||||
|
#define LCK_CLUSTER_VG 0x00000080 /* VG is clustered */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common combinations
|
* Common combinations
|
||||||
@ -79,22 +80,27 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
|
|||||||
#define LCK_LV_ACTIVATE (LCK_LV | LCK_READ | LCK_NONBLOCK)
|
#define LCK_LV_ACTIVATE (LCK_LV | LCK_READ | LCK_NONBLOCK)
|
||||||
#define LCK_LV_DEACTIVATE (LCK_LV | LCK_NULL | LCK_NONBLOCK)
|
#define LCK_LV_DEACTIVATE (LCK_LV | LCK_NULL | LCK_NONBLOCK)
|
||||||
|
|
||||||
|
#define LCK_LV_CLUSTERED(lv) \
|
||||||
|
(((lv)->vg->status & CLUSTERED) ? LCK_CLUSTER_VG : 0)
|
||||||
|
|
||||||
|
#define lock_lv_vol(cmd, lv, flags) \
|
||||||
|
lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv))
|
||||||
|
|
||||||
#define unlock_vg(cmd, vol) lock_vol(cmd, vol, LCK_VG_UNLOCK)
|
#define unlock_vg(cmd, vol) lock_vol(cmd, vol, LCK_VG_UNLOCK)
|
||||||
|
|
||||||
#define resume_lv(cmd, lv) lock_vol(cmd, (lv)->lvid.s, LCK_LV_RESUME)
|
#define resume_lv(cmd, lv) lock_lv_vol(cmd, lv, LCK_LV_RESUME)
|
||||||
#define suspend_lv(cmd, lv) lock_vol(cmd, (lv)->lvid.s, LCK_LV_SUSPEND | LCK_HOLD)
|
#define suspend_lv(cmd, lv) lock_lv_vol(cmd, lv, LCK_LV_SUSPEND | LCK_HOLD)
|
||||||
#define deactivate_lv(cmd, lv) lock_vol(cmd, (lv)->lvid.s, LCK_LV_DEACTIVATE)
|
#define deactivate_lv(cmd, lv) lock_lv_vol(cmd, lv, LCK_LV_DEACTIVATE)
|
||||||
#define activate_lv(cmd, lv) lock_vol(cmd, (lv)->lvid.s, LCK_LV_ACTIVATE | LCK_HOLD)
|
#define activate_lv(cmd, lv) lock_lv_vol(cmd, lv, LCK_LV_ACTIVATE | LCK_HOLD)
|
||||||
#define activate_lv_excl(cmd, lv) \
|
#define activate_lv_excl(cmd, lv) \
|
||||||
lock_vol(cmd, (lv)->lvid.s, LCK_LV_EXCLUSIVE | LCK_HOLD)
|
lock_lv_vol(cmd, lv, LCK_LV_EXCLUSIVE | LCK_HOLD)
|
||||||
#define activate_lv_local(cmd, lv) \
|
#define activate_lv_local(cmd, lv) \
|
||||||
lock_vol(cmd, (lv)->lvid.s, LCK_LV_ACTIVATE | LCK_HOLD | LCK_LOCAL)
|
lock_lv_vol(cmd, lv, LCK_LV_ACTIVATE | LCK_HOLD | LCK_LOCAL)
|
||||||
#define deactivate_lv_local(cmd, lv) \
|
#define deactivate_lv_local(cmd, lv) \
|
||||||
lock_vol(cmd, (lv)->lvid.s, LCK_LV_DEACTIVATE | LCK_LOCAL)
|
lock_lv_vol(cmd, lv, LCK_LV_DEACTIVATE | LCK_LOCAL)
|
||||||
|
|
||||||
/* Process list of LVs */
|
/* Process list of LVs */
|
||||||
int suspend_lvs(struct cmd_context *cmd, struct list *lvs);
|
int suspend_lvs(struct cmd_context *cmd, struct list *lvs);
|
||||||
int resume_lvs(struct cmd_context *cmd, struct list *lvs);
|
int resume_lvs(struct cmd_context *cmd, struct list *lvs);
|
||||||
int activate_lvs_excl(struct cmd_context *cmd, struct list *lvs);
|
int activate_lvs_excl(struct cmd_context *cmd, struct list *lvs);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user