05 Jan, 2012
1 commit
-
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
Signed-off-by: Trond Myklebust
30 May, 2011
1 commit
-
Initialize xdr_stream and xdr_buf using an array of page pointers
and length of buffer.Signed-off-by: Benny Halevy
11 Jan, 2011
2 commits
-
Conflicts:
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c
fs/nfs/nfs4xdr.c -
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
Tested-by: Marc Kleine-Budde
Cc: stable@kernel.org [2.6.37]
17 Dec, 2010
2 commits
-
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
Tested-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
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
Tested-by: J. Bruce Fields
Signed-off-by: Trond Myklebust
25 Oct, 2010
1 commit
-
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
Signed-off-by: Fred Isaman
Signed-off-by: Trond Myklebust
24 Oct, 2010
1 commit
-
We sometimes need to be able to read ahead in an xdr_stream without
incrementing the current pointer position.Signed-off-by: Trond Myklebust
22 Sep, 2010
1 commit
-
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
Signed-off-by: Trond Myklebust
15 May, 2010
1 commit
-
Clean up: Update the documenting comment, and fix some minor white
space issues.Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust
24 Sep, 2009
1 commit
-
Signed-off-by: Benny Halevy
Signed-off-by: Trond Myklebust
15 Aug, 2009
2 commits
-
ntohl is already defined as be32_to_cpu.
be64_to_cpu has architecture specific optimized implementations.Signed-off-by: Benny Halevy
Signed-off-by: Trond Myklebust -
htonl is already defined as cpu_to_be32.
cpu_to_be64 has architecture specific optimized implementations.Signed-off-by: Benny Halevy
Signed-off-by: Trond Myklebust
13 Jul, 2009
1 commit
-
* 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_PREEMPTThis will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
19 Mar, 2009
1 commit
-
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
Reviewed-by: NeilBrown
Signed-off-by: J. Bruce Fields
24 Dec, 2008
1 commit
-
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
02 Feb, 2008
1 commit
-
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
Acked-By: NeilBrown
Signed-off-by: J. Bruce Fields
10 Oct, 2007
1 commit
-
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
Signed-off-by: Trond Myklebust
20 Jul, 2007
1 commit
-
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
Signed-off-by: Trond Myklebust
06 Dec, 2006
4 commits
-
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
Signed-off-by: Trond Myklebust -
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
Signed-off-by: Trond Myklebust -
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
Signed-off-by: Trond Myklebust -
Converts various integer buffer offsets and sizes to unsigned integer.
Signed-off-by: Trond Myklebust
03 Dec, 2006
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: David S. Miller
17 Oct, 2006
1 commit
-
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
Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Sep, 2006
1 commit
-
pure s/u32/__be32/
[AV: large part based on Alexey's patches]
Signed-off-by: Alexey Dobriyan
Signed-off-by: Al Viro
Signed-off-by: David S. Miller
09 Jun, 2006
1 commit
-
Signed-off-by: Trond Myklebust
07 Jan, 2006
2 commits
-
This patch removes ths unused function xdr_decode_string().
Signed-off-by: Adrian Bunk
Acked-by: Neil Brown
Acked-by: Charles Lever
Signed-off-by: Trond Myklebust -
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
Signed-off-by: Trond Myklebust
24 Sep, 2005
2 commits
-
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
Signed-off-by: Trond Myklebust -
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
Signed-off-by: Trond Myklebust
16 Aug, 2005
1 commit
-
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds
23 Jun, 2005
3 commits
-
Signed-off-by: Andreas Gruenbacher
Acked-by: Olaf Kirch
Signed-off-by: Trond Myklebust -
Signed-off-by: Trond Myklebust
-
Signed-off-by: Olaf Kirch
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Trond Myklebust
17 Apr, 2005
1 commit
-
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!