24 Mar, 2011

5 commits

  • The filelayout driver sends LAYOUTCOMMIT only when COMMIT goes to
    the data server (as opposed to the MDS) and the data server WRITE
    is not NFS_FILE_SYNC.

    Only whole file layout support means that there is only one IOMODE_RW layout
    segment.

    Signed-off-by: Andy Adamson
    Signed-off-by: Alexandros Batsakis
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Fred Isaman
    Signed-off-by: Mingyang Guo
    Signed-off-by: Tao Guo
    Signed-off-by: Zhang Jingwang
    Tested-by: Boaz Harrosh
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • Implement all the hooks created in the previous patches.
    This requires exporting quite a few functions and adding a few
    structure fields.

    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • We create three major hooks for the pnfs code.

    pnfs_mark_request_commit() is called during writeback_done from
    nfs_mark_request_commit, which gives the driver an opportunity to
    claim it wants control over commiting a particular req.

    pnfs_choose_commit_list() is called from nfs_scan_list
    to choose which list a given req should be added to, based on
    where we intend to send it for COMMIT. It is up to the driver
    to have preallocated list headers for each destination it may need.

    pnfs_commit_list() is how the driver actually takes control, it is
    used instead of nfs_commit_list().

    In order to pass information between the above functions, we create
    a union in nfs_page to hold a lseg (which is possible because the req is
    not on any list while in transition), and add some flags to indicate
    if we need to use the pnfs code.

    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Some filesystems (such as ext4) can return the same cookie value for
    multiple files. If we try to start a readdir with one of these cookies,
    the server will return the first file found with a cookie of the same
    value. This can cause the client to enter an infinite loop.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     
  • nfs_opendir() created a context that held much more information than we
    need for a readdir. This patch introduces a slimmed-down
    nfs_open_dir_context that contains only the cookie and the cred used for
    RPC operations. The new context will eventually be used to help detect
    readdir loops.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     

22 Mar, 2011

1 commit


12 Mar, 2011

1 commit


16 Jan, 2011

1 commit


07 Jan, 2011

1 commit


02 Dec, 2010

1 commit

  • We need to ensure that the entries in the nfs_cache_array get cleared
    when the page is removed from the page cache. To do so, we use the
    freepage address_space operation.

    Change nfs_readdir_clear_array to use kmap_atomic(), so that the
    function can be safely called from all contexts.

    Finally, modify the cache_page_release helper to call
    nfs_readdir_clear_array directly, when dealing with an anonymous
    page from 'uncached_readdir'.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

17 Nov, 2010

1 commit


27 Oct, 2010

1 commit

  • * 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    net/sunrpc: Use static const char arrays
    nfs4: fix channel attribute sanity-checks
    NFSv4.1: Use more sensible names for 'initialize_mountpoint'
    NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
    NFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
    NFS: client needs to maintain list of inodes with active layouts
    NFS: create and destroy inode's layout cache
    NFSv4.1: pnfs: filelayout: introduce minimal file layout driver
    NFSv4.1: pnfs: full mount/umount infrastructure
    NFS: set layout driver
    NFS: ask for layouttypes during v4 fsinfo call
    NFS: change stateid to be a union
    NFSv4.1: pnfsd, pnfs: protocol level pnfs constants
    SUNRPC: define xdr_decode_opaque_fixed
    NFSD: remove duplicate NFS4_STATEID_SIZE

    Linus Torvalds
     

26 Oct, 2010

1 commit

  • * 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (67 commits)
    SUNRPC: Cleanup duplicate assignment in rpcauth_refreshcred
    nfs: fix unchecked value
    Ask for time_delta during fsinfo probe
    Revalidate caches on lock
    SUNRPC: After calling xprt_release(), we must restart from call_reserve
    NFSv4: Fix up the 'dircount' hint in encode_readdir
    NFSv4: Clean up nfs4_decode_dirent
    NFSv4: nfs4_decode_dirent must clear entry->fattr->valid
    NFSv4: Fix a regression in decode_getfattr
    NFSv4: Fix up decode_attr_filehandle() to handle the case of empty fh pointer
    NFS: Ensure we check all allocation return values in new readdir code
    NFS: Readdir plus in v4
    NFS: introduce generic decode_getattr function
    NFS: check xdr_decode for errors
    NFS: nfs_readdir_filler catch all errors
    NFS: readdir with vmapped pages
    NFS: remove page size checking code
    NFS: decode_dirent should use an xdr_stream
    SUNRPC: Add a helper function xdr_inline_peek
    NFS: remove readdir plus limit
    ...

    Linus Torvalds
     

25 Oct, 2010

3 commits

  • At the start of the io paths, try to grab the relevant layout
    information. This will initiate the inode's layout cache, but
    stubs ensure the cache stays empty.

    Signed-off-by: Benny Halevy
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Tao Guo
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Andy Adamson
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Benny Halevy
     
  • This driver just registers itself and supplies trivial mount/umount functions.

    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Dean Hildebrand
     
  • Put in the infrastructure that uses information returned from the
    server at mount to select a layout driver module.

    In this patch, a stub is used that always returns "no driver found".

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Ricardo Labiaga
     

18 Sep, 2010

1 commit

  • ...since that's where most of the sillyrenaming code lives. A comment
    block is added to the beginning as well to clarify how sillyrenaming
    works. Also, make nfs_async_unlink static as nfs_sillyrename is the only
    caller.

    Signed-off-by: Jeff Layton
    Reviewed-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Jeff Layton
     

17 Sep, 2010

2 commits

  • Start moving the 'struct nameidata' dependent code out of the lower level
    NFS code in preparation for the removal of open intents.

    Instead of the struct nameidata, we pass down a partially initialised
    struct nfs_open_context that will be fully initialised by the atomic open
    upon success.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Replace duplicate code in NFSROOT for mounting an NFS server on '/'
    with logic that uses the existing mainline text-based logic in the NFS
    client.

    Add documenting comments where appropriate.

    Note that this means NFSROOT mounts now use the same default settings
    as v2/v3 mounts done via mount(2) from user space.

    vers=3,tcp,rsize=,wsize=

    As before, however, no version/protocol negotiation with the server is
    done.

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

    Chuck Lever
     

20 Aug, 2010

1 commit


08 Aug, 2010

1 commit

  • * 'nfs-for-2.6.36' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (42 commits)
    NFS: NFSv4.1 is no longer a "developer only" feature
    NFS: NFS_V4 is no longer an EXPERIMENTAL feature
    NFS: Fix /proc/mount for legacy binary interface
    NFS: Fix the locking in nfs4_callback_getattr
    SUNRPC: Defer deleting the security context until gss_do_free_ctx()
    SUNRPC: prevent task_cleanup running on freed xprt
    SUNRPC: Reduce asynchronous RPC task stack usage
    SUNRPC: Move the bound cred to struct rpc_rqst
    SUNRPC: Clean up of rpc_bindcred()
    SUNRPC: Move remaining RPC client related task initialisation into clnt.c
    SUNRPC: Ensure that rpc_exit() always wakes up a sleeping task
    SUNRPC: Make the credential cache hashtable size configurable
    SUNRPC: Store the hashtable size in struct rpc_cred_cache
    NFS: Ensure the AUTH_UNIX credcache is allocated dynamically
    NFS: Fix the NFS users of rpc_restart_call()
    SUNRPC: The function rpc_restart_call() should return success/failure
    NFSv4: Get rid of the bogus RPC_ASSASSINATED(task) checks
    NFSv4: Clean up the process of renewing the NFSv4 lease
    NFSv4.1: Handle NFS4ERR_DELAY on SEQUENCE correctly
    NFS: nfs_rename() should not have to flush out writebacks
    ...

    Linus Torvalds
     

02 Aug, 2010

1 commit

  • nfs_commit_inode() needs to be defined irrespectively of whether or not
    we are supporting NFSv3 and NFSv4.

    Allow the compiler to optimise away code in the NFSv2-only case by
    converting it into an inlined stub function.

    Reported-and-tested-by: Ingo Molnar
    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

31 Jul, 2010

2 commits


15 May, 2010

1 commit


23 Apr, 2010

1 commit

  • Commit 2c61be0a9478258f77b66208a0c4b1f5f8161c3c (NFS: Ensure that the WRITE
    and COMMIT RPC calls are always uninterruptible) exposed a race on file
    close. In order to ensure correct close-to-open behaviour, we want to wait
    for all outstanding background commit operations to complete.

    This patch adds an inode flag that indicates if a commit operation is under
    way, and provides a mechanism to allow ->write_inode() to wait for its
    completion if this is a data integrity flush.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

06 Mar, 2010

6 commits


27 Sep, 2009

1 commit

  • * remove asm/atomic.h inclusion from kref.h -- not needed, linux/types.h
    is enough for atomic_t
    * remove linux/kref.h inclusion from files which do not need it.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

12 Aug, 2009

1 commit

  • We can't call nfs_readdata_release()/nfs_writedata_release() without
    first initialising and referencing args.context. Doing so inside
    nfs_direct_read_schedule_segment()/nfs_direct_write_schedule_segment()
    causes an Oops.

    We should rather be calling nfs_readdata_free()/nfs_writedata_free() in
    those cases.

    Looking at the O_DIRECT code, the "struct nfs_direct_req" is already
    referencing the nfs_open_context for us. Since the readdata and writedata
    structures carry a reference to that, we can simplify things by getting rid
    of the extra nfs_open_context references, so that we can replace all
    instances of nfs_readdata_release()/nfs_writedata_release().

    Reported-by: Catalin Marinas
    Signed-off-by: Trond Myklebust
    Tested-by: Catalin Marinas
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

03 Apr, 2009

3 commits


02 Apr, 2009

1 commit


28 Mar, 2009

1 commit


12 Mar, 2009

1 commit

  • The following patch is a combination of a patch by myself and Peter
    Staubach.

    Trond: If we allow other processes to dirty pages while a process is doing
    a consistency sync to disk, we can end up never making progress.

    Peter: Attached is a patch which addresses a continuing problem with
    the NFS client generating out of order WRITE requests. While
    this is compliant with all of the current protocol
    specifications, there are servers in the market which can not
    handle out of order WRITE requests very well. Also, this may
    lead to sub-optimal block allocations in the underlying file
    system on the server. This may cause the read throughputs to
    be reduced when reading the file from the server.

    Peter: There has been a lot of work recently done to address out of
    order issues on a systemic level. However, the NFS client is
    still susceptible to the problem. Out of order WRITE
    requests can occur when pdflush is in the middle of writing
    out pages while the process dirtying the pages calls
    generic_file_buffered_write which calls
    generic_perform_write which calls
    balance_dirty_pages_rate_limited which ends up calling
    writeback_inodes which ends up calling back into the NFS
    client to writes out dirty pages for the same file that
    pdflush happens to be working with.

    Signed-off-by: Peter Staubach
    [modification by Trond to merge the two similar patches]
    Signed-off-by: Trond Myklebust

    Trond Myklebust