summaryrefslogtreecommitdiffstats
path: root/tools/pvchange.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-12-19 23:25:55 +0000
committerAlasdair Kergon <agk@redhat.com>2002-12-19 23:25:55 +0000
commit8ef2b021edcdec38f160675349c4797335f7a264 (patch)
tree9abf06514583ded09112a98cb066879f557bee87 /tools/pvchange.c
parent4c64ed4ced7dcd3a98a63da1cd3a6f2f1f2d1701 (diff)
downloadlvm2-8ef2b021edcdec38f160675349c4797335f7a264.tar.gz
lvm2-8ef2b021edcdec38f160675349c4797335f7a264.tar.xz
lvm2-8ef2b021edcdec38f160675349c4797335f7a264.zip
Default stripesize 64k & config file setting for it;
Clear many compiler warnings (i386) & associated bugs - hopefully without introducing too many new bugs:-) (Same exercise required for other archs.) Default compilation has optimisation - or else use ./configure --enable-debug
Diffstat (limited to 'tools/pvchange.c')
-rw-r--r--tools/pvchange.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c
index 189c94d3..5f33c183 100644
--- a/tools/pvchange.c
+++ b/tools/pvchange.c
@@ -22,8 +22,8 @@
/* FIXME Locking. PVs in VG. */
-int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
- void *handle)
+static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
+ void *handle)
{
struct volume_group *vg = NULL;
struct pv_list *pvl;
@@ -131,7 +131,7 @@ int pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
backup(vg);
unlock_vg(cmd, pv->vg_name);
} else {
- if (!(pv_write(cmd, pv, &mdas, sector))) {
+ if (!(pv_write(cmd, pv, &mdas, (int64_t) sector))) {
unlock_vg(cmd, ORPHAN);
log_error("Failed to store physical volume \"%s\"",
pv_name);
@@ -154,7 +154,7 @@ int pvchange(struct cmd_context *cmd, int argc, char **argv)
struct physical_volume *pv;
char *pv_name;
- struct list *pvh, *pvs;
+ struct list *pvh, *pvslist;
struct list mdas;
list_init(&mdas);
@@ -186,20 +186,20 @@ int pvchange(struct cmd_context *cmd, int argc, char **argv)
continue;
}
total++;
- done += pvchange_single(cmd, pv, NULL);
+ done += _pvchange_single(cmd, pv, NULL);
}
} else {
log_verbose("Scanning for physical volume names");
- if (!(pvs = get_pvs(cmd))) {
+ if (!(pvslist = get_pvs(cmd))) {
return ECMD_FAILED;
}
- list_iterate(pvh, pvs) {
+ list_iterate(pvh, pvslist) {
total++;
- done += pvchange_single(cmd,
- list_item(pvh,
- struct pv_list)->pv,
- NULL);
+ done += _pvchange_single(cmd,
+ list_item(pvh,
+ struct pv_list)->pv,
+ NULL);
}
}