summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/common-utils.c2
-rw-r--r--libglusterfs/src/inode.c2
-rw-r--r--libglusterfs/src/statedump.c12
-rw-r--r--xlators/cluster/dht/src/dht-shared.c2
-rw-r--r--xlators/features/barrier/src/barrier.c2
-rw-r--r--xlators/features/quota/src/quota.c3
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c2
-rw-r--r--xlators/nfs/server/src/nfs-common.c4
-rw-r--r--xlators/nfs/server/src/nfs.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c9
-rw-r--r--xlators/nfs/server/src/nlm4.c22
-rw-r--r--xlators/performance/io-cache/src/io-cache.c6
-rw-r--r--xlators/performance/nl-cache/src/nl-cache-helper.c2
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c2
-rw-r--r--xlators/storage/posix/src/posix-common.c2
15 files changed, 39 insertions, 35 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index b8c3e2d..6cefb2a 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1702,7 +1702,7 @@ gf_uint64_2human_readable(uint64_t n)
if (ret < 0)
goto err;
} else {
- ret = gf_asprintf(&str, "%luBytes", n);
+ ret = gf_asprintf(&str, "%" PRIu64 "Bytes", n);
if (ret < 0)
goto err;
}
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index b4a6289..87f74e0 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -2456,7 +2456,7 @@ inode_dump(inode_t *inode, char *prefix)
{
nlookup = GF_ATOMIC_GET(inode->nlookup);
gf_proc_dump_write("gfid", "%s", uuid_utoa(inode->gfid));
- gf_proc_dump_write("nlookup", "%ld", nlookup);
+ gf_proc_dump_write("nlookup", "%" PRIu64, nlookup);
gf_proc_dump_write("fd-count", "%u", inode->fd_count);
gf_proc_dump_write("active-fd-count", "%u", inode->active_fd_count);
gf_proc_dump_write("ref", "%u", inode->ref);
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 690b130..d18b50f 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -383,7 +383,7 @@ gf_proc_dump_mempool_info(glusterfs_ctx_t *ctx)
gf_proc_dump_write("sizeof-type", "%lu", pool->sizeof_type);
gf_proc_dump_write("padded-sizeof", "%d",
1 << pool->pool->power_of_two);
- gf_proc_dump_write("size", "%lu",
+ gf_proc_dump_write("size", "%" PRId64,
(1 << pool->pool->power_of_two) * active);
gf_proc_dump_write("shared-pool", "%p", pool->pool);
}
@@ -461,17 +461,17 @@ gf_proc_dump_latency_info(xlator_t *xl);
void
gf_proc_dump_dict_info(glusterfs_ctx_t *ctx)
{
- uint64_t total_dicts = 0;
- uint64_t total_pairs = 0;
+ int64_t total_dicts = 0;
+ int64_t total_pairs = 0;
total_dicts = GF_ATOMIC_GET(ctx->stats.total_dicts_used);
total_pairs = GF_ATOMIC_GET(ctx->stats.total_pairs_used);
gf_proc_dump_write("max-pairs-per-dict", "%" GF_PRI_ATOMIC,
GF_ATOMIC_GET(ctx->stats.max_dict_pairs));
- gf_proc_dump_write("total-pairs-used", "%lu", total_pairs);
- gf_proc_dump_write("total-dicts-used", "%lu", total_dicts);
- gf_proc_dump_write("average-pairs-per-dict", "%lu",
+ gf_proc_dump_write("total-pairs-used", "%" PRId64, total_pairs);
+ gf_proc_dump_write("total-dicts-used", "%" PRId64, total_dicts);
+ gf_proc_dump_write("average-pairs-per-dict", "%" PRId64,
(total_pairs / total_dicts));
}
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index d258d26..c7ef2f1 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -152,7 +152,7 @@ dht_priv_dump(xlator_t *this)
gf_proc_dump_write(key, "%lf", conf->du_stats[i].avail_percent);
snprintf(key, sizeof(key), "du_stats[%d].avail_space", i);
- gf_proc_dump_write(key, "%lu", conf->du_stats[i].avail_space);
+ gf_proc_dump_write(key, "%" PRIu64, conf->du_stats[i].avail_space);
snprintf(key, sizeof(key), "du_stats[%d].avail_inodes", i);
gf_proc_dump_write(key, "%lf", conf->du_stats[i].avail_inodes);
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
index 5805469..4f8fa21 100644
--- a/xlators/features/barrier/src/barrier.c
+++ b/xlators/features/barrier/src/barrier.c
@@ -732,7 +732,7 @@ barrier_dump_priv(xlator_t *this)
gf_proc_dump_build_key(key, "barrier", "enabled");
gf_proc_dump_write(key, "%d", priv->barrier_enabled);
gf_proc_dump_build_key(key, "barrier", "timeout");
- gf_proc_dump_write(key, "%" PRId64, priv->timeout.tv_sec);
+ gf_proc_dump_write(key, "%ld", priv->timeout.tv_sec);
if (priv->barrier_enabled) {
gf_proc_dump_build_key(key, "barrier", "queue_size");
gf_proc_dump_write(key, "%d", priv->queue_size);
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 418edfc..8812a30 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -5158,7 +5158,8 @@ quota_priv_dump(xlator_t *this)
gf_proc_dump_write("quota-on", "%d", priv->is_quota_on);
gf_proc_dump_write("statfs", "%d", priv->consider_statfs);
gf_proc_dump_write("volume-uuid", "%s", priv->volume_uuid);
- gf_proc_dump_write("validation-count", "%ld", priv->validation_count);
+ gf_proc_dump_write("validation-count", "%" PRIu64,
+ priv->validation_count);
}
UNLOCK(&priv->lock);
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index b522cef..ff58312 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -451,7 +451,7 @@ fuse_invalidate_inode(xlator_t *this, uint64_t fuse_ino)
static int32_t
fuse_inode_invalidate_fn(xlator_t *this, inode_t *inode)
{
- fuse_invalidate_entry(this, (uint64_t)inode);
+ fuse_invalidate_entry(this, (uint64_t)(uintptr_t)inode);
return 0;
}
#endif
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c
index 43bb3f3..5b3ee97 100644
--- a/xlators/nfs/server/src/nfs-common.c
+++ b/xlators/nfs/server/src/nfs-common.c
@@ -432,7 +432,7 @@ nfs_fix_generation(xlator_t *this, inode_t *inode)
priv = this->private;
if (inode_ctx_get(inode, this, &raw_ctx) == 0) {
- ictx = (struct nfs_inode_ctx *)raw_ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)raw_ctx;
ictx->generation = priv->generation;
} else {
ictx = GF_CALLOC(1, sizeof(struct nfs_inode_ctx), gf_nfs_mt_inode_ctx);
@@ -443,7 +443,7 @@ nfs_fix_generation(xlator_t *this, inode_t *inode)
}
INIT_LIST_HEAD(&ictx->shares);
ictx->generation = priv->generation;
- ret = inode_ctx_put(inode, this, (uint64_t)ictx);
+ ret = inode_ctx_put(inode, this, (uint64_t)(uintptr_t)ictx);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, NFS_MSG_INODE_CTX_STORE_FAIL,
"could not store nfs inode ctx");
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 3dbe3c7..ebded41 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -1551,7 +1551,7 @@ nfs_forget(xlator_t *this, inode_t *inode)
if (inode_ctx_del(inode, this, &ctx))
return -1;
- ictx = (struct nfs_inode_ctx *)ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)ctx;
GF_FREE(ictx);
return 0;
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 1400c4e..e2dd5f4 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -914,7 +914,7 @@ nfs3_getattr_resume(void *carg)
* haven't been validated since the state change are affected.
*/
if (inode_ctx_get(cs->resolvedloc.inode, cs->nfsx, &raw_ctx) == 0) {
- ictx = (struct nfs_inode_ctx *)raw_ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)raw_ctx;
priv = cs->nfsx->private;
if (ictx->generation != priv->generation) {
ret = nfs_lookup(cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,
@@ -2587,14 +2587,15 @@ nfs3svc_create_stat_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
if ((cs->stbuf.ia_mtime == buf->ia_mtime) &&
(cs->stbuf.ia_atime == buf->ia_atime)) {
- gf_msg_debug(GF_NFS3, 0, "Create req retransmitted verf %ld %ld",
+ gf_msg_debug(GF_NFS3, 0,
+ "Create req retransmitted verf %" PRId64 " %" PRId64,
cs->stbuf.ia_mtime, cs->stbuf.ia_atime);
stat = NFS3_OK;
nfs3_fh_build_child_fh(&cs->parent, buf, &cs->fh);
} else {
gf_msg_debug(GF_NFS3, 0,
- "File already exist new_verf %ld %ld"
- "old_verf %ld %ld",
+ "File already exist new_verf %" PRId64 " %" PRId64
+ "old_verf %" PRId64 " %" PRId64,
cs->stbuf.ia_mtime, cs->stbuf.ia_atime, buf->ia_mtime,
buf->ia_atime);
stat = NFS3ERR_EXIST;
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index 3ac0977..a341ebd 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -639,7 +639,7 @@ nlm4_file_open_and_resume(nfs3_call_state_t *cs, nlm4_resume_fn_t resume)
goto err;
}
cs->resume_fn = resume;
- fd = fd_lookup_uint64(cs->resolvedloc.inode, (uint64_t)nlmclnt);
+ fd = fd_lookup_uint64(cs->resolvedloc.inode, (uint64_t)(uintptr_t)nlmclnt);
if (fd) {
cs->fd = fd;
cs->resolve_ret = 0;
@@ -648,7 +648,7 @@ nlm4_file_open_and_resume(nfs3_call_state_t *cs, nlm4_resume_fn_t resume)
goto err;
}
- fd = fd_create_uint64(cs->resolvedloc.inode, (uint64_t)nlmclnt);
+ fd = fd_create_uint64(cs->resolvedloc.inode, (uint64_t)(uintptr_t)nlmclnt);
if (fd == NULL) {
gf_msg(GF_NLM, GF_LOG_ERROR, ENOLCK, NFS_MSG_NO_MEMORY,
"fd_create_uint64() returned NULL");
@@ -1654,7 +1654,8 @@ nlm4_cancel_resume(void *carg)
"nlm_get_uniq() returned NULL");
goto nlm4err;
}
- cs->fd = fd_lookup_uint64(cs->resolvedloc.inode, (uint64_t)nlmclnt);
+ cs->fd = fd_lookup_uint64(cs->resolvedloc.inode,
+ (uint64_t)(uintptr_t)nlmclnt);
if (cs->fd == NULL) {
gf_msg(GF_NLM, GF_LOG_ERROR, errno, NFS_MSG_FD_LOOKUP_NULL,
"fd_lookup_uint64 retrned NULL");
@@ -1814,7 +1815,8 @@ nlm4_unlock_resume(void *carg)
"nlm_get_uniq() returned NULL for %s", caller_name);
goto nlm4err;
}
- cs->fd = fd_lookup_uint64(cs->resolvedloc.inode, (uint64_t)nlmclnt);
+ cs->fd = fd_lookup_uint64(cs->resolvedloc.inode,
+ (uint64_t)(uintptr_t)nlmclnt);
if (cs->fd == NULL) {
stat = nlm4_granted;
gf_msg(GF_NLM, GF_LOG_WARNING, 0, NFS_MSG_FD_LOOKUP_NULL,
@@ -1964,14 +1966,14 @@ nlm4_add_share_to_inode(nlm_share_t *share)
head = &ictx->shares;
INIT_LIST_HEAD(head);
- ret = inode_ctx_put(inode, this, (uint64_t)ictx);
+ ret = inode_ctx_put(inode, this, (uint64_t)(uintptr_t)ictx);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, NFS_MSG_SHARE_LIST_STORE_FAIL,
"could not store share list");
goto out;
}
} else {
- ictx = (struct nfs_inode_ctx *)ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)ctx;
head = &ictx->shares;
}
@@ -2006,7 +2008,7 @@ nlm4_approve_share_reservation(nfs3_call_state_t *cs)
ret = 0;
goto out;
}
- ictx = (struct nfs_inode_ctx *)ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)ctx;
head = &ictx->shares;
if (!head || list_empty(head))
@@ -2226,7 +2228,7 @@ nlm4_remove_share_reservation(nfs3_call_state_t *cs)
inode->gfid, caller);
goto out;
}
- ictx = (struct nfs_inode_ctx *)ctx;
+ ictx = (struct nfs_inode_ctx *)(uintptr_t)ctx;
head = &ictx->shares;
if (list_empty(head)) {
@@ -2735,7 +2737,7 @@ nlm_priv(xlator_t *this)
file_count = 0;
list_for_each_entry(fde, &client->fdes, fde_list)
{
- gf_proc_dump_build_key(key, "file", "%ld.gfid", file_count);
+ gf_proc_dump_build_key(key, "file", "%" PRIu64 ".gfid", file_count);
memset(gfid_str, 0, 64);
uuid_utoa_r(fde->fd->inode->gfid, gfid_str);
gf_proc_dump_write(key, "%s", gfid_str);
@@ -2743,7 +2745,7 @@ nlm_priv(xlator_t *this)
}
gf_proc_dump_build_key(key, "client", "files-locked");
- gf_proc_dump_write(key, "%ld\n", file_count);
+ gf_proc_dump_write(key, "%" PRIu64 "\n", file_count);
client_count++;
}
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 4757c1c..95ba2e1 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -2105,9 +2105,9 @@ ioc_priv_dump(xlator_t *this)
if (ret)
goto out;
{
- gf_proc_dump_write("page_size", "%ld", priv->page_size);
- gf_proc_dump_write("cache_size", "%ld", priv->cache_size);
- gf_proc_dump_write("cache_used", "%ld", priv->cache_used);
+ gf_proc_dump_write("page_size", "%" PRIu64, priv->page_size);
+ gf_proc_dump_write("cache_size", "%" PRIu64, priv->cache_size);
+ gf_proc_dump_write("cache_used", "%" PRIu64, priv->cache_used);
gf_proc_dump_write("inode_count", "%u", priv->inode_count);
gf_proc_dump_write("cache_timeout", "%u", priv->cache_timeout);
gf_proc_dump_write("min-file-size", "%" PRIu64, priv->min_file_size);
diff --git a/xlators/performance/nl-cache/src/nl-cache-helper.c b/xlators/performance/nl-cache/src/nl-cache-helper.c
index f2c9bcd..009f33a 100644
--- a/xlators/performance/nl-cache/src/nl-cache-helper.c
+++ b/xlators/performance/nl-cache/src/nl-cache-helper.c
@@ -1176,7 +1176,7 @@ nlc_dump_inodectx(xlator_t *this, inode_t *inode)
gf_proc_dump_write("state", "%" PRIu64, nlc_ctx->state);
gf_proc_dump_write("timer", "%p", nlc_ctx->timer);
- gf_proc_dump_write("cache-time", "%" GF_PRI_TIME, nlc_ctx->cache_time);
+ gf_proc_dump_write("cache-time", "%ld", nlc_ctx->cache_time);
gf_proc_dump_write("cache-size", "%zu", nlc_ctx->cache_size);
gf_proc_dump_write("refd-inodes", "%" PRIu64, nlc_ctx->refd_inodes);
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 7ae5719..3683547 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -223,7 +223,7 @@ rda_mark_inode_dirty(xlator_t *this, inode_t *inode)
if (val == 0)
continue;
- fd_ctx = (void *)val;
+ fd_ctx = (void *)(uintptr_t)val;
uuid_utoa_r(inode->gfid, gfid);
if (!GF_ATOMIC_GET(fd_ctx->prefetching))
continue;
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index 877ac92..af80f28 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -127,7 +127,7 @@ posix_priv(xlator_t *this)
gf_proc_dump_write("base_path_length", "%d", priv->base_path_length);
gf_proc_dump_write("max_read", "%" PRId64, priv->read_value);
gf_proc_dump_write("max_write", "%" PRId64, priv->write_value);
- gf_proc_dump_write("nr_files", "%ld", priv->nr_files);
+ gf_proc_dump_write("nr_files", "%" PRId64, priv->nr_files);
return 0;
}