linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] Full NFSv2/v3 XDR overhaul series
@ 2010-09-17 16:26 Chuck Lever
  2010-09-17 16:26 ` [PATCH 01/22] NFS: Fix NFSv3 debugging messages in fs/nfs/nfs3proc.c Chuck Lever
                   ` (21 more replies)
  0 siblings, 22 replies; 24+ messages in thread
From: Chuck Lever @ 2010-09-17 16:26 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs

Hi Trond-

Here's the full XDR overhaul series.  Superfluous BUG_ON()'s have been
removed from both the NFSv2 and the NFSv3 components.

There may be some minor merge conflicts with Bryan's readdir changes
and with Jeff's async sillyrename patches.  I volunteer to take care
of those when you can set up a for-2.6.37 branch with everything you
have so far.

---

Chuck Lever (22):
      NFS: Fix hdrlen calculation in NFSv4's decode_read()
      lockd: Move nlmdbg_cookie2a() to svclock.c
      lockd: Introduce new-style XDR functions for NLMv4
      NFS: Move and update xdr_decode_foo() functions that we're keeping
      NFS: Remove unused old NFSv3 decoder functions
      NFS: Switch in new NFSv3 decoder functions
      NFS: Introduce new-style XDR decoding functions for NFSv2
      NFS: Move and update xdr_encode_foo() functions that we're keeping
      NFS: Remove unused old NFSv3 encoder functions
      NFS: Replace old NFSv3 encoder functions with xdr_stream-based ones
      NFS: Introduce new-style XDR encoding functions for NFSv3
      lockd: Introduce new-style XDR functions for NLMv3
      NFS: Move and update xdr_decode_foo() functions that we're keeping
      NFS: Replace old NFSv2 decoder functions with xdr_stream-based ones
      NFS: Introduce new-style XDR decoding functions for NFSv2
      NFS: Use the "nfs_stat" enum for nfs_stat_to_errno()'s argument
      NFS: Move and update xdr_encode_foo() functions that we're keeping
      NFS: Remove old NFSv2 encoder functions
      NFS: Introduce new-style XDR encoding functions for NFSv2
      SUNRPC: Refactor logic to NUL-terminate strings in pages
      SUNRPC: Correct an rpcbind debugging message
      NFS: Fix NFSv3 debugging messages in fs/nfs/nfs3proc.c


 fs/lockd/Makefile           |    6 
 fs/lockd/clnt4xdr.c         |  633 +++++++++
 fs/lockd/clntxdr.c          |  650 ++++++++++
 fs/lockd/svclock.c          |   30 
 fs/lockd/xdr.c              |  287 ----
 fs/lockd/xdr4.c             |  255 ----
 fs/nfs/internal.h           |    4 
 fs/nfs/nfs2xdr.c            | 1342 +++++++++++++-------
 fs/nfs/nfs3proc.c           |    5 
 fs/nfs/nfs3xdr.c            | 2929 ++++++++++++++++++++++++++++++++-----------
 fs/nfs/nfs4xdr.c            |    7 
 fs/nfs/proc.c               |    2 
 include/linux/lockd/debug.h |   10 
 include/linux/nfs3.h        |    3 
 include/linux/sunrpc/xdr.h  |    1 
 net/sunrpc/rpcb_clnt.c      |    5 
 net/sunrpc/xdr.c            |   17 
 17 files changed, 4403 insertions(+), 1783 deletions(-)
 create mode 100644 fs/lockd/clnt4xdr.c
 create mode 100644 fs/lockd/clntxdr.c

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH 00/22] NFS v2 and v3 XDR overhaul
@ 2010-07-02 17:18 Chuck Lever
       [not found] ` <20100702165935.8761.88528.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Chuck Lever @ 2010-07-02 17:18 UTC (permalink / raw)
  To: linux-nfs

Some light reading for the holiday weekend.

We'd like better protection against RPC buffer overflows due to bogus
server replies.  Also, for better CPU efficiency and a smaller
instruction cache footprint, we'd like to call all XDR encode/decode
functions with an xdr_stream already prepared by call_encode() and
call_decode(), rather than preparing it in every called XDR function.

Towards that end, I've rewritten the NFSv2, NLMv3, NFSv3, and NLMv4
XDR encoders and decoders to use xdr_streams.  Similar rewrites have
already been done for the kernel's rpcbind, MNT, and NSM XDR encoders
and decoders.

I've attempted to follow the style precedents set by Benny's recent
rewrite of the NFSv4 XDR encoders and decoders.

Testing via Oprofile and "perf top" shows that these routines weren't
a significant CPU user before these changes.  Afterwards, I don't see
much difference.  I checked CPU cycles, mispredicted branches, and bus
cycles.

These are also available in my cel-2.6.git repo on linux-nfs.org,
along with recent NFSROOT changes to use the mount option parsing
routines in fs/nfs/super.c.

---

Chuck Lever (22):
      NFS: Fix hdrlen calculation in NFSv4's decode_read()
      lockd: Move nlmdbg_cookie2a() to svclock.c
      lockd: Introduce new-style XDR functions for NLMv4
      NFS: Move and update xdr_decode_foo() functions that we're keeping
      NFS: Remove unused old NFSv3 decoder functions
      NFS: Switch in new NFSv3 decoder functions
      NFS: Introduce new-style XDR decoding functions for NFSv2
      NFS: Move and update xdr_encode_foo() functions that we're keeping
      NFS: Remove unused old NFSv3 encoder functions
      NFS: Replace old NFSv3 encoder functions with xdr_stream-based ones
      NFS: Introduce new-style XDR encoding functions for NFSv3
      lockd: Introduce new-style XDR functions for NLMv3
      NFS: Move and update xdr_decode_foo() functions that we're keeping
      NFS: Replace old NFSv2 decoder functions with xdr_stream-based ones
      NFS: Introduce new-style XDR decoding functions for NFSv2
      NFS: Use the "nfs_stat" enum for nfs_stat_to_errno()'s argument
      NFS: Move and update xdr_encode_foo() functions that we're keeping
      NFS: Remove old NFSv2 encoder functions
      NFS: Introduce new-style XDR encoding functions for NFSv2
      SUNRPC: Refactor logic to NUL-terminate strings in pages
      SUNRPC: Correct an rpcbind debugging message
      Fix NFSv3 debugging messages in fs/nfs/nfs3proc.c


 fs/lockd/Makefile           |    6 
 fs/lockd/clnt4xdr.c         |  640 +++++++++
 fs/lockd/clntxdr.c          |  657 ++++++++++
 fs/lockd/svclock.c          |   30 
 fs/lockd/xdr.c              |  287 ----
 fs/lockd/xdr4.c             |  255 ----
 fs/nfs/internal.h           |    4 
 fs/nfs/nfs2xdr.c            | 1350 +++++++++++++-------
 fs/nfs/nfs3proc.c           |    5 
 fs/nfs/nfs3xdr.c            | 2924 ++++++++++++++++++++++++++++++++-----------
 fs/nfs/nfs4xdr.c            |    7 
 fs/nfs/proc.c               |    2 
 include/linux/lockd/debug.h |   10 
 include/linux/nfs3.h        |    3 
 include/linux/sunrpc/xdr.h  |    1 
 net/sunrpc/rpcb_clnt.c      |    5 
 net/sunrpc/xdr.c            |   17 
 17 files changed, 4428 insertions(+), 1775 deletions(-)
 create mode 100644 fs/lockd/clnt4xdr.c
 create mode 100644 fs/lockd/clntxdr.c

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-09-17 16:30 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 16:26 [PATCH 00/22] Full NFSv2/v3 XDR overhaul series Chuck Lever
2010-09-17 16:26 ` [PATCH 01/22] NFS: Fix NFSv3 debugging messages in fs/nfs/nfs3proc.c Chuck Lever
2010-09-17 16:26 ` [PATCH 02/22] SUNRPC: Correct an rpcbind debugging message Chuck Lever
2010-09-17 16:26 ` [PATCH 03/22] SUNRPC: Refactor logic to NUL-terminate strings in pages Chuck Lever
2010-09-17 16:26 ` [PATCH 04/22] NFS: Introduce new-style XDR encoding functions for NFSv2 Chuck Lever
2010-09-17 16:27 ` [PATCH 05/22] NFS: Remove old NFSv2 encoder functions Chuck Lever
2010-09-17 16:27 ` [PATCH 06/22] NFS: Move and update xdr_encode_foo() functions that we're keeping Chuck Lever
2010-09-17 16:27 ` [PATCH 07/22] NFS: Use the "nfs_stat" enum for nfs_stat_to_errno()'s argument Chuck Lever
2010-09-17 16:27 ` [PATCH 08/22] NFS: Introduce new-style XDR decoding functions for NFSv2 Chuck Lever
2010-09-17 16:27 ` [PATCH 09/22] NFS: Replace old NFSv2 decoder functions with xdr_stream-based ones Chuck Lever
2010-09-17 16:27 ` [PATCH 10/22] NFS: Move and update xdr_decode_foo() functions that we're keeping Chuck Lever
2010-09-17 16:28 ` [PATCH 11/22] lockd: Introduce new-style XDR functions for NLMv3 Chuck Lever
2010-09-17 16:28 ` [PATCH 12/22] NFS: Introduce new-style XDR encoding functions for NFSv3 Chuck Lever
2010-09-17 16:28 ` [PATCH 13/22] NFS: Replace old NFSv3 encoder functions with xdr_stream-based ones Chuck Lever
2010-09-17 16:28 ` [PATCH 14/22] NFS: Remove unused old NFSv3 encoder functions Chuck Lever
2010-09-17 16:28 ` [PATCH 15/22] NFS: Move and update xdr_encode_foo() functions that we're keeping Chuck Lever
2010-09-17 16:28 ` [PATCH 16/22] NFS: Introduce new-style XDR decoding functions for NFSv2 Chuck Lever
2010-09-17 16:29 ` [PATCH 17/22] NFS: Switch in new NFSv3 decoder functions Chuck Lever
2010-09-17 16:29 ` [PATCH 18/22] NFS: Remove unused old " Chuck Lever
2010-09-17 16:29 ` [PATCH 19/22] NFS: Move and update xdr_decode_foo() functions that we're keeping Chuck Lever
2010-09-17 16:29 ` [PATCH 20/22] lockd: Introduce new-style XDR functions for NLMv4 Chuck Lever
2010-09-17 16:29 ` [PATCH 21/22] lockd: Move nlmdbg_cookie2a() to svclock.c Chuck Lever
2010-09-17 16:29 ` [PATCH 22/22] NFS: Fix hdrlen calculation in NFSv4's decode_read() Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2010-07-02 17:18 [PATCH 00/22] NFS v2 and v3 XDR overhaul Chuck Lever
     [not found] ` <20100702165935.8761.88528.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2010-07-02 17:19   ` [PATCH 06/22] NFS: Move and update xdr_encode_foo() functions that we're keeping Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).