mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
commands: add lv_is_writable
This commit is contained in:
parent
0b7239ebc7
commit
2f3d8659b1
@ -220,6 +220,7 @@
|
|||||||
#define lv_is_locked(lv) (((lv)->status & LOCKED) ? 1 : 0)
|
#define lv_is_locked(lv) (((lv)->status & LOCKED) ? 1 : 0)
|
||||||
#define lv_is_partial(lv) (((lv)->status & PARTIAL_LV) ? 1 : 0)
|
#define lv_is_partial(lv) (((lv)->status & PARTIAL_LV) ? 1 : 0)
|
||||||
#define lv_is_virtual(lv) (((lv)->status & VIRTUAL) ? 1 : 0)
|
#define lv_is_virtual(lv) (((lv)->status & VIRTUAL) ? 1 : 0)
|
||||||
|
#define lv_is_writable(lv) (((lv)->status & LVM_WRITE) ? 1 : 0)
|
||||||
#define lv_is_merging(lv) (((lv)->status & MERGING) ? 1 : 0)
|
#define lv_is_merging(lv) (((lv)->status & MERGING) ? 1 : 0)
|
||||||
#define lv_is_merging_origin(lv) (lv_is_merging(lv) && (lv)->snapshot)
|
#define lv_is_merging_origin(lv) (lv_is_merging(lv) && (lv)->snapshot)
|
||||||
#define lv_is_snapshot(lv) (((lv)->status & SNAPSHOT) ? 1 : 0)
|
#define lv_is_snapshot(lv) (((lv)->status & SNAPSHOT) ? 1 : 0)
|
||||||
|
@ -25,6 +25,7 @@ lvp(is_error_when_full_LVP, "lv_is_error_when_full", NULL)
|
|||||||
lvp(is_pvmove_LVP, "lv_is_pvmove", NULL)
|
lvp(is_pvmove_LVP, "lv_is_pvmove", NULL)
|
||||||
lvp(is_removed_LVP, "lv_is_removed", NULL)
|
lvp(is_removed_LVP, "lv_is_removed", NULL)
|
||||||
lvp(is_vg_writable_LVP, "lv_is_vg_writable", NULL)
|
lvp(is_vg_writable_LVP, "lv_is_vg_writable", NULL)
|
||||||
|
lvp(is_writable_LVP, "lv_is_writable", NULL)
|
||||||
|
|
||||||
/* kinds of sub LV */
|
/* kinds of sub LV */
|
||||||
lvp(is_thinpool_data_LVP, "lv_is_thinpool_data", NULL)
|
lvp(is_thinpool_data_LVP, "lv_is_thinpool_data", NULL)
|
||||||
|
@ -2714,6 +2714,8 @@ static int _lv_is_prop(struct cmd_context *cmd, struct logical_volume *lv, int l
|
|||||||
return lv_is_pvmove(lv);
|
return lv_is_pvmove(lv);
|
||||||
case is_removed_LVP:
|
case is_removed_LVP:
|
||||||
return lv_is_removed(lv);
|
return lv_is_removed(lv);
|
||||||
|
case is_writable_LVP:
|
||||||
|
return lv_is_writable(lv);
|
||||||
case is_vg_writable_LVP:
|
case is_vg_writable_LVP:
|
||||||
return (lv->vg->status & LVM_WRITE) ? 1 : 0;
|
return (lv->vg->status & LVM_WRITE) ? 1 : 0;
|
||||||
case is_thinpool_data_LVP:
|
case is_thinpool_data_LVP:
|
||||||
|
Loading…
Reference in New Issue
Block a user