Commit graph

10 commits

Author SHA1 Message Date
Casey Bodley
3ecd38e414 recovery: operations take stateid_arg instead of stateid4
operations that require a stateid now take stateid_arg for recovery information.  these operations include close, setattr, lock/unlock, layoutget, and read/write (including pnfs)

nfs41_open_stateid_arg() locks nfs41_open_state and copies its stateid into a stateid_arg
nfs41_lock_stateid_arg() locks nfs41_open_state.last_lock and copies its stateid into a stateid_arg; if there is no lock state, it falls back to nfs41_open_stateid_arg()

pnfs_read/write() now take nfs41_open_state so they can generate stateid_args

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-12-06 14:21:28 -05:00
Casey Bodley
3ca917f6b3 recovery: nfs41_open_reclaim()
added types and xdr for CLAIM_PREVIOUS, used by new function nfs41_open_reclaim()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-12-06 14:21:10 -05:00
Olga Kornievskaia
e51ba46d8b adding tags to compounds
contributed by Tigran
2010-10-27 15:00:12 -04:00
Casey Bodley
8c4c98b669 symlink: nfs41_create() can create symlinks
added optional symlink argument to nfs41_create(), used when type is NF4LNK
changed createttype4.u.lnk.linkdata from char[] to const char* and updated encoding in nfs41_xdr.c

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-14 12:42:35 -04:00
U-fast\aglo
ca596054f3 link asks for FSID attr 2010-10-13 14:45:55 -04:00
U-fast\aglo
7d7d641283 return file delegation on open
callback code is not up to handling recall of delegations via the
callback channel. thus return file delegation if it was returned on
open.
2010-10-13 14:45:48 -04:00
Casey Bodley
bb73eec774 bug fix: avoid infinite loops by checking for len=0 on read/write
/* we shouldn't ever see this, but a buggy server could
 * send us into an infinite loop. return NFS4ERR_IO */

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 12:11:38 -04:00
Casey Bodley
374e7ad083 symlink: nfs41_readlink() takes buf,len instead of nfs41_abs_path
also changed nfs41_readlink_res.link from a buffer to a pointer to avoid the extra copy

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:06 -04:00
Casey Bodley
c72007f076 name cache: LINK inserts target to name cache
the link part of basic test7 was failing because LINK's target was still cached as a negative entry, leading to the error "can't stat newfile.0 after link".  the solution is to replace the negative entry with the real fh and attributes of the target file

so instead of doing RESTOREFH+GETATTR on the source file and calling nfs41_attr_cache_update(), nfs41_link() uses LOOKUP+GETATTR+GETFH to get attributes for the target file and passes them to nfs41_name_cache_insert() along with dst_dir's changeinfo.  because the source and target file will have the same fileid attribute, nfs41_name_cache_insert() will update the attributes of both at the same time.  added the target file as an optional return parameter

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:48 -04:00
Casey Bodley
0ad4db4fad fresh git tree for public release
we regretfully had to remove our git history for licensing reasons

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:15:48 -04:00