summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-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
12 files changed, 31 insertions, 27 deletions
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index d258d26d156..c7ef2f1190b 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 58054699132..4f8fa211d0b 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 418edfc0942..8812a301924 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 b522cefb09d..ff5831234b1 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 43bb3f3f78c..5b3ee976e37 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 3dbe3c7cea1..ebded415c38 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 1400c4ea30d..e2dd5f4bfe8 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 3ac0977fb22..a341ebd6638 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 4757c1ccd27..95ba2e19b9e 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 f2c9bcdfb04..009f33ae38d 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 7ae5719e8e7..36835473f15 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 877ac92ef04..af80f28214b 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;
}