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

4 commits


28 Oct, 2005

7 commits


19 Oct, 2005

5 commits

  • Make NFSv4 return the fully initialized file pointer with the
    stateid that it created in the lookup w/intent.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Currently we fail to do so if the process was signalled.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Once the state_owner and lock_owner semaphores get removed, it will be
    possible for other OPEN requests to reopen the same file if they have
    lower sequence ids than our CLOSE call.
    This patch ensures that we recheck the file state once
    nfs_wait_on_sequence() has completed waiting.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • NFSv4 file state-changing functions such as OPEN, CLOSE, LOCK,... are all
    labelled with "sequence identifiers" in order to prevent the server from
    reordering RPC requests, as this could cause its file state to
    become out of sync with the client.

    Currently the NFS client code enforces this ordering locally using
    semaphores to restrict access to structures until the RPC call is done.
    This, of course, only works with synchronous RPC calls, since the
    user process must first grab the semaphore.
    By dropping semaphores, and instead teaching the RPC engine to hold
    the RPC calls until they are ready to be sent, we can extend this
    process to work nicely with asynchronous RPC calls too.

    This patch adds a new list called "rpc_sequence" that defines the order
    of the RPC calls to be sent. We add one such list for each state_owner.
    When an RPC call is ready to be sent, it checks if it is top of the
    rpc_sequence list. If so, it proceeds. If not, it goes back to sleep,
    and loops until it hits top of the list.
    Once the RPC call has completed, it can then bump the sequence id counter,
    and remove itself from the rpc_sequence list, and then wake up the next
    sleeper.

    Note that the state_owner sequence ids and lock_owner sequence ids are
    all indexed to the same rpc_sequence list, so OPEN, LOCK,... requests
    are all ordered w.r.t. each other.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

23 Jun, 2005

2 commits

  • This adds acl support fo nfs clients via the NFSACL protocol extension, by
    implementing the getxattr, listxattr, setxattr, and removexattr iops for the
    system.posix_acl_access and system.posix_acl_default attributes. This patch
    implements a dumb version that uses no caching (and thus adds some overhead).
    (Another patch in this patchset adds caching as well.)

    Signed-off-by: Andreas Gruenbacher
    Acked-by: Olaf Kirch
    Signed-off-by: Andrew Morton
    Signed-off-by: Trond Myklebust

    Andreas Gruenbacher
     
  • Client-side support for NFSv4 acls: xdr encoding and decoding routines for
    writing acls

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    J. Bruce Fields