mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lv: add lv_config_profile fn
Returns LV's profile if it exists, VG's profile otherwise (LV inherits VG's profile).
This commit is contained in:
parent
e8832917f6
commit
6f0427cc56
@ -816,3 +816,8 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv)
|
||||
|
||||
return lv;
|
||||
}
|
||||
|
||||
struct profile *lv_config_profile(const struct logical_volume *lv)
|
||||
{
|
||||
return lv->profile ? : lv->vg->profile;
|
||||
}
|
||||
|
@ -92,4 +92,5 @@ int lv_active_change(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
char *lv_active_dup(struct dm_pool *mem, const struct logical_volume *lv);
|
||||
const struct logical_volume *lv_lock_holder(const struct logical_volume *lv);
|
||||
struct logical_volume *lv_ondisk(struct logical_volume *lv);
|
||||
struct profile *lv_config_profile(const struct logical_volume *lv);
|
||||
#endif /* _LVM_LV_H */
|
||||
|
Loading…
Reference in New Issue
Block a user