History log of /include/linux/sunrpc/xdr.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bf118a342f10dafe44b14451a1392c3254629a1f 07-Dec-2011 Andy Adamson <andros@netapp.com> NFSv4: include bitmap in nfsv4 get acl data

The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
xdr length to the (cached) acl page data.

This is a general solution to commit e5012d1f "NFSv4.1: update
nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
when getting ACLs.

Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr
was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved.

Cc: stable@kernel.org
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
f7da7a129d57bfe0f74573dc03531c63e1360fae 19-May-2011 Benny Halevy <bhalevy@panasas.com> SUNRPC: introduce xdr_init_decode_pages

Initialize xdr_stream and xdr_buf using an array of page pointers
and length of buffer.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
/include/linux/sunrpc/xdr.h
68c404b18f6fba404b2753622d0459c68ee128ae 10-Jan-2011 Trond Myklebust <Trond.Myklebust@netapp.com> Merge branch 'bugfixes' into nfs-for-2.6.38

Conflicts:
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c
fs/nfs/nfs4xdr.c
6650239a4b01077e80d5a4468562756d77afaa59 08-Jan-2011 Trond Myklebust <Trond.Myklebust@netapp.com> NFS: Don't use vm_map_ram() in readdir

vm_map_ram() is not available on NOMMU platforms, and causes trouble
on incoherrent architectures such as ARM when we access the page data
through both the direct and the virtual mapping.

The alternative is to use the direct mapping to access page data
for the case when we are not crossing a page boundary, but to copy
the data into a linear scratch buffer when we are accessing data
that spans page boundaries.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: stable@kernel.org [2.6.37]
/include/linux/sunrpc/xdr.h
bf2695516db982e90a22fc94f93491b481796bb1 14-Dec-2010 Chuck Lever <chuck.lever@oracle.com> SUNRPC: New xdr_streams XDR decoder API

Now that all client-side XDR decoder routines use xdr_streams, there
should be no need to support the legacy calling sequence [rpc_rqst *,
__be32 *, RPC res *] anywhere. We can construct an xdr_stream in the
generic RPC code, instead of in each decoder function.

This is a refactoring change. It should not cause different behavior.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
9f06c719f474be7003763284a990bed6377bb0d4 14-Dec-2010 Chuck Lever <chuck.lever@oracle.com> SUNRPC: New xdr_streams XDR encoder API

Now that all client-side XDR encoder routines use xdr_streams, there
should be no need to support the legacy calling sequence [rpc_rqst *,
__be32 *, RPC arg *] anywhere. We can construct an xdr_stream in the
generic RPC code, instead of in each encoder function.

Also, all the client-side encoder functions return 0 now, making a
return value superfluous. Take this opportunity to convert them to
return void instead.

This is a refactoring change. It should not cause different behavior.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
35b61e63323ccf5fdcdd74b11751b58392c9cce1 20-Oct-2010 Benny Halevy <bhalevy@panasas.com> SUNRPC: define xdr_decode_opaque_fixed

A helper for decoding a fixed length opaque value.
Returns a pointer to the next item in the xdr stream.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
ba8e452a4fe64a51b74d43761e14d99f0666cc45 20-Oct-2010 Trond Myklebust <Trond.Myklebust@netapp.com> SUNRPC: Add a helper function xdr_inline_peek

We sometimes need to be able to read ahead in an xdr_stream without
incrementing the current pointer position.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
b4687da7fc5f741af7fee9b0248a2cf2ad9c4478 21-Sep-2010 Chuck Lever <chuck.lever@oracle.com> SUNRPC: Refactor logic to NUL-terminate strings in pages

Clean up: Introduce a helper to '\0'-terminate XDR strings
that are placed in a page in the page cache.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
9605a069f83d999e60cd57dc8010708fe08291c0 07-May-2010 Chuck Lever <chuck.lever@oracle.com> SUNRPC: Trivial cleanups in include/linux/sunrpc/xdr.h

Clean up: Update the documenting comment, and fix some minor white
space issues.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
97363c6a4f93a20380b4a9e11f35e27fed68a517 23-Sep-2009 Benny Halevy <bhalevy@panasas.com> sunrpc: xdr_xcode_hyper helpers cannot presume 64-bit alignment

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
98866b5abe1513cdacc011874ca045d40002eccd 14-Aug-2009 Benny Halevy <bhalevy@panasas.com> sunrpc: ntoh -> be*_to_cpu

ntohl is already defined as be32_to_cpu.
be64_to_cpu has architecture specific optimized implementations.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
9f162d2a810b4db48f7b8d7e734d0932c81ec2a1 14-Aug-2009 Benny Halevy <bhalevy@panasas.com> sunrpc: hton -> cpu_to_be*

htonl is already defined as cpu_to_be32.
cpu_to_be64 has architecture specific optimized implementations.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
405f55712dfe464b3240d7816cc4fe4174831be2 11-Jul-2009 Alexey Dobriyan <adobriyan@gmail.com> headers: smp_lock.h redux

* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

This will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/include/linux/sunrpc/xdr.h
77f18f5e4ebdea35ec3d92343b0ed7546dc87637 12-Feb-2009 Harvey Harrison <harvey.harrison@gmail.com> nfs: replace uses of __constant_{endian}

The base versions handle constant folding now, none of these headers
are exported to userspace, so the __ prefixed versions are not
necessary.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
/include/linux/sunrpc/xdr.h
88a9fe8cae3bb52e82489447f45e8d7ba1409ca8 23-Dec-2008 Trond Myklebust <Trond.Myklebust@netapp.com> SUNRPC: Remove the last remnant of the BKL...

Somehow, this escaped the previous purge. There should be no need to keep
any extra locks in the XDR callbacks.

The NFS client XDR code only writes into private objects, whereas all reads
of shared objects are confined to fields that do not change, such as
filehandles...

Ditto for lockd, the NFSv2/v3 client mount code, and rpcbind.

The nfsd XDR code may require the BKL, but since it does a synchronous RPC
call from a thread that already holds the lock, that issue is moot.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
e5cff482c78a35b9f149a06aa777a1bd693864fb 01-Nov-2007 Chuck Lever <chuck.lever@oracle.com> SUNRPC: Use unsigned string lengths in xdr_decode_string_inplace

XDR strings, opaques, and net objects should all use unsigned lengths.
To wit, RFC 4506 says:

4.2. Unsigned Integer

An XDR unsigned integer is a 32-bit datum that encodes a non-negative
integer in the range [0,4294967295].

...

4.11. String

The standard defines a string of n (numbered 0 through n-1) ASCII
bytes to be the number n encoded as an unsigned integer (as described
above), and followed by the n bytes of the string.

After this patch, xdr_decode_string_inplace now matches the other XDR
string and array helpers that take a string length argument. See:

xdr_encode_opaque_fixed, xdr_encode_opaque, xdr_encode_array

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-By: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
/include/linux/sunrpc/xdr.h
4f22ccc3460ef65e9899ec271d36fc4ef795c68d 10-Sep-2007 \"Talpey, Thomas\ <Thomas.Talpey@netapp.com> SUNRPC: mark bulk read/write data in xdrbuf

Adds a flag word to the xdrbuf struct which indicates any bulk
disposition of the data. This enables RPC transport providers to
marshal it efficiently/appropriately, and may enable other
optimizations.

Signed-off-by: Tom Talpey <tmt@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
be879c4e249a8875d7129f3b0c1bb62584dafbd8 12-Jul-2007 J. Bruce Fields <bfields@citi.umich.edu> SUNRPC: move bkl locking and xdr proc invocation into a common helper

Since every invocation of xdr encode or decode functions takes the BKL now,
there's a lot of redundant lock_kernel/unlock_kernel pairs that we can pull
out into a common function.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
dd4564715eae2c4136f278da9ae1c3bb5af3e509 05-Dec-2006 Chuck Lever <chuck.lever@oracle.com> SUNRPC: Rename skb_reader_t and friends

Clean-up: hch suggested that the RPC client shouldn't pollute the name
space used by the generic skb manipulation routines in net/core/skbuff.c.

Rename a couple of types in xdr.h to adhere to this convention.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
9d29231690925915015c21c1fff73c7118099843 05-Dec-2006 Chuck Lever <chuck.lever@oracle.com> SUNRPC: skb_read_bits is the same as xs_tcp_copy_data

Clean-up: eliminate xs_tcp_copy_data -- it's exactly the same logic as the
common routine skb_read_bits. The UDP and TCP socket read code now share
the same routine for copying data into an xdr_buf.

Now that skb_read_bits() is exported, rename it to avoid confusing it with
a generic skb_* function. As these functions are XDR-specific, they should
not have names that suggest they are of generic use. Also rename
skb_read_and_csum_bits() to be consistent.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
37a4e6cb0391f2293ba3d59e3a63ec0e56ed720d 05-Dec-2006 Olga Kornievskaia <aglo@citi.umich.edu> rpc: move process_xdr_buf

Since process_xdr_buf() is useful outside of the kerberos-specific code, we
move it to net/sunrpc/xdr.c, export it, and rename it in keeping with xdr_*
naming convention of xdr.c.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
1e78957e0a8f882df6a3660b62f9aae441f54891 31-Aug-2006 Trond Myklebust <Trond.Myklebust@netapp.com> SUNRPC: Clean up argument types in xdr.c

Converts various integer buffer offsets and sizes to unsigned integer.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
44bb93633f57a55979f3c2589b10fd6a2bfc7c08 15-Nov-2006 Al Viro <viro@zeniv.linux.org.uk> [NET]: Annotate csum_partial() callers in net/*

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
/include/linux/sunrpc/xdr.h
d343fce148a4eee24a907a05c4101d3268045aae 17-Oct-2006 NeilBrown <neilb@suse.de> [PATCH] knfsd: Allow lockd to drop replies as appropriate

It is possible for the ->fopen callback from lockd into nfsd to find that an
answer cannot be given straight away (an upcall is needed) and so the request
has to be 'dropped', to be retried later. That error status is not currently
propagated back.

So:
Change nlm_fopen to return nlm error codes (rather than a private
protocol) and define a new nlm_drop_reply code.
Cause nlm_drop_reply to cause the rpc request to get rpc_drop_reply
when this error comes back.
Cause svc_process to drop a request which returns a status of
rpc_drop_reply.

[akpm@osdl.org: fix warning storm]
Cc: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/include/linux/sunrpc/xdr.h
d8ed029d6000ba2e2908d9286409e4833c091b4c 27-Sep-2006 Alexey Dobriyan <adobriyan@gmail.com> [SUNRPC]: trivial endianness annotations

pure s/u32/__be32/

[AV: large part based on Alexey's patches]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
/include/linux/sunrpc/xdr.h
8b23ea7bedb8b45a5bb56745fa3ff11018acf04e 09-Jun-2006 Trond Myklebust <Trond.Myklebust@netapp.com> RPC: Allow struc xdr_stream to read the page section of an xdr_buf

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
fb459f45f7c7689714023d41b3dca999bb90a5d3 03-Jan-2006 Adrian Bunk <bunk@stusta.de> SUNRPC: net/sunrpc/xdr.c: remove xdr_decode_string()

This patch removes ths unused function xdr_decode_string().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Neil Brown <neilb@suse.de>
Acked-by: Charles Lever <Charles.Lever@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
40859d7ee64ed6bfad8a4e93f9bb5c1074afadff 01-Dec-2005 Chuck Lever <cel@netapp.com> NFS: support large reads and writes on the wire

Most NFS server implementations allow up to 64KB reads and writes on the
wire. The Solaris NFS server allows up to a megabyte, for instance.

Now the Linux NFS client supports transfer sizes up to 1MB, too. This will
help reduce protocol and context switch overhead on read/write intensive NFS
workloads, and support larger atomic read and write operations on servers
that support them.

Test-plan:
Connectathon and iozone on mount point with wsize=rsize>32768 over TCP.
Tests with NFS over UDP to verify the maximum RPC payload size cap.

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
a246b0105bbd9a70a698f69baae2042996f2a0e9 11-Aug-2005 Chuck Lever <cel@citi.umich.edu> [PATCH] RPC: introduce client-side transport switch

Move the bulk of client-side socket-specific code into a separate source
file, net/sunrpc/xprtsock.c.

Test-plan:
Millions of fsx operations. Performance characterization such as "sio" or
"iozone". Destructive testing (unplugging the network temporarily, server
reboots). Connectathon with v2, v3, and v4.

Version: Thu, 11 Aug 2005 16:03:38 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
094bb20b9fcab3a1652a77741caba6b78097d622 11-Aug-2005 Chuck Lever <cel@citi.umich.edu> [PATCH] RPC: extract socket logic common to both client and server

Clean-up: Move some code that is common to both RPC client- and server-side
socket transports into its own source file, net/sunrpc/socklib.c.

Test-plan:
Compile kernel with CONFIG_NFS enabled. Millions of fsx operations over
UDP, client and server. Connectathon over UDP.

Version: Thu, 11 Aug 2005 16:03:09 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
58fcb8df0bf663bb6b8f46cd3010bfe8d13d97cf 11-Aug-2005 Trond Myklebust <Trond.Myklebust@netapp.com> [PATCH] NFS: Ensure ACL xdr code doesn't overflow.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/include/linux/sunrpc/xdr.h
bd8100e7eda87507649c6ba4cb32173b34e49986 22-Jun-2005 Andreas Gruenbacher <agruen@suse.de> [PATCH] RPC: Encode and decode arbitrary XDR arrays

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
7e06b53d796a3740307b54aa2799077f8a0c84e7 22-Jun-2005 Trond Myklebust <Trond.Myklebust@netapp.com> [PATCH] RPC: fix accounting bug in the case of a truncated RPC message

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
e053d1ab62c8ef0eff3dd4c95448cad3c6d2fbf4 22-Jun-2005 Olaf Kirch <okir@suse.de> [PATCH] RPC: Lazy RPC receive buffer allocation

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
/include/linux/sunrpc/xdr.h
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/include/linux/sunrpc/xdr.h