we were previously only verifying that the server didn't reboot between WRITEs. COMMIT returns a verifier that needs to be checked as well
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
it complained that mdls had to have a certain (undocumented) flag set.
also, it seemed to imply that in readdir, the locking of pages needed
to be done by the thread creating the mdl. so i moved the locking/unlocking
there.
if the nfs_mount passes us a read-only mount option. then return
access_denied if:
1. requests for open with desired access of write or append,
2. we get a write irp,
3. requests for setattr, setattrex, setacl
4. ignore the delete_on_open flag passed to open
on a mount request, search a list of existing mounts for a given netroot
based on LUID entries (login ids). if an entry is found, then check the
current request rpcsec flavor against existing sessions/mounts. If no
match found, do another upcall for a mount and store a session of this
flavor for this LUID. if no entry found for this LUID, then do a mount
upcall, create a new entry and add it to the list.
avoid unnecessary calls to SystemTimeToFileTime() in get_file_epoch() by hardcoding the FILETIME value of jan_1_1970
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
on CB_GETATTR, search for a delegation with the given filehandle. if found, use its fileid to get its cached attributes. when encoding the response, only include change and size attributes
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
the out_err_deleg: case of nfs41_name_cache_insert() was forgetting to increment cache->delegations, leading to a decrement past 0. once that happens, the cache stops accepting delegations because it's comparing cache->max_delegations against UINT_MAX
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
iozone tests were failing intermittently against emc-2 due to out-of-order LAYOUTCOMMITs that both specified new_last_offset
nfs41_open_state now maintains a cached value of the last_offset, and avoids sending it with LAYOUTCOMMIT unless the new last_offset is greater than the cached offset. this cached value is initialized on open/delegation, and updated on setattr for size
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
sorry, earlier Casey, but the patch 'threading by io unit instead of stripe' from 6/20/2010 was nuts! with PNFS_THREAD_BY_SERVER disabled, we definitely -don't- want to create a separate thread for each io unit (each READ/WRITE request to a ds). we just want the one per stripe, as the intended alternative to PNFS_THREAD_BY_SERVER
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
cancel_lock() can't rely on checking upcall.status, because a handle_lock() success could be overwritten by upcall_marshall() or failure to allocate the upcall reply buffer. added new flag lock_upcall_args.acquired for this purpose
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
now that cancel_lock() and handle_unlock() depend on finding lock state in the open, the comment /* ignore errors from open_lock_add(); they just mean we won't be able to recover the lock after reboot */ no longer applies. allocate the lock state at the top of handle_lock(), so we can bail immediately on failure
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
removed unused variable 'grandparent'
factored out the call to name_cache_entry_update() from root/non-root paths
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
renamed name_cache_entry_refresh() to name_cache_entry_updated(). this function resets the entry's expiration timer. new function name_cache_entry_accessed() deals with moving the entry to the end of exp_entries to prevent eviction
name_cache_entry_accessed() now does the same for its parents as well. cache consistency of the parents is maintained because their expiration timers are unchanged. by 'refreshing' the parents of each name cache entry inserted, the eviction policy will always prefer child nodes (which are far less costly to evict)
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
open_update_cache() wasn't retrying insert after the open_delegation_return() error case
nfs41_name_cache_delegreturn() needs a check for if (attributes->delegated) to avoid an extra deref when the call to nfs41_name_cache_insert() failed
added a TODO comment to nfs41_client_delegation_return_lru() for improvements to the naive algorithm
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>