summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd/src/bd-helper.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2014-06-18 14:46:05 -0400
committerVijay Bellur <vbellur@redhat.com>2014-11-26 00:26:53 -0800
commitc147c36a70505ff239cef48030422840abd3fbcd (patch)
tree710057d06f614c654b8636e8df312ebd73cd0fc5 /xlators/storage/bd/src/bd-helper.c
parent6c5b74c66cc0eb10edf5e4d3a726c7efddb5842c (diff)
core: fix remaining *printf formation warnings on 32-bit
This fixes a few lingering size_t problems. Of particular note are some uses of off_t for size params in function calls. There is no correct, _portable_ way to correctly print an off_t. The best you can do is use a scratch int64_t/PRId64 or uint64_t/PRIu64. Change-Id: I86f3cf4678c7dbe5cad156ae8d540a66545f000d BUG: 1110916 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/8105 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/storage/bd/src/bd-helper.c')
-rw-r--r--xlators/storage/bd/src/bd-helper.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c
index d598e5755c6..1b1c35bad51 100644
--- a/xlators/storage/bd/src/bd-helper.c
+++ b/xlators/storage/bd/src/bd-helper.c
@@ -444,7 +444,7 @@ bd_create (uuid_t uuid, uint64_t size, char *type, bd_priv_t *priv)
}
int32_t
-bd_resize (bd_priv_t *priv, uuid_t uuid, off_t size)
+bd_resize (bd_priv_t *priv, uuid_t uuid, size_t size)
{
uint64_t new_size = 0;
runner_t runner = {0, };
@@ -481,8 +481,9 @@ bd_resize (bd_priv_t *priv, uuid_t uuid, off_t size)
new_size = lvm_lv_get_size (lv);
if (new_size != size) {
- gf_log (THIS->name, GF_LOG_WARNING, "resized LV size %ld does "
- "not match requested size %ld", new_size, size);
+ gf_log (THIS->name, GF_LOG_WARNING,
+ "resized LV size %" PRIu64 " does "
+ "not match requested size %zd", new_size, size);
ret = EIO;
}
@@ -515,7 +516,7 @@ bd_get_default_extent (bd_priv_t *priv)
* Adjusts the user specified size to VG specific extent size
*/
uint64_t
-bd_adjust_size (bd_priv_t *priv, uint64_t size)
+bd_adjust_size (bd_priv_t *priv, size_t size)
{
uint64_t extent = 0;
uint64_t nr_ex = 0;
@@ -966,7 +967,7 @@ skip:
int
bd_do_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset, off_t len, struct iatt *prebuf,
+ off_t offset, size_t len, struct iatt *prebuf,
struct iatt *postbuf)
{
int ret = -1;
@@ -996,7 +997,7 @@ bd_do_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd,
#endif
if (ret) {
gf_log(this->name, GF_LOG_ERROR,
- "zerofill failed on fd %d length %ld %s",
+ "zerofill failed on fd %d length %zu %s",
bd_fd->fd, len, strerror (ret));
goto out;
}