>From Frank Filz <ffilz...@mindspring.com>:

Frank Filz has uploaded this change for review. ( 
https://review.gerrithub.io/406503


Change subject: Allow for Windows use of multiple NLM_SHARE from same owner
......................................................................

Allow for Windows use of multiple NLM_SHARE from same owner

Windows may end up with more than one NLM_SHARE per owner per file.
Each share is handled independently, each being countered with an
NLM_UNSHARE.

Implement a counter for each access and deny mode, and use those
counters to manage a union of all the access and deny modes held
on the file by the owner. Only when UNSHARE takes a particular
mode counter to 0 does that mode then potentially get removed.

The specific example I have seen is:

SHARE RW access, deny write
SHARE read access, deny none
UNSHARE read access, deny none
UNSHARE RW access, deny write

Note that the access and deny counters are managed separately, so
the code will actually allow:

SHARE RW access, deny write
SHARE read access, deny none
UNSHARE read access, deny write
UNSHARE RW access, deny none

I will trust that clients do the right thing...

Also, if an UNSHARE doesn't match an in use access and deny, the
UNSHARE is just ignored and no error is reported.

Note that the old code was buggy here in a variety of ways, for
example, the mode actually seen would result in the file being
deny none after the second SHARE request.

Additionally, the state_lock is held in write mode over the operation.

Change-Id: I1284b654bf97c1b53b782fe142f28463d61288f5
Signed-off-by: Frank S. Filz <ffilz...@mindspring.com>
---
M src/SAL/state_share.c
M src/include/sal_data.h
2 files changed, 88 insertions(+), 28 deletions(-)



  git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha 
refs/changes/03/406503/1
--
To view, visit https://review.gerrithub.io/406503
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1284b654bf97c1b53b782fe142f28463d61288f5
Gerrit-Change-Number: 406503
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilz...@mindspring.com>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to