summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server
diff options
context:
space:
mode:
authorIraj Jamali <ijamali@redhat.com>2018-12-17 11:23:59 +0530
committerAmar Tumballi <amarts@redhat.com>2019-01-11 18:25:18 +0000
commit01779e6c6c2c876a9e137d51ee1ce6a8062ea893 (patch)
tree8738a794b0ed38b84f99bc11d1442d1464a5b5fe /xlators/nfs/server
parentc0c2022e7d7097e96270a74f37813eda0c4e6339 (diff)
fix 32-bit-build-smoke warnings
fixes: bz#1622665 Change-Id: I777d67b1b62c284c62a02277238ad7538eef001e Signed-off-by: Iraj Jamali <ijamali@redhat.com>
Diffstat (limited to 'xlators/nfs/server')
-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
4 files changed, 20 insertions, 17 deletions
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++;
}