in comparing server identities, in previous commit we removed
comparison of the returned clientids.
however, running against the emc server, we ran into issues of data
servers retuning the same server major, minor, and scope identities
but different clientids. we then decided that it's the same data
server.
cb_handle was declared as HANDLE * instead of just HANDLE and then
used as HANDLE. However, ran into issues with WaitOnSingleObject(cb_handle)
never returning.
adding -o timeout=value (in sec) mount option to override a default
timeout value for the upcalls for non-io upcalls. Default timeout is
at least the lease_time seconds of an established mount or 20secs.
read/write upcall also take into account number of bytes for the request
and 100MB/s network speed and 100MB/s disk speed
when we are doing non-pnfs and writing to a netapp filer, even though we
write UNSTABLE it returns us FILE_SYNC4. since we were doing unstable
writes we were not sending getattrs, and since the data servers we returning
stable commits we didn't send commit. in doing so, we never update our
attribute cache and had a wrong file size.
client was previously only sending RECLAIM_COMPLETE during grace period. the spec mandates that RECLAIM_COMPLETE be sent before any non-reclaim locking operations, regardless of grace period. when recovery code detects a NFS4ERR_NO_GRACE error, send RECLAIM_COMPLETE immediately before attempting any out-of-grace recovery
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
CB_GETATTR specifies the delegation by filehandle, but deleg_fh_cmp() was comparing superblock and fileid. renamed deleg_fh_cmp() to deleg_file_cmp(), and created new deleg_fh_cmp() to compare actual filehandles
call to nfs41_attr_cache_lookup() was not setting flags in info.attrmask, so the change and size attributes were not being encoded in the CB_GETATTR response
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
changing the code to keeping track of fcbs and not srv_opens.
problem of keeping srv_opens was that we could get an open for
attribute which will then do a setacl which will modify a change
attribute of the file but because the open is not for reading
data we won't have it on the list of opens.
fixes an issue introduced by commit 1f7e560a9a, "pnfs: fix for short write on ds error"
when a write is satisfied completely by pnfs, the upcall was returning out_len=0. the only time i noticed this was against python server, where cp in cygwin would succeed but print 'No space left on device'
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
added expiration field to struct attr_cache_entry. expiration timer is reset whenever attr_cache_update() is called with a 'change' attribute
new function attr_cache_entry_expired() is used by nfs41_attr_cache_lookup() and name_cache_lookup()/entry_invis() to prevent the use of expired attributes
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
nfs41_delegation_remove_srvopen() gets a reference to a delegation via delegation_find(). this reference wasn't being released
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
given a delegation type received on open, set buffering flags accordingly.
however, provide -o nocoherence mount options that will enable read/write
buffering regardless
when we receive a delegation recall, we need to make a downcall
to the kernel and change a buffering/caching policy on this file.
on each open and close we pass an srv_open pointer to the nfsd to
keep in case it receives a cb_recall. we store srv_open in the
delegation state if we got a delegation.
when open_update_cache() calls open_delegation_return() to return its delegation, it doesn't update its local variable 'delegation_type' to reflect the new delegation->type. this causes the next call to nfs41_name_cache_insert() to continue failing
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>