10 Jul, 2008

2 commits

  • All instances are set to nfs_open(), so we should just remove the redundant
    indirection. Ditto for the file_release op

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • NFSv2 file locking currently fails the Connectathon tests, because the
    calls to the VFS locking code do not return an EINVAL error if the
    struct file_lock overflows the 32-bit boundaries.

    The problem is due to the fact that we occasionally call helpers from
    fs/locks.c in order to avoid RPC calls to the server when we know that a
    local process holds the lock. These helpers are, of course, always
    64-bit enabled, so EINVAL is not returned in cases when it would if
    the call had gone to the NLM code.

    For consistency, we therefore add support for a bounds-checking helper.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

20 Apr, 2008

1 commit

  • It is quite possible that the OPEN, CLOSE, LOCK, LOCKU,... compounds fail
    before the actual stateful operation has been executed (for instance in the
    PUTFH call). There is no way to tell from the overall status result which
    operations were executed from the COMPOUND.

    The fix is to move incrementing of the sequence id into the XDR layer,
    so that we do it as we process the results from the stateful operation.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

30 Jan, 2008

4 commits


10 Oct, 2007

2 commits


20 Jul, 2007

2 commits

  • Fix a couple of bugs:
    - Don't rely on the parent dentry still being valid when the call completes.
    Fixes a race with shrink_dcache_for_umount_subtree()

    - Don't remove the file if the filehandle has been labelled as stale.

    Fix a couple of inefficiencies
    - Remove the global list of sillyrenamed files. Instead we can cache the
    sillyrename information in the dentry->d_fsdata
    - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • We need a common structure for setting up an unlink() rpc call in order to
    fix the asynchronous unlink code.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

11 Jul, 2007

2 commits

  • Currently we just use a 32-bit counter.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • The Linux NFS4 client simply skips over the bitmask in an O_EXCL open
    call and so it doesn't bother to reset any fields that may be holding
    the verifier. This patch has us save the first two words of the bitmask
    (which is all the current client has #defines for). The client then
    later checks this bitmask and turns on the appropriate flags in the
    sattr->ia_verify field for the following SETATTR call.

    This patch only currently checks to see if the server used the atime
    and mtime slots for the verifier (which is what the Linux server uses
    for this). I'm not sure of what other fields the server could
    reasonably use, but adding checks for others should be trivial.

    Signed-off-by: Jeff Layton
    Signed-off-by: Trond Myklebust

    Jeff Layton
     

13 Feb, 2007

2 commits


04 Feb, 2007

1 commit


06 Dec, 2006

1 commit


21 Oct, 2006

2 commits


23 Sep, 2006

6 commits

  • Now that we have a copy of the symlink path in the page cache, we can pass
    a struct page down to the XDR routines instead of a string buffer.

    Test plan:
    Connectathon, all NFS versions.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • If the LOOKUP or GETATTR in nfs_instantiate fail, nfs_instantiate will do a
    d_drop before returning. But some callers already do a d_drop in the case
    of an error return. Make certain we do only one d_drop in all error paths.

    This issue was introduced because over time, the symlink proc API diverged
    slightly from the create/mkdir/mknod proc API. To prevent other coding
    mistakes of this type, change the symlink proc API to be more like
    create/mkdir/mknod and move the nfs_instantiate call into the symlink proc
    routines so it is used in exactly the same way for create, mkdir, mknod,
    and symlink.

    Test plan:
    Connectathon, all versions of NFS.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • include/linux/sunrpc/clnt.h already includes include/linux/sunrpc/xprt.h.
    We can remove xprt.h from source files that already include clnt.h.
    Likewise include/linux/sunrpc/timer.h.

    Test plan:
    Compile kernel with CONFIG_NFS enabled.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Add some extra const qualifiers into NFS.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     
  • Add a set_capabilities NFS RPC op so that the server capabilities can be set.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     
  • Add a lookup filehandle NFS RPC op so that a file handle can be looked up
    without requiring dentries and inodes and other VFS stuff when doing an NFS4
    pathwalk during mounting.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     

09 Sep, 2006

1 commit

  • The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can
    allow data->npages to be one larger than rpages. This causes a page
    pointer to be written beyond the end of the pagevec in nfs_read_data (or
    nfs_write_data).

    Fix this by making nfs_(read|write)_alloc() calculate the size of the
    pagevec array, and initialise data->npages.

    Also get rid of the redundant argument to nfs_commit_alloc().

    Signed-off-by: Trond Myklebust
    Cc: Chuck Lever
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

25 Aug, 2006

1 commit

  • Neil Brown observed that the current limit of 32 bytes isn't enough to hold two
    ip addresses and the rest of the stuff we're putting in it, so it's often
    truncated to the point where it's unlikely to be unique. This can cause
    spurious CLID_INUSE's from the server.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust
    (cherry picked from fc8c17ec251e984ab3df9182ed097aa5b577c915 commit)

    J. Bruce Fields
     

29 Jun, 2006

1 commit

  • This reverts ccf01ef7aa9c6c293a1c64c27331a2ce227916ec commit.

    No idea how git managed this one: when I asked it to merge the odirect
    topic branch it actually generated a patch which reverted the change.

    Reverting the 'merge' will once again reveal Chuck's recent NFS/O_DIRECT
    work to the world.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

25 Jun, 2006

2 commits

  • Trond Myklebust
     
  • Neil Brown observed that the kmalloc() in nfs_get_user_pages() is more
    likely to fail if the I/O is large enough to require the allocation of more
    than a single page to keep track of all the pinned pages in the user's
    buffer.

    Instead of tracking one large page array per dreq/iocb, track pages per
    nfs_read/write_data, just like the cached I/O path does. An array for
    pages is already allocated for us by nfs_readdata_alloc() (and the write
    and commit equivalents).

    This is also required for adding support for vectored I/O to the NFS direct
    I/O path.

    The original reason to pin the user buffer and allocate all the NFS data
    structures before trying to schedule I/O was to ensure all needed resources
    are allocated on the client before starting to send requests. This reduces
    the chance that resource exhaustion on the client will cause a short read
    or write.

    On the other hand, for an application making very large application I/O
    requests, this means that it will be nearly impossible for the application
    to make forward progress on a resource-limited client.

    Thus, moving the buffer pinning functionality into the I/O scheduling
    loops should be good for scalability. The next patch will do the same for
    NFS data structure allocation.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

09 Jun, 2006

6 commits


21 Mar, 2006

2 commits

  • Same callback hierarchy inversion as for the NFS write calls. This patch is
    not strictly speaking needed by the O_DIRECT code, but avoids confusing
    differences between the asynchronous read and write code.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • This patch inverts the callback hierarchy for NFS write calls.

    Instead of having the NFSv2/v3/v4-specific code set up the RPC callback
    ops, we allow the original caller to do so. This allows for more
    flexibility w.r.t. how to set up and tear down the nfs_write_data
    structure while still allowing the NFSv3/v4 code to perform error
    handling.

    The greater flexibility is needed by the asynchronous O_DIRECT code, which
    wants to be able to hold on to the original nfs_write_data structures after
    the WRITE RPC call has completed in order to be able to replay them if the
    COMMIT call determines that the server has rebooted.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

07 Jan, 2006

2 commits

  • 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

    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

    Chuck Lever