NFS client update

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4582 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-04-09 23:35:45 +00:00
parent 52ca693964
commit bc74d78940
3 changed files with 502 additions and 324 deletions

View File

@ -97,8 +97,9 @@ struct nfsmount
int nm_acdirmax; /* Directory attr cache max lifetime */
int nm_acregmin; /* Reg file attr cache min lifetime */
int nm_acregmax; /* Reg file attr cache max lifetime */
unsigned char nm_verf[NFSX_V3WRITEVERF]; /* V3 write verifier */
uint8_t *nm_buffer; /* This is an allocated buffer to hold one sector*/
unsigned char nm_verf[NFSX_V3WRITEVERF]; /* V3 write verifier */
char nm_mntonname[90]; /* directory on which mounted */
uint8_t *nm_buffer; /* This is an allocated buffer to hold one sector*/
};
/****************************************************************************
@ -110,14 +111,11 @@ struct nfsmount
int nfs_mount(struct inode *, const char *, void *);
int mountnfs(struct nfs_args *, struct inode *, char *, char *);
void nfs_decode_args(struct nfsmount *, struct nfs_args *, struct nfs_args *);
int nfs_start(struct inode *, int);
int nfs_unmount(struct inode *, int);
int nfs_root(struct inode *, struct file **);
int nfs_statfs(struct inode *, struct statfs *);
int nfs_sync(struct inode *, int);
int nfs_vget(struct inode *, ino_t, struct file **);
int nfs_fhtovp(struct inode *, struct fid *);
int nfs_vptofh(struct file *, struct fid *);
int nfs_fsinfo(struct nfsmount *, struct file *);
void nfs_init(void);

View File

@ -111,41 +111,42 @@ struct sillyrename
struct nfsnode
{
struct nfsnode *n_next; /* Retained in a singly linked list filehandle/node tree. */
bool n_open; /* true: The file is (still) open */
uint64_t n_size; /* Current size of file */
struct nfs_fattr n_fattr; /* nfs file attribute cache */
nfstype nfsv3_type; /* File type */
time_t n_attrstamp; /* Attr. cache timestamp */
struct timespec n_mtime; /* Prev modify time. */
time_t n_ctime; /* Prev create time. */
nfsfh_t *n_fhp; /* NFS File Handle */
struct inode *n_inode; /* associated inode */
int n_error; /* Save write error value */
struct nfsnode *n_next; /* Retained in a singly linked list filehandle/node tree. */
bool n_open; /* true: The file is (still) open */
uint64_t n_size; /* Current size of file */
struct nfs_fattr n_fattr; /* nfs file attribute cache */
struct nfsv3_sattr n_sattr;
nfstype nfsv3_type; /* File type */
time_t n_attrstamp; /* Attr. cache timestamp */
struct timespec n_mtime; /* Prev modify time. */
time_t n_ctime; /* Prev create time. */
nfsfh_t *n_fhp; /* NFS File Handle */
struct inode *n_inode; /* associated inode */
int n_error; /* Save write error value */
union
{
struct timespec nf_atim; /* Special file times */
nfsuint64 nd_cookieverf; /* Cookie verifier (dir only) */
struct timespec nf_atim; /* Special file times */
nfsuint64 nd_cookieverf; /* Cookie verifier (dir only) */
} n_un1;
union
{
struct timespec nf_mtim;
off_t nd_direoffset; /* Directory EOF offset cache */
struct timespec nf_mtim;
off_t nd_direoffset; /* Directory EOF offset cache */
} n_un2;
short n_fhsize; /* size in bytes, of fh */
short n_flag; /* Flag for locking.. */
nfsfh_t n_fh; /* Small File Handle */
time_t n_accstamp; /* Access cache timestamp */
uid_t n_accuid; /* Last access requester */
int n_accmode; /* Last mode requested */
int n_accerror; /* Last returned error */
short n_fhsize; /* size in bytes, of fh */
short n_flag; /* Flag for locking.. */
nfsfh_t n_fh; /* Small File Handle */
time_t n_accstamp; /* Access cache timestamp */
uid_t n_accuid; /* Last access requester */
int n_accmode; /* Last mode requested */
int n_accerror; /* Last returned error */
off_t n_pushedlo; /* 1st blk in commited range */
off_t n_pushedhi; /* Last block in range */
off_t n_pushlo; /* 1st block in commit range */
off_t n_pushhi; /* Last block in range */
//struct rwlock n_commitlock; /* Serialize commits */
int n_commitflags;
off_t n_pushedlo; /* 1st blk in commited range */
off_t n_pushedhi; /* Last block in range */
off_t n_pushlo; /* 1st block in commit range */
off_t n_pushhi; /* Last block in range */
//struct rwlock n_commitlock; /* Serialize commits */
int n_commitflags;
};
#endif /* __FS_NFS_NFS_NODE_H */

File diff suppressed because it is too large Load Diff