Commit graph

131 commits

Author SHA1 Message Date
Olga Kornievskaia
f71623bc02 adding a lease-based timeout to upcalls
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
2012-03-05 17:49:52 -05:00
Olga Kornievskaia
b2f5d3c7a7 fixing printf format values in nfs41_mount 2012-02-29 13:55:40 -05:00
Olga Kornievskaia
88d6678f93 [driver] fixing multiple mount bug
When the client has an existing mount but for a different security context
and the new mount fails, don't free up the mount array for a given NetRoot.
2012-02-28 14:07:10 -05:00
Olga Kornievskaia
90c1137f85 [cosmetic] adding missing DEBUG_MOUNT define 2012-02-28 14:04:56 -05:00
Olga Kornievskaia
0322f53cce make io offset unsigned 2012-02-28 12:11:01 -05:00
Olga Kornievskaia
75c96068e9 [driver] changing error return values
instead of returning STATUS_INVALID_PARAMETER, return STATUS_NOT_SUPPORTED
for query classes we don't support in volume and file queries.
2012-02-16 11:54:05 -05:00
Olga Kornievskaia
5d60157e7c [driver] setting default printouts 2012-02-16 11:07:18 -05:00
Olga Kornievskaia
73294dff68 respecting FILE_WRITE_THROUGH flag on open 2012-02-16 11:06:31 -05:00
Olga Kornievskaia
0285d46a26 timing out an upcall after 2mins 2012-02-16 11:06:19 -05:00
Olga Kornievskaia
7d19a7ffef changing more printouts 2012-02-16 11:05:59 -05:00
Olga Kornievskaia
8adad77d4b more on time-based coherency
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.
2012-02-14 17:05:42 -05:00
Olga Kornievskaia
d42f769bff changing many printouts 2012-02-13 16:08:21 -05:00
Olga Kornievskaia
48d6775211 [driver] fixing wrong upcall size for setattr 2012-02-09 10:36:07 -05:00
Olga Kornievskaia
43424fc653 first stab at time-based data coherency 2012-02-08 18:24:19 -05:00
Olga Kornievskaia
13c3723191 propagating file change attr for setacl 2012-02-08 16:32:04 -05:00
Olga Kornievskaia
cdf31d3ee0 propagating file change attr on setattr 2012-02-08 16:31:17 -05:00
Olga Kornievskaia
aa7a680a40 propagating file change attr on writes 2012-02-08 16:29:25 -05:00
Olga Kornievskaia
ec034e7fd9 propagating file change attr on open 2012-02-08 11:11:09 -05:00
Olga Kornievskaia
3def6f5e24 propagating file change attr on getattr 2012-02-08 11:02:29 -05:00
Olga Kornievskaia
fb87e417fc enforcing data consistency
given a delegation type received on open, set buffering flags accordingly.

however, provide -o nocoherence mount options that will enable read/write
buffering regardless
2012-01-20 15:01:11 -05:00
Olga Kornievskaia
c22c2b6080 data cache invalidation on delegation recalls
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.
2012-01-19 19:46:03 -05:00
Olga Kornievskaia
39e90a7299 bug fix in nfs41_FinalizeVNetRoot
when we didn't create a mount, we don't have a security context to
destroy. in vnetroot creation, initialize session to invalid_handle.
if we fail to mount, then before deleting security context in
nfs41_FinalizeVNetRoot check that session is not invalid_handle.
2012-01-19 15:25:43 -05:00
Olga Kornievskaia
03bc4d4c2e adding back unimplemented functions
just in case some of them are required and will cause a kernel crash
if function pointer is dereferenced.
2012-01-18 18:21:28 -05:00
Olga Kornievskaia
a132b8b79c [driver] storing volinfo in devext
instaed of assembling FILE_FS_VOLUME_INFORMATION on every volume
query, story it in device extensions and just copy bytes.
2011-12-22 14:50:53 -05:00
Olga Kornievskaia
c61849fd14 [driver] fail if fail to impersonate client in nfsd thread 2011-12-22 12:06:44 -05:00
Olga Kornievskaia
790e6239d4 [driver] creating individual unmarshal functions 2011-12-22 11:59:45 -05:00
Olga Kornievskaia
62dfd87bda [driver] using InterlockedIncrement for open_owner_id 2011-12-21 17:42:04 -05:00
Olga Kornievskaia
9efa410e5a [driver] using InterlockedIncrement64 for xid 2011-12-21 17:19:38 -05:00
Olga Kornievskaia
4511dec4b7 [driver] properly release upcall entry lock in downcall
if we fail to allocate memory while processing acl downcall, dont
forget to release the lock on the entry before leaving the function.
2011-12-21 16:50:54 -05:00
Olga Kornievskaia
517db12d34 [driver] properly unlock mdls
when nobody is waiting for the upcall. if it was read/write upcall
unlock readwrite mdl. if it was a readdir upcall, unlock readdir
mdl and also free it.
2011-12-21 16:43:55 -05:00
Olga Kornievskaia
8d52181a3e [driver] delete sec context even if upcall fails 2011-12-21 16:36:39 -05:00
Olga Kornievskaia
fd21e7fbfd [driver] stop impersonating client even if it's a lost upcall 2011-12-21 16:15:26 -05:00
Olga Kornievskaia
0e272630a3 [driver] cosmetic changes
none (or all) functions should be static. making all function non-static.

consistent format of function args (ie each argument on its own line).

adding __notnull for our fcb, fobx, vnetroot, netroot context pointers.

removed some non-implemented function from our redirector functions table.
left some no-op functions that are just required: flush, isvaliddir,
deallocatefcb. not sure about completebufferingstate function.

80char lines corrections
2011-12-21 15:53:17 -05:00
Olga Kornievskaia
24ca1023bf [driver] bugfix: only free context for valid vnetroot 2011-12-20 15:19:01 -05:00
Olga Kornievskaia
6292181f8d adding nocache mount options 2011-12-08 17:47:34 -05:00
Olga Kornievskaia
aed1493e90 adding writethru mount option
for large writes it is beneficial to turnoff write buffering and allow
large write buffer sizes than 1M (for win 7).
2011-12-08 17:07:12 -05:00
Olga Kornievskaia
37f3fa0862 saving security context in vnetroot
windows calls into our driver from processes that have restricted access.

save security context during mount and use that for all other irps.
2011-12-08 17:07:05 -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
572c69e3d0 need to close vnetroot handle in create_connection 2011-11-02 12:00:21 -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
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
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
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
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