Commit 61e6f975 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] A basic NFSv4 client for 2.5.x

In NFSv4, an fsid is a 64-bit major number together with a 64-bit
minor number.  In previous versions, an fsid is a single number.
This patch changes 'struct nfs_fattr' accordingly.
parent c22994ae
......@@ -107,7 +107,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
fattr->du.nfs2.blocksize = ntohl(*p++);
fattr->rdev = ntohl(*p++);
fattr->du.nfs2.blocks = ntohl(*p++);
fattr->fsid = ntohl(*p++);
fattr->fsid_u.nfs3 = ntohl(*p++);
fattr->fileid = ntohl(*p++);
p = xdr_decode_time(p, &fattr->atime);
p = xdr_decode_time(p, &fattr->mtime);
......
......@@ -173,7 +173,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
/* Turn remote device info into Linux-specific dev_t */
fattr->rdev = ntohl(*p++) << MINORBITS;
fattr->rdev |= ntohl(*p++) & MINORMASK;
p = xdr_decode_hyper(p, &fattr->fsid);
p = xdr_decode_hyper(p, &fattr->fsid_u.nfs3);
p = xdr_decode_hyper(p, &fattr->fileid);
p = xdr_decode_time3(p, &fattr->atime);
p = xdr_decode_time3(p, &fattr->mtime);
......
......@@ -24,7 +24,13 @@ struct nfs_fattr {
} nfs3;
} du;
__u32 rdev;
__u64 fsid;
union {
__u64 nfs3; /* also nfs2 */
struct {
__u64 major;
__u64 minor;
} nfs4;
} fsid_u;
__u64 fileid;
__u64 atime;
__u64 mtime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment