diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-10-11 05:34:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-11 05:34:43 -0700 |
| commit | b59e9ac5ec332ba084b44553ab1bd47e1ac30e41 (patch) | |
| tree | eb2c76a2e2033603318924c70a3f28b74d47b7cf /include/linux/nfs3.h | |
| parent | 106c646cd67330b6583a5769582b7ba1bd74460d (diff) | |
[PATCH] kNFSd: Giant patch importing NFSv4 server functionality
Now that all the hooks are in place, this large patch imports all
of the new code for the NFSv4 server.
This patch makes almost no changes to the existing nfsd codebase
(these have been taken care of by the preceding patches).
One aspect of the NFSv4 code deserves comment. The most natural scheme
for processing a COMPOUND request would seem to be:
1a. XDR decode phase, decode args of all operations
2a. processing phase, process all operations
3a. XDR encode phase, encode results of all operations
However, we use a scheme which works as follows:
1b. XDR decode phase, decode args of all operations
2b. For each operation,
process the operation
encode the result
To see what is wrong with the first scheme, consider a COMPOUND
of the form READ REMOVE. Since the last bit of processing for
the READ request occurs in XDR encode, we might discover in step
3a that the READ request should return an error. Therefore, the
REMOVE request should not be processed at all. This is a fatal
problem, since the REMOVE was already been done in step 2a!
Another type of problem would occur in a COMPOUND of the form
READ WRITE. Assume that both operations succeed. Under scheme
(a), the WRITE is actually performed _before_ the READ (since
the "real" READ is really done during XDR encode). This is
certainly incorrect if the READ and WRITE ranges overlap.
These examples might seem a little artificial, but nevertheless
it does seem that in order to process a COMPOUND correctly in
all cases, we need to use scheme (b) instead of scheme (a).
(To construct less artificial examples, just substitute GETATTR
for READ in the examples above. This works because the "real"
GETATTR is done during XDR encode: one would really have to
bend over backwards in order to arrange things otherwise.)
Diffstat (limited to 'include/linux/nfs3.h')
| -rw-r--r-- | include/linux/nfs3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h index 1f45a9296488..359c73e00841 100644 --- a/include/linux/nfs3.h +++ b/include/linux/nfs3.h @@ -28,6 +28,7 @@ #define NFS3_ACCESS_EXTEND 0x0008 #define NFS3_ACCESS_DELETE 0x0010 #define NFS3_ACCESS_EXECUTE 0x0020 +#define NFS3_ACCESS_FULL 0x003f /* Flags for create mode */ enum nfs3_createmode { |
