Commit graph

468 commits

Author SHA1 Message Date
Olga Kornievskaia
e63cce53aa [libtirpc] don't drop socket lock in krb5p
in 2 other places, we shouldn't have been dropping a socket
lock while processing a reply from the server. it lead to race.
2011-11-10 13:16:39 -05:00
Casey Bodley
f8daa3704a readme: moved signing instructions to Building from Source
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-09 12:11:31 -05:00
unknown
7acf94dd1b [libtirpc] fixing memory leak on gss context initiation failure 2011-11-08 15:35:20 -05:00
Olga Kornievskaia
6b05d84e93 [driver] dont set NetRootStatus on failure
Setting it was cause exiting mounts to go away.
2011-11-08 14:35:17 -05:00
Olga Kornievskaia
9af1b590ff [cosmetic] dprintf changes in acl, getattr, name_cache, namespace 2011-11-07 10:50:00 -05:00
Casey Bodley
7f82baf13f namecache: fix for negative entries on rename
this addresses two error cases:

1) when the src entry is negative or does not exist: the dst entry could be negative or point to something else, so it needs to be removed
2) when the dst_parent entry is negative or does not exist: src needs to be made a negative entry

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-04 17:01:46 -04:00
Casey Bodley
68252b6522 recovery: avoid delegation_return_lru() on delegation recovery
the namecache/delegation feedback code in nfs41_ops.c:open_update_cache() is interfering with delegation recovery.  if its call to nfs41_name_cache_insert() fails with ERROR_TOO_MANY_OPEN_FILES, the delegation is returned instead of being recovered.  this shouldn't happen during recovery, because we're replacing a delegation rather than adding a new one

nfs41_open() now remembers whether we already had a delegation.  if we did, open_update_cache() will pass OPEN_DELEGATE_NONE to nfs41_name_cache_insert() to prevent it from returning ERROR_TOO_MANY_OPEN_FILES.  if we didn't already have a delegation, the nfs41_delegreturn() needs to be called with the same try_recovery flag from nfs41_open()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-04 17:01:34 -04:00
Casey Bodley
f988c89bf4 namecache: fix for numlinks on remove
nfs41_name_cache_remove() needs to update the 'numlinks' attribute for other links, even if the file being removed is not found in the cache.  to search for its attr cache entry, nfs41_name_cache_remove() now requires a fileid argument.  nfs41_remove() only gets a pointer to the parent's filehandle, so it also needs the target fileid argument

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-04 13:14:40 -04:00
Casey Bodley
06b025a89c build: pacified compiler warnings in x86/x64
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-02 12:08:48 -04:00
Olga Kornievskaia
0694415a95 free critical sections with DeleteCriticalSection 2011-11-02 12:05:33 -04:00
Olga Kornievskaia
572c69e3d0 need to close vnetroot handle in create_connection 2011-11-02 12:00:21 -04:00
Olga Kornievskaia
2642d0c459 check that netconfig is present and readable 2011-11-02 11:59:52 -04:00
Olga Kornievskaia
5032d46633 return success if received empty acl 2011-11-02 11:58:54 -04:00
Casey Bodley
78a0bb0ac5 recovery: handle state revocation flags in SEQUENCE response
if any of (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED | SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED | SEQ4_STATUS_ADMIN_STATE_REVOKED) are set in the session flags returned by SEQUENCE:
* enter client recovery mode
* determine which state was lost with TEST_STATEID (consider all delegations, opens, locks, and layouts)
* send FREE_STATEID for each stateid revoked
* recall all layouts and forget devices (required by 12.7.2: Dealing with Lease Expiration on the Client)
* call recover_delegation(), recover_open() or recover_locks() to reclaim each lock

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-11-02 11:58:45 -04:00
Olga Kornievskaia
ed2ec18d2d recovery xdr for free_stateid and test_stateid 2011-11-02 11:58:19 -04:00
Casey Bodley
7efeb31a16 pnfs: send GETATTR after FILE_SYNC ds writes
in the case of ds writes returning FILE_SYNC, we don't need to send a COMMIT or LAYOUTCOMMIT to the mds.  COMMIT and LAYOUTCOMMIT, however, are the places where we do GETATTR(size) to update the attribute cache.  so we must add a separate call to GETATTR to accomplish this after ds writes return FILE_SYNC

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-25 11:45:03 -04:00
Casey Bodley
1f7e560a9a pnfs: fix for short write on ds error
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-25 11:44:53 -04:00
Casey Bodley
03e810ce83 write: use FILE_SYNC for small writes
small mds writes were using DATA_SYNC4 and were not followed by COMMITs, so there was no guarantee of an updated file size before returning success

use FILE_SYNC4 for these small writes, and send COMMITs for both UNSTABLE4 and DATA_SYNC4

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-25 11:44:46 -04:00
Casey Bodley
3d053740c3 mount: propagate errors back to nfs_mount
nfs41_np.c:
NPAddConnection3() was overwriting status=WN_BAD_NETNAME on any errors from DeviceIoControl()

nfs41_driver.c:
GetConnectionHandle() was only returning the handle, and throwing away the return value from ZwCreateFile()
map_mount_errors() was missing a mapping from ERROR_BAD_NET_NAME to STATUS_BAD_NETWORK_NAME

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-25 11:44:37 -04:00
Olga Kornievskaia
a2375b78ac [cosmetic] [driver] modify printouts in getsecurity
print function names where SeCreateClientSecurityFromSubjectContext fails
2011-10-24 12:14:03 -04:00
Olga Kornievskaia
861941944f [bakeathon] [acl] fixing inheritance flags
windows inherite directory flag was translated to file inherite flag

cosmetic: print ace type
2011-10-24 12:09:49 -04:00
Olga Kornievskaia
7485d53f64 [bakeathon] server compare logic
to determine if the server is the same don't rely on clientids returned
by the server
2011-10-24 11:54:19 -04:00
Olga Kornievskaia
ac9e621c44 [bakeathon] [session] fixing seq_id in recovery
when we are resending a create_session op we need to get possibly
updated initial sequence number from the client data structure.
2011-10-24 11:42:54 -04:00
Casey Bodley
fd870e6ce9 fix warning on ZeroMemory
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-12 15:14:25 -04:00
Casey Bodley
58c1e38f9a readme: updated known issue for krb5p and AES keys
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-12 14:41:01 -04:00
Casey Bodley
945d94cc4e readme: added vc2010 library dependency, updated known issues
removed indications that the x86 build is untested
under Installing Binaries, added requirement for visual c++ libraries
removed known issue for AUTH_SYS and multiple users

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-12 14:14:55 -04:00
Olga Kornievskaia
4c52473527 hooking up rsize-wsize mount options
after parsing read and write rpc size from the mount command,
add the values to mount upcall, then pass these values when creating
a CLIENT structure.
2011-10-11 16:03:59 -04:00
Casey Bodley
5dd3ef1e8c limit retries on WRITE/COMMIT verifier mismatch
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-07 14:54:18 -04:00
Casey Bodley
f435606a16 check write verifiers on COMMIT
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>
2011-10-07 14:53:59 -04:00
Olga Kornievskaia
d646e5c58c [driver] verifier raised issue with lists
first element in the lists (head) doesn't store any entries so
we should skip it when we traverse the list.
2011-10-06 12:38:55 -04:00
Olga Kornievskaia
65c6091f69 [driver] verifier raised issues with mdls
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.
2011-10-06 12:32:50 -04:00
Olga Kornievskaia
b3e4953890 [driver] fixing printing a unicode string in setattr 2011-10-04 14:33:18 -04:00
Olga Kornievskaia
981e73dc61 [driver] read-only mount option
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
2011-10-04 10:57:06 -04:00
Olga Kornievskaia
fc6ac77f28 including useridentity when creating clientowner 2011-09-30 16:36:30 -04:00
Olga Kornievskaia
c90811be75 dont use named events or mutexs
in case of multiple sessions (in multiuser environment)
we can't create event with the same name.
2011-09-30 12:41:54 -04:00
Olga Kornievskaia
96e334be8c [cosmetic] expand on getdomainname error message 2011-09-29 18:46:55 -04:00
Olga Kornievskaia
52081e3175 support for multiuser environment
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.
2011-09-29 18:45:21 -04:00
Olga Kornievskaia
436df23cba making downcall downcall buffer static
now that readdir doesn't require memory allocation, we can use
static memory for inbuf
2011-09-27 14:38:16 -04:00
Olga Kornievskaia
27030b1764 removing copies from readdir path 2011-09-27 12:21:26 -04:00
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