Files
kernel-tenderloin-3.0/include/linux
Andy Adamson ec6b5d7b50 nfsd41: create_session operation
Implement the create_session operation confoming to
http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26

Look up the client id (generated by the server on exchange_id,
given by the client on create_session).
If neither a confirmed or unconfirmed client is found
then the client id is stale
If a confirmed cilent is found (i.e. we already received
create_session for it) then compare the sequence id
to determine if it's a replay or possibly a mis-ordered rpc.
If the seqid is in order, update the confirmed client seqid
and procedd with updating the session parameters.

If an unconfirmed client_id is found then verify the creds
and seqid.  If both match move the client id to confirmed state
and proceed with processing the create_session.

Currently, we do not support persistent sessions, and RDMA.

alloc_init_session generates a new sessionid and creates
a session structure.

NFSD_PAGES_PER_SLOT is used for the max response cached calculation, and for
the counting of DRC pages using the hard limits set in struct srv_serv.

A note on NFSD_PAGES_PER_SLOT:

Other patches in this series allow for NFSD_PAGES_PER_SLOT + 1 pages to be
cached in a DRC slot when the response size is less than NFSD_PAGES_PER_SLOT *
PAGE_SIZE but xdr_buf pages are used. e.g. a READDIR operation will encode a
small amount of data in the xdr_buf head, and then the READDIR in the xdr_buf
pages.  So, the hard limit calculation use of pages by a session is
underestimated by the number of cached operations using the xdr_buf pages.

Yet another patch caches no pages for the solo sequence operation, or any
compound where cache_this is False.  So the hard limit calculation use of
pages by a session is overestimated by the number of these operations in the
cache.

TODO: improve resource pre-allocation and negotiate session
parameters accordingly.  Respect and possibly adjust
backchannel attributes.

Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com>
[nfsd41: remove headerpadsz from channel attributes]
Our client and server only support a headerpadsz of 0.
[nfsd41: use DRC limits in fore channel init]
[nfsd41: do not change CREATE_SESSION back channel attrs]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[use sessionid_lock spin lock]
[nfsd41: use bool inuse for slot state]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41 remove sl_session from alloc_init_session]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[simplify nfsd4_encode_create_session error handling]
[nfsd41: fix comment style in init_forechannel_attrs]
[nfsd41: allocate struct nfsd4_session and slot table in one piece]
[nfsd41: no need to INIT_LIST_HEAD in alloc_init_session just prior to list_add]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-04-03 17:41:18 -07:00
..
2009-01-30 19:50:25 +05:30
2009-01-30 19:59:53 +05:30
2009-01-11 01:34:25 +01:00
2009-01-09 12:37:15 -08:00
2009-04-03 17:41:18 -07:00
2009-01-30 23:32:45 +05:30
2009-04-03 17:41:17 -07:00
2009-01-30 23:37:37 +05:30
2009-01-30 23:38:03 +05:30
2008-12-29 08:29:50 +01:00
2009-01-30 23:38:37 +05:30
2008-12-03 22:12:38 -08:00
2008-12-03 22:12:38 -08:00
2009-01-30 23:39:42 +05:30
2009-01-30 23:40:06 +05:30
2009-01-06 15:59:29 -08:00
2009-01-01 10:12:19 +10:30
2009-01-04 13:33:20 -08:00
2009-01-30 23:44:08 +05:30
2009-01-02 12:19:34 -08:00
2008-12-29 17:47:23 +10:00
2008-12-25 11:01:43 +11:00
2009-02-05 16:48:53 +11:00
2008-12-31 18:07:38 -05:00
2009-03-01 00:19:35 -08:00
2009-01-28 07:50:14 -08:00
2009-01-30 23:46:03 +05:30
2009-01-30 23:46:40 +05:30
2009-01-30 23:48:33 +05:30
2009-01-30 23:49:07 +05:30
2008-12-15 23:44:31 -08:00
2008-12-29 11:27:46 +02:00
2009-02-18 15:37:56 -08:00
2008-12-31 18:07:42 -05:00
2009-01-06 15:59:01 -08:00
2008-12-08 01:14:16 -08:00
2009-01-30 23:50:37 +05:30
2009-01-30 23:51:17 +05:30
2009-01-26 21:19:52 +01:00
2009-01-30 23:51:41 +05:30
2009-01-30 23:52:16 +05:30
2009-01-30 23:53:12 +05:30
2009-01-30 23:53:40 +05:30
2009-01-30 23:54:53 +05:30
2009-01-30 23:55:45 +05:30
2009-01-30 23:56:13 +05:30
2009-01-30 23:56:48 +05:30
2009-01-30 23:57:16 +05:30
2009-01-30 23:58:41 +05:30
2009-01-30 23:59:44 +05:30
2009-01-31 00:00:06 +05:30
2009-01-15 16:39:37 -08:00
2009-01-05 08:40:30 -08:00
2009-03-01 00:19:36 -08:00
2008-12-31 15:11:46 +01:00
2009-03-05 07:25:02 -05:00
2009-01-31 00:00:35 +05:30
2009-02-18 15:37:55 -08:00
2009-01-31 00:01:11 +05:30
2008-12-08 14:31:59 +01:00
2009-03-04 23:46:25 -08:00
2009-04-03 17:41:12 -07:00
2008-12-23 15:21:45 -05:00
2009-03-10 20:33:18 -04:00
2009-04-03 17:41:12 -07:00
2009-03-10 20:33:18 -04:00
2008-12-19 15:22:54 -05:00
2009-01-31 00:15:24 +05:30
2008-12-21 14:21:14 +11:00
2009-01-08 08:31:05 -08:00
2009-01-31 00:02:54 +05:30
2009-01-08 08:31:12 -08:00
2009-01-31 00:03:40 +05:30
2009-01-06 15:59:12 -08:00
2009-01-31 00:05:30 +05:30
2008-12-20 09:15:46 +01:00
2009-01-16 18:02:10 +01:00
2009-01-05 18:31:12 -08:00
2009-01-31 00:05:59 +05:30
2009-01-04 13:33:20 -08:00
2009-01-07 09:58:22 +11:00
2009-02-18 15:37:53 -08:00
2009-01-31 00:06:33 +05:30
2009-02-20 17:57:48 -08:00
2009-01-31 00:07:00 +05:30
2009-01-08 08:31:10 -08:00
2009-01-31 00:07:31 +05:30
2009-02-11 14:25:36 -08:00
2009-01-01 10:12:25 +10:30
2009-02-18 15:37:53 -08:00
2008-12-12 17:01:38 +01:00
2009-01-02 10:19:36 -08:00
2009-01-31 00:10:59 +05:30
2009-02-18 15:37:53 -08:00
2009-01-06 15:59:09 -08:00