summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-04-07 10:07:29 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-04-08 03:08:26 -0700
commitc724beb161ce5f21862e9bb425736efed7532777 (patch)
tree03074a2ac92e9df0505b54877821cdb14fb5aa3f /xlators/nfs/server
parentd9e256b0e4203a7f79f862ecc83c509e516f0e14 (diff)
NFS: type fixes: some portability cleanup
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 399 (NFS translator with Mount v3 and NFS v3 support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=399
Diffstat (limited to 'xlators/nfs/server')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c4
-rw-r--r--xlators/nfs/server/src/nfs3.c22
2 files changed, 15 insertions, 11 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index 6b9c452c283..72861dfd0e8 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -1883,7 +1883,7 @@ nfs3_fdcache_add (struct nfs3_state *nfs3, fd_t *fd)
{
gf_log (GF_NFS3, GF_LOG_TRACE, "Adding fd: 0x%lx",
(long int) fd);
- fd_ctx_set (fd, nfs3->nfsx, (uint64_t)fde);
+ fd_ctx_set (fd, nfs3->nfsx, (uintptr_t)fde);
fd_bind (fd);
list_add_tail (&fde->list, &nfs3->fdlru);
++nfs3->fdcount;
@@ -1945,7 +1945,7 @@ __nfs3_queue_call_state (nfs3_call_state_t *cs)
gf_log (GF_NFS3, GF_LOG_TRACE, "Initing inode queue");
INIT_LIST_HEAD (inode_q);
- __inode_ctx_put (cs->resolvedloc.inode, cs->nfsx, (uint64_t)inode_q);
+ __inode_ctx_put (cs->resolvedloc.inode, cs->nfsx, (uintptr_t)inode_q);
attach_cs:
if (list_empty (inode_q)) {
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 4129a188015..712bbcaf382 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -3588,17 +3588,17 @@ nfs3svc_readdir_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3err:
if (cs->maxcount == 0) {
nfs3_log_readdir_res (rpcsvc_request_xid (cs->req), stat,
- op_errno, (uint64_t)cs->fd,
+ op_errno, (uintptr_t)cs->fd,
cs->dircount, is_eof);
- nfs3_readdir_reply (cs->req, stat, (uint64_t)cs->fd,
+ nfs3_readdir_reply (cs->req, stat, (uintptr_t)cs->fd,
buf, &cs->entries, cs->dircount,
is_eof);
} else {
nfs3_log_readdirp_res (rpcsvc_request_xid (cs->req), stat,
- op_errno, (uint64_t)cs->fd,
+ op_errno, (uintptr_t)cs->fd,
cs->dircount, cs->maxcount, is_eof);
nfs3_readdirp_reply (cs->req, stat, &cs->parent,
- (uint64_t)cs->fd, buf,
+ (uintptr_t)cs->fd, buf,
&cs->entries, cs->dircount,
cs->maxcount, is_eof);
}
@@ -4546,8 +4546,9 @@ rpcsvc_program_t nfs3prog = {
int
nfs3_init_options (struct nfs3_state *nfs3, xlator_t *nfsx)
{
- int ret = -1;
- char *optstr = NULL;
+ int ret = -1;
+ char *optstr = NULL;
+ uint64_t size64 = 0;
if ((!nfs3) || (!nfsx))
return -1;
@@ -4563,7 +4564,8 @@ nfs3_init_options (struct nfs3_state *nfs3, xlator_t *nfsx)
goto err;
}
- ret = gf_string2bytesize (optstr, &nfs3->readsize);
+ ret = gf_string2bytesize (optstr, &size64);
+ nfs3->readsize = size64;
if (ret == -1) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Failed to format"
" option: nfs3.read-size");
@@ -4583,7 +4585,8 @@ nfs3_init_options (struct nfs3_state *nfs3, xlator_t *nfsx)
goto err;
}
- ret = gf_string2bytesize (optstr, &nfs3->writesize);
+ ret = gf_string2bytesize (optstr, &size64);
+ nfs3->writesize = size64;
if (ret == -1) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Failed to format"
" option: nfs3.write-size");
@@ -4603,7 +4606,8 @@ nfs3_init_options (struct nfs3_state *nfs3, xlator_t *nfsx)
goto err;
}
- ret = gf_string2bytesize (optstr, &nfs3->readdirsize);
+ ret = gf_string2bytesize (optstr, &size64);
+ nfs3->readdirsize = size64;
if (ret == -1) {
gf_log (GF_NFS3, GF_LOG_ERROR, "Failed to format"
" option: nfs3.readdir-size");