linux/fs/nfsd
NeilBrown bd9aac523b [PATCH] nfsd4: fix open_reclaim seqid
The sequence number we store in the sequence id is the last one we received
from the client.  So on the next operation we'll check that the client gives
us the next higher number.

We increment sequence id's at the last moment, in encode, so that we're sure
of knowing the right error return.  (The decision to increment the sequence id
depends on the exact error returned.)

However on the *first* use of a sequence number, if we set the sequence number
to the one received from the client and then let the increment happen on
encode, we'll be left with a sequence number one to high.

For that reason, ENCODE_SEQID_OP_TAIL only increments the sequence id on
*confirmed* stateowners.

This creates a problem for open reclaims, which are confirmed on first use.
Therefore the open reclaim code, as a special exception, *decrements* the
sequence id, cancelling out the undesired increment on encode.  But this
prevents the sequence id from ever being incremented in the case where
multiple reclaims are sent with the same openowner.  Yuch!

We could add another exception to the open reclaim code, decrementing the
sequence id only if this is the first use of the open owner.

But it's simpler by far to modify the meaning of the op_seqid field: instead
of representing the previous value sent by the client, we take op_seqid, after
encoding, to represent the *next* sequence id that we expect from the client.
This eliminates the need for special-case handling of the first use of a
stateowner.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:24:09 -07:00
..
Makefile [PATCH] knfsd: nfsd4: reboot hash 2005-06-24 00:06:33 -07:00
auth.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
export.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
lockd.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nfs2acl.c [PATCH] NFSD: Add server support for NFSv3 ACLs. 2005-06-22 16:07:23 -04:00
nfs3acl.c [PATCH] NFSD: Add server support for NFSv3 ACLs. 2005-06-22 16:07:23 -04:00
nfs3proc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nfs3xdr.c [PATCH] NFSD: Add server support for NFSv3 ACLs. 2005-06-22 16:07:23 -04:00
nfs4acl.c [PATCH] knfsd: nfsd4: make needlessly global code static 2005-06-24 00:06:33 -07:00
nfs4callback.c [PATCH] knfsd: nfsd4: remove cb_parsed 2005-06-24 00:06:35 -07:00
nfs4idmap.c [PATCH] knfsd: nfsd4: make needlessly global code static 2005-06-24 00:06:33 -07:00
nfs4proc.c [PATCH] nfsd4: ERR_GRACE should bump seqid on open 2005-07-07 18:24:08 -07:00
nfs4recover.c [PATCH] nfsd4: prevent multiple unlinks of recovery directories 2005-07-07 18:24:08 -07:00
nfs4state.c [PATCH] nfsd4: fix open_reclaim seqid 2005-07-07 18:24:09 -07:00
nfs4xdr.c [PATCH] nfsd4: fix open_reclaim seqid 2005-07-07 18:24:09 -07:00
nfscache.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nfsctl.c [PATCH] knfsd: nfsd4 reboot dirname fix 2005-06-24 00:06:36 -07:00
nfsfh.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nfsproc.c [PATCH] NFSD: Add NFS3ERR_NOTSUPP to the nfsd error mapping table 2005-06-22 16:07:21 -04:00
nfssvc.c [PATCH] knfsd: nfsd4: rename nfs4_state_init 2005-06-24 00:06:31 -07:00
nfsxdr.c [PATCH] NFSD: Add server support for NFSv3 ACLs. 2005-06-22 16:07:23 -04:00
stats.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vfs.c [PATCH] nfsd4: fix sync'ing of recovery directory 2005-07-07 18:24:07 -07:00