summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/bd/src/bd-helper.c13
-rw-r--r--xlators/storage/bd/src/bd.c5
-rw-r--r--xlators/storage/bd/src/bd.h6
3 files changed, 13 insertions, 11 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;
}
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 750b009430a..41fbab26972 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -1792,10 +1792,11 @@ __bd_pwritev (int fd, struct iovec *vector, int count, off_t offset,
retval = pwritev (fd, vector, count, offset);
if (retval == -1) {
+ int64_t off = offset;
gf_log (THIS->name, GF_LOG_WARNING,
- "base %p, length %ld, offset %ld, message %s",
+ "base %p, length %zd, offset %" PRId64 ", message %s",
vector[index].iov_base, vector[index].iov_len,
- internal_offset, strerror (errno));
+ off, strerror (errno));
retval = -errno;
goto err;
}
diff --git a/xlators/storage/bd/src/bd.h b/xlators/storage/bd/src/bd.h
index 62add16cdf4..3491349f2e4 100644
--- a/xlators/storage/bd/src/bd.h
+++ b/xlators/storage/bd/src/bd.h
@@ -152,9 +152,9 @@ char *page_aligned_alloc (size_t size, char **aligned_buf);
int bd_validate_bd_xattr (xlator_t *this, char *bd, char **type,
uint64_t *lv_size, uuid_t uuid);
uint64_t bd_get_default_extent (bd_priv_t *priv);
-uint64_t bd_adjust_size (bd_priv_t *priv, uint64_t size);
+uint64_t bd_adjust_size (bd_priv_t *priv, size_t size);
int bd_create (uuid_t uuid, uint64_t size, char *type, bd_priv_t *priv);
-int bd_resize (bd_priv_t *priv, uuid_t uuid, off_t size);
+int bd_resize (bd_priv_t *priv, uuid_t uuid, size_t size);
int bd_delete_lv (bd_priv_t *priv, const char *lv_name, int *op_errno);
int bd_snapshot_create (bd_local_t *local, bd_priv_t *priv);
int bd_clone (bd_local_t *local, bd_priv_t *priv);
@@ -167,7 +167,7 @@ int bd_clone (bd_local_t *local, bd_priv_t *priv);
int bd_merge (bd_priv_t *priv, uuid_t gfid);
int bd_get_origin (bd_priv_t *priv, loc_t *loc, fd_t *fd, dict_t *dict);
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);
#endif