]> sourceware.org Git - lvm2.git/commitdiff
Convert pv->pe_alloc_count to get_pv_pe_alloc_count
authorDave Wysochanski <dwysocha@redhat.com>
Wed, 13 Jun 2007 22:04:45 +0000 (22:04 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Wed, 13 Jun 2007 22:04:45 +0000 (22:04 +0000)
tools/pvchange.c
tools/pvdisplay.c
tools/pvscan.c
tools/vgreduce.c
tools/vgsplit.c

index 1aa4c8670fab12b04025c9fc3bcfff20e8254c80..3c26688a8d7d7348469d472b84b1516b0e9da959 100644 (file)
@@ -182,7 +182,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
                log_verbose("Changing uuid of %s to %s.", pv_name, uuid);
                if (*pv->vg_name) {
                        orig_vg_name = pv->vg_name;
-                       orig_pe_alloc_count = pv->pe_alloc_count;
+                       orig_pe_alloc_count = get_pv_pe_alloc_count(pv);
                        pv->vg_name = ORPHAN;
                        pv->pe_alloc_count = 0;
                        if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) {
index eb7df5c26bfa4379062a3bc6b47c9a67cbfaf7ea..bd05534410f17b1a3ed7e9b99a046cb7e70f4421 100644 (file)
@@ -59,7 +59,7 @@ static int _pvdisplay_single(struct cmd_context *cmd,
        if (!*pv->vg_name)
                size = pv->size;
        else
-               size = (pv->pe_count - pv->pe_alloc_count) * pv->pe_size;
+               size = (pv->pe_count - get_pv_pe_alloc_count(pv)) * pv->pe_size;
 
        if (arg_count(cmd, short_ARG)) {
                log_print("Device \"%s\" has a capacity of %s", pv_name,
index 73bd176aca7a2ba36f7819868bc4cf4e04144d24..23cdd15f46bf07d8d4b212c00e37b001ea85c007 100644 (file)
@@ -91,7 +91,7 @@ static void _pvscan_display_single(struct cmd_context *cmd,
                  pv->fmt ? pv->fmt->name : "    ",
                  display_size(cmd, (uint64_t) pv->pe_count * pv->pe_size),
                  display_size(cmd,
-                              (uint64_t) (pv->pe_count - pv->pe_alloc_count) *
+                              (uint64_t) (pv->pe_count - get_pv_pe_alloc_count(pv)) *
                                           pv->pe_size));
        return;
 }
index 92dd21eb43f5d9ac328a838da6051ddd36938140..f2b438f8a928c901f5c6a5d309b0e1eb9811f32c 100644 (file)
@@ -397,7 +397,7 @@ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg,
        }
 
        vg->pv_count--;
-       vg->free_count -= pv->pe_count - pv->pe_alloc_count;
+       vg->free_count -= pv->pe_count - get_pv_pe_alloc_count(pv);
        vg->extent_count -= pv->pe_count;
 
        if (!vg_write(vg) || !vg_commit(vg)) {
index f6d4c96d14ebb1c072ede9f21f6136ccb33e7b77..d7e7c903f931be60d67390b478b28638dfc33255 100644 (file)
@@ -38,8 +38,8 @@ static int _move_pv(struct volume_group *vg_from, struct volume_group *vg_to,
        vg_from->extent_count -= pv->pe_count;
        vg_to->extent_count += pv->pe_count;
 
-       vg_from->free_count -= pv->pe_count - pv->pe_alloc_count;
-       vg_to->free_count += pv->pe_count - pv->pe_alloc_count;
+       vg_from->free_count -= pv->pe_count - get_pv_pe_alloc_count(pv);
+       vg_to->free_count += pv->pe_count - get_pv_pe_alloc_count(pv);
 
        return 1;
 }
This page took 0.038193 seconds and 5 git commands to generate.