Commit graph

529 commits

Author SHA1 Message Date
Olga Kornievskaia
7e52f53097 [acls] removing unneeded safety checks 2011-09-23 12:12:45 -04:00
Olga Kornievskaia
3295a9da05 [timings] counting avg acl reply size in cached case 2011-09-22 17:07:44 -04:00
Olga Kornievskaia
6eea9faa2e first draft of named attributes 2011-09-22 14:56:11 -04:00
Olga Kornievskaia
1c5935865b [setattr] uses memory out upcall buffer 2011-09-16 17:05:57 -04:00
Casey Bodley
3a115a39fa hardcode value of filetime epoch
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>
2011-09-15 17:24:27 -04:00
Casey Bodley
5880a8bb1d deleg: support for CB_GETATTR
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>
2011-09-15 13:22:14 -04:00
Olga Kornievskaia
0184804498 [acl] setacl uses memory out of upcall buffer 2011-09-07 15:07:23 -04:00
Olga Kornievskaia
eae8988d6e [driver] minor fix store pointer not pointer to pointer 2011-09-07 13:45:09 -04:00
Olga Kornievskaia
756f92120c [acl] using static memory for main getacl structure 2011-09-07 13:04:32 -04:00
Olga Kornievskaia
0474d3afbe [driver] adding timing stats to upcalls 2011-09-06 18:01:17 -04:00
Casey Bodley
27fa6e93be namecache: fix for counting of delegations
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>
2011-09-06 17:58:23 -04:00
Olga Kornievskaia
f1311b1108 [pnfs] tag ds commits with ds 2011-09-06 17:57:55 -04:00
Casey Bodley
6872152317 pnfs: track last_offset for layoutcommit
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>
2011-09-06 17:55:30 -04:00
Casey Bodley
93a907082c pnfs: fix commit-to-ds for dense layouts
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-09-06 17:55:21 -04:00
Casey Bodley
641d9cf14b revert patch: threading by io unit instead of stripe
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>
2011-09-06 17:55:14 -04:00
Olga Kornievskaia
e3cbc70f14 removing unnecessary copy in readdir 2011-09-06 17:55:02 -04:00
unknown
c5878eb662 Merge branch 'master' of ssh://screamer.citi.umich.edu/home/projects/ms-nfs41-client-dev 2011-08-26 16:31:24 -04:00
Olga Kornievskaia
971762498b fixing null pointer deref in setowner/group 2011-08-26 16:27:19 -04:00
Casey Bodley
6c3bb06eca callback: fix for nfs41_callback_session_init()
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-08-26 15:03:25 -04:00
Casey Bodley
687f05edca vc10: removed asio, made cflags consistent
the release configurations of nfsd and libtirpc were missing NO_CB_4_KRB5P

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-08-26 14:40:30 -04:00
Olga Kornievskaia
fa09329167 fixing compile warning in upcall.c 2011-08-26 13:54:54 -04:00
Casey Bodley
d107131f78 lock: fix for upcall.status on cancel_lock()
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>
2011-08-26 13:44:32 -04:00
Casey Bodley
d08d3774fd lock: allocate lock state before LOCK, fail on error
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>
2011-08-26 13:43:41 -04:00
Casey Bodley
ead5bc78a2 namecache: cleanup name_cache_entry_update()
added goto out on attr_cache_find_or_create() failure to avoid calling name_cache_entry_updated()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-08-26 13:06:01 -04:00
Casey Bodley
a4b39031b9 namecache: cleanup nfs41_name_cache_insert()
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>
2011-08-26 13:05:49 -04:00
Casey Bodley
af80ded902 namecache: check for empty list before scavenging
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-08-26 13:05:38 -04:00
Olga Kornievskaia
74bb88fac6 [cosmetic] formatting changes, removed unused defines in lookup.c 2011-08-26 12:27:21 -04:00
Olga Kornievskaia
b01b340162 [cosmetic] format and comment changes to namespace.c 2011-08-26 10:46:37 -04:00
Olga Kornievskaia
f45273e407 minor changes to nfs41_compound.c 2011-08-26 09:59:35 -04:00
Olga Kornievskaia
f61f55c660 minor fixes for nfs41_rpc.c 2011-08-25 16:00:37 -04:00
Olga Kornievskaia
a4e3d4d121 minor changes to nfs41_session.c 2011-08-25 15:21:11 -04:00
Olga Kornievskaia
14a6706039 [cosmetic] formatting changes to nfs41_superblock.c 2011-08-25 15:06:48 -04:00
Olga Kornievskaia
328b175cae [cosmetic] formatting changes to open.c 2011-08-25 14:55:32 -04:00
Olga Kornievskaia
74147edb93 [cosmetic] formating changes to pnfs_device.c 2011-08-25 14:32:55 -04:00
Olga Kornievskaia
e7c540464b simplifying argument management in io path 2011-08-25 14:08:45 -04:00
Casey Bodley
6c555e028b namecache: prefer to evict child entries over parents
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>
2011-08-25 14:04:54 -04:00
Casey Bodley
0d86c68138 namecache: delegation-related fixes
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>
2011-08-25 14:04:46 -04:00
Olga Kornievskaia
48fa809fc5 formating changes to pnfs_layout.c 2011-08-25 13:07:12 -04:00
Olga Kornievskaia
0e287a87be simplifying logic in handle_readdir 2011-08-25 13:07:00 -04:00
Olga Kornievskaia
32422a9d7f [cosmetic] formatting changes to readwrite.c 2011-08-24 18:14:02 -04:00
Olga Kornievskaia
8683797d96 [cosmetic] formating changes to recovery.c 2011-08-24 18:01:30 -04:00
Olga Kornievskaia
969783d46b removing unnecessary ZeroMemory calls
instead of calling ZeroMemory(foobar) to initialize the data structure,
during declaration do struct some_struct foobar = { 0 }
2011-08-24 17:43:20 -04:00
Olga Kornievskaia
62c00bff40 [cosmetic] formating changes (tabs) to symlink.c 2011-08-24 17:16:02 -04:00
Olga Kornievskaia
9765eb7d52 simplifying logic in upcall_marshall 2011-08-24 17:07:45 -04:00
Olga Kornievskaia
912f6ae500 need to check valid opcode value before refcounting state and root 2011-08-24 16:59:02 -04:00
Olga Kornievskaia
18797690a6 making handle_volume_attributes void 2011-08-24 16:17:06 -04:00
Olga Kornievskaia
bafc1ebdf7 fixing condition when to cancel open
when marshalling of the open downcall or allocating buffer for the downcall
fails, upcall.status gets set but we still need to cancel the open we
just did. instead check for non-allocated open state as evidence that
handle_open() failed and we don't need to cancel vs the other failure.
2011-08-24 16:03:25 -04:00
Olga Kornievskaia
27bc5b862e [driver] ignore label_security queries 2011-08-24 13:22:51 -04:00
Olga Kornievskaia
28992406a7 [driver] caching acl buffer between query security irps
windows api frequently sends a query security with a buffer len of 0
to figure out how big of buffer is needed for a security descriptor.

we send a getattr for acl attribute on the 1st irp, then cache the
returned security descriptor in fobx. on the 2nd query, if the buffer
is cached and it's not "stale", we return that buffer.
2011-08-24 12:23:04 -04:00
Olga Kornievskaia
90b650fab8 renamed do_lookup to open_for_attributes 2011-08-23 12:20:45 -04:00