linux/fs/nfsd
Jeff Layton 01a7decf75 nfsd: keep a checksum of the first 256 bytes of request
Now that we're allowing more DRC entries, it becomes a lot easier to hit
problems with XID collisions. In order to mitigate those, calculate a
checksum of up to the first 256 bytes of each request coming in and store
that in the cache entry, along with the total length of the request.

This initially used crc32, but Chuck Lever and Jim Rees pointed out that
crc32 is probably more heavyweight than we really need for generating
these checksums, and recommended looking at using the same routines that
are used to generate checksums for IP packets.

On an x86_64 KVM guest measurements with ftrace showed ~800ns to use
csum_partial vs ~1750ns for crc32.  The difference probably isn't
terribly significant, but for now we may as well use csum_partial.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Stones-thrown-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2013-02-08 16:02:26 -05:00
..
acl.h nfsd4: remove outdated pathname-comments 2011-01-04 18:22:10 -05:00
auth.c Merge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux 2012-06-01 08:32:58 -07:00
auth.h nfsd: minor fs/nfsd/auth.h cleanup 2008-02-01 16:42:05 -05:00
cache.h nfsd: keep a checksum of the first 256 bytes of request 2013-02-08 16:02:26 -05:00
current_stateid.h nfsd41: use current stateid by value 2012-02-15 11:20:45 -05:00
export.c nfsd: initialize the exp->ex_uuid field in svc_export_init 2013-02-04 09:16:24 -05:00
fault_inject.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
idmap.h nfsd: pass network context to idmap init/exit functions 2012-04-12 09:12:10 -04:00
Kconfig NFSD: Added fault injection 2011-11-07 21:10:47 -05:00
lockd.c nfsd: Remove deprecated nfsctl system call and related code. 2011-07-15 18:58:42 -04:00
Makefile NFSD: Added fault injection 2011-11-07 21:10:47 -05:00
netns.h nfsd: make NFSd service structure allocated per net 2012-12-10 16:25:39 -05:00
nfs2acl.c nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
nfs3acl.c nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
nfs3proc.c nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
nfs3xdr.c nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
nfs4acl.c fs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros 2011-10-31 19:30:31 -04:00
nfs4callback.c nfsd: make NFSv4 lease time per net 2012-11-28 10:39:46 -05:00
nfs4idmap.c NFSD: pass null terminated buf to kstrtouint() 2012-09-10 17:46:19 -04:00
nfs4proc.c nfsd4: simplify nfsd4_encode_fattr interface slightly 2013-01-23 18:17:35 -05:00
nfs4recover.c nfsd: make NFSv4 recovery client tracking options per net 2012-12-10 16:25:30 -05:00
nfs4state.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
nfs4xdr.c nfsd4: simplify nfsd4_encode_fattr interface slightly 2013-01-23 18:17:35 -05:00
nfscache.c nfsd: keep a checksum of the first 256 bytes of request 2013-02-08 16:02:26 -05:00
nfsctl.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
nfsd.h nfsd: make NFSd service structure allocated per net 2012-12-10 16:25:39 -05:00
nfsfh.c exportfs: add FILEID_INVALID to indicate invalid fid_type 2012-11-07 19:22:30 -05:00
nfsfh.h fs: propagate umode_t, misc bits 2012-01-03 22:55:10 -05:00
nfsproc.c nfsd: Push mnt_want_write() outside of i_mutex 2012-07-31 01:02:51 +04:00
nfssvc.c nfsd: get rid of RC_INTR 2013-02-04 09:16:20 -05:00
nfsxdr.c nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
state.h NFSD: Forget state for a specific client 2012-12-03 09:59:03 -05:00
stats.c SUNRPC: register service stats /proc entries in passed network namespace context 2012-01-31 19:28:18 -05:00
vfs.c Revert "nfsd: warn on odd reply state in nfsd_vfs_read" 2012-12-21 17:07:45 -08:00
vfs.h nfsd: Push mnt_want_write() outside of i_mutex 2012-07-31 01:02:51 +04:00
xdr3.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
xdr4.h nfsd4: simplify nfsd4_encode_fattr interface slightly 2013-01-23 18:17:35 -05:00
xdr.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00