mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Remove lvs_in_vg_activated_by_uuid_only call.
There is no difference from lvs_in_vg_activated now, convert all users to this call.
This commit is contained in:
parent
ab9663f394
commit
65752052e1
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.62 -
|
Version 2.02.62 -
|
||||||
====================================
|
====================================
|
||||||
|
Remove lvs_in_vg_activated_by_uuid_only call.
|
||||||
Run device info query device by uuid only.
|
Run device info query device by uuid only.
|
||||||
Don't touch /dev in vgmknodes if activation is disabled.
|
Don't touch /dev in vgmknodes if activation is disabled.
|
||||||
Update lvm2app.h Doxygen comments and add lvm2app Doxygen config file.
|
Update lvm2app.h Doxygen comments and add lvm2app Doxygen config file.
|
||||||
|
@ -171,10 +171,6 @@ int lvs_in_vg_activated(struct volume_group *vg)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int lvs_in_vg_activated_by_uuid_only(struct volume_group *vg)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lvs_in_vg_opened(struct volume_group *vg)
|
int lvs_in_vg_opened(struct volume_group *vg)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -627,7 +623,7 @@ static int _lv_suspend_lv(struct logical_volume *lv, int lockfs, int flush_requi
|
|||||||
* These two functions return the number of visible LVs in the state,
|
* These two functions return the number of visible LVs in the state,
|
||||||
* or -1 on error.
|
* or -1 on error.
|
||||||
*/
|
*/
|
||||||
static int _lvs_in_vg_activated(struct volume_group *vg, unsigned by_uuid_only)
|
int lvs_in_vg_activated(struct volume_group *vg)
|
||||||
{
|
{
|
||||||
struct lv_list *lvl;
|
struct lv_list *lvl;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@ -643,16 +639,6 @@ static int _lvs_in_vg_activated(struct volume_group *vg, unsigned by_uuid_only)
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lvs_in_vg_activated_by_uuid_only(struct volume_group *vg)
|
|
||||||
{
|
|
||||||
return _lvs_in_vg_activated(vg, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int lvs_in_vg_activated(struct volume_group *vg)
|
|
||||||
{
|
|
||||||
return _lvs_in_vg_activated(vg, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int lvs_in_vg_opened(const struct volume_group *vg)
|
int lvs_in_vg_opened(const struct volume_group *vg)
|
||||||
{
|
{
|
||||||
const struct lv_list *lvl;
|
const struct lv_list *lvl;
|
||||||
|
@ -91,7 +91,6 @@ int lv_mirror_percent(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
* Return number of LVs in the VG that are active.
|
* Return number of LVs in the VG that are active.
|
||||||
*/
|
*/
|
||||||
int lvs_in_vg_activated(struct volume_group *vg);
|
int lvs_in_vg_activated(struct volume_group *vg);
|
||||||
int lvs_in_vg_activated_by_uuid_only(struct volume_group *vg);
|
|
||||||
int lvs_in_vg_opened(const struct volume_group *vg);
|
int lvs_in_vg_opened(const struct volume_group *vg);
|
||||||
|
|
||||||
int lv_is_active(struct logical_volume *lv);
|
int lv_is_active(struct logical_volume *lv);
|
||||||
|
@ -29,7 +29,7 @@ static struct volume_group *vg_rename_old(struct cmd_context *cmd,
|
|||||||
return_NULL;
|
return_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lvs_in_vg_activated_by_uuid_only(vg)) {
|
if (lvs_in_vg_activated(vg)) {
|
||||||
unlock_and_release_vg(cmd, vg, vg_name_old);
|
unlock_and_release_vg(cmd, vg, vg_name_old);
|
||||||
log_error("Volume group \"%s\" still has active LVs",
|
log_error("Volume group \"%s\" still has active LVs",
|
||||||
vg_name_old);
|
vg_name_old);
|
||||||
@ -161,7 +161,7 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path,
|
|||||||
if (test_mode())
|
if (test_mode())
|
||||||
log_verbose("Test mode: Skipping rename.");
|
log_verbose("Test mode: Skipping rename.");
|
||||||
|
|
||||||
else if (lvs_in_vg_activated_by_uuid_only(vg)) {
|
else if (lvs_in_vg_activated(vg)) {
|
||||||
if (!vg_refresh_visible(cmd, vg)) {
|
if (!vg_refresh_visible(cmd, vg)) {
|
||||||
log_error("Renaming \"%s\" to \"%s\" failed",
|
log_error("Renaming \"%s\" to \"%s\" failed",
|
||||||
old_path, new_path);
|
old_path, new_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user