assign a superblock to named attribute files on nfs41_open(), to prevent crashing in nfs41_write()
also avoid updating the attribute cache with named attribute files on close and write
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
on creation of a new superblock, construct a bitmap for the default attribute mask to be used for GETATTR and READDIR requests on that filesystem. mask out any unsupported attributes, and store the bitmap in the field nfs41_superblock.default_getattr
replaced function init_getattr_request() with nfs41_superblock_getattr_mask(), which returns a copy of superblock->default_getattr
removed the locking in nfs41_superblock_supported_attrs() and nfs41_superblock_supported_attrs_exclcreat(), as the supported_attrs and suppattr_exclcreat fields are read-only after the superblock is first initialized. also factored out their common code into a bitmap_intersect() function in util.h
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
the upcall to set an EA was crashing in nfs41_open() on a null superblock, because nfs41_rpc_openattr() was returning a filehandle without a superblock. copy the parent file's superblock to the returned filehandle
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
allow callers of nfs41_open() and nfs41_create() to pass arbitrary attributes fo
r use with open_args.openhow.how.createattrs and create_args.createattrs
instead of appending a fh value when creating a silly rename name,
we'll append a timestamp. using fh value was problematic because
it was creating a filename longer than 64char long which is
currently out max_filename_size.
removing notepad opens file as a directory ifdef
for volume query notepad supplies insufficient buffer space but
doesn't like buffer_too_small error code. it seems to be fine
with partial buffer filled and buffer_overflow error.
windows can send a create irp with dispostion representing creation
of the file and specify DesiredAccess of 0.
we were treating no data access as lookup but in this case, we still
need to create a file. so send an open with a read access and
request no delegation to be returned.
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.
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>
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>