1
0
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:
Peter Rajnoha 2013-06-27 11:17:16 +02:00
parent e8832917f6
commit 6f0427cc56
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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 */