07 Jan, 2006
40 commits
-
This patch should fix compilation failure of fs/ufs/dir.c with defined UFS_DIR_DEBUG
Signed-off-by: Evgeniy Dushistov
Signed-off-by: Linus Torvalds -
If the loop errors, we need to exit.
Signed-off-by: Trond Myklebust
-
If someone changes the uid/gid mapping in userland, then we do eventually
want those changes to be propagated to the kernel. Currently the kernel
assumes that it may cache entries forever.Add an expiration time + garbage collector for idmap entries.
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
inode->i_mode contains a lot more than just the mode bits. Make sure that
we mask away this extra stuff in SETATTR calls to the server.Signed-off-by: Trond Myklebust
-
Clean up: Every ULP that uses the in-kernel RPC client, except the NLM
client, sets cl_chatty. There's no reason why NLM shouldn't set it, so
just get rid of cl_chatty and always be verbose.Test-plan:
Compile with CONFIG_NFS enabled.Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
We'd like to hide fields in rpc_xprt and rpc_clnt from upper layer protocols.
Start by creating an API to force RPC rebind, replacing logic that simply
sets cl_port to zero.Test-plan:
Destructive testing (unplugging the network temporarily). Connectathon
with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked.
Probably need to rig a server where certain services aren't running, or
that returns an error for some typical operation.Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
Thanks to Ed Keizer for bug and root cause. He says: "... we could only mount
the top-level Solaris share. We could not mount deeper into the tree.
Investigation showed that Solaris allows UNIX authenticated FSINFO only on the
top level of the share. This is a problem because we share/export our home
directories one level higher than we mount them. I.e. we share the partition
and not the individual home directories. This prevented access to home
directories."We still may need to try auth_sys for the case where the client doesn't have
appropriate credentials.Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
The procedure that decodes statd sm_notify call seems to be skipping a
few arguments. How did this ever work?>From folks at Polyserve.
Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
If the server receives an NLM cancel call and finds no waiting lock to
cancel, then chances are the lock has already been applied, and the client
just hadn't yet processed the NLM granted callback before it sent the
cancel.The Open Group text, for example, perimts a server to return either success
(LCK_GRANTED) or failure (LCK_DENIED) in this case. But returning an error
seems more helpful; the client may be able to use it to recognize that a
race has occurred and to recover from the race.So, modify the relevant functions to return an error in this case.
Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
The fl_next check here is superfluous (and possibly a layering violation).
Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
Currently when lockd gets an NLM_CANCEL request, it also does an unlock for
the same range. This is incorrect.The Open Group documentation says that "This procedure cancels an
*outstanding* blocked lock request." (Emphasis mine.)Also, consider a client that holds a lock on the first byte of a file, and
requests a lock on the entire file. If the client cancels that request
(perhaps because the requesting process is signalled), the server shouldn't
apply perform an unlock on the entire file, since that will also remove the
previous lock that the client was already granted.Or consider a lock request that actually *downgraded* an exclusive lock to
a shared lock.Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
Slightly simpler logic here makes it more trivial to verify that the up's
and down's are balanced here. Break out an assignment from a conditional
while we're at it.Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust -
Signed-off-by: Trond Myklebust
-
...and ensure that nfs_update_inode() respects wcc
Signed-off-by: Trond Myklebust
-
Upon return of a write delegation, the server will almost always bump the
change attribute. Ensure that we pick up that change so that we don't
invalidate our data cache unnecessarily.Signed-off-by: Trond Myklebust
-
According to RFC3530 we're supposed to cache the change attribute
at the time the client receives a write delegation.
If the inode is clean, a CB_GETATTR callback by the server to the
client is supposed to return the cached change attribute.
If, OTOH, the inode is dirty, the client should bump the cached
change attribute by 1.Signed-off-by: Trond Myklebust
-
...and avoid calling set_page_dirty on them
Signed-off-by: Trond Myklebust
-
The SuS states that a call to write() will cause mtime to be updated on
the file. In order to satisfy that requirement, we need to flush out
any cached writes in nfs_getattr().
Speed things up slightly by not committing the writes.Signed-off-by: Trond Myklebust
-
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 -
To help NFS users and server developers, make the "inode number mismatch"
message display more useful information.Test-plan:
None.Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
nfs_statfs() generates a log message when GETATTR returns an error. This
is usually a useless message. Make it a dprintk.Test plan:
NoneSigned-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
Red Hat found a problem in the error recovery logic in __init_nfs.
Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
Replace ad hoc write parameter sanity checking in nfs_file_direct_write()
with a call to generic_write_checks(). This should make the proper checks
modulo the O_LARGEFILE flag, and should catch NFSv2-specific limitations by
virtue of i_sb->s_maxbytes.Test plan:
Posix compliance testing with both NFSv2 and NFSv3.Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust -
Use a cred from the nfs4_client->cl_state_owners list.
Signed-off-by: Trond Myklebust
-
In RFC3530, the RENEW operation is allowed to use either
the same principal, RPC security flavour and (if RPCSEC_GSS), the same
mechanism and service that was used for SETCLIENTID_CONFIRMOR
Any principal, RPC security flavour and service combination that
currently has an OPEN file on the server.Choose the latter since that doesn't require us to keep credentials for
the same principal for the entire duration of the mount.Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
Convert private implementations in NFSv4 state recovery and delegation
code to use kthreads.Signed-off-by: Trond Myklebust
-
Use wait_on_bit() when waiting for state recovery to complete.
Signed-off-by: Trond Myklebust
-
Cut down on the number of unnecessary RENEW requests on the wire.
Signed-off-by: Trond Myklebust
-
...and make sure that the "intr" flag also enables SIGHUP and SIGTERM to
interrupt RPC calls too (as per the Solaris implementation).Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
In order to allow users to interrupt/cancel it.
Signed-off-by: Trond Myklebust
-
Get rid of some unnecessary intermediate structures
Signed-off-by: Trond Myklebust
-
When recovering from a delegation recall or a network partition, we need
to replay open(O_RDWR), open(O_RDONLY) and open(O_WRONLY) separately.Signed-off-by: Trond Myklebust
-
A closer reading of RFC3530 reveals that OPEN_DOWNGRADE must always
specify a access modes that have been the argument of a previous OPEN
operation.
IOW: doing OPEN(O_RDWR) and then OPEN_DOWNGRADE(O_WRONLY) is forbidden
unless the user called OPEN(O_WRONLY)In order to fix that, we really need to track the three possible open
states separately.Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
OPEN is a stateful operation, so we must ensure that it always
completes. In order to allow users to interrupt the operation,
we need to make the RPC call asynchronous, and then wait on
completion (or cancel).Signed-off-by: Trond Myklebust