04 Jan, 2012

1 commit


05 Nov, 2011

1 commit

  • commit d953126 changed how nfs_atomic_lookup handles an -EISDIR return
    from an OPEN call. Prior to that patch, that caused the client to fall
    back to doing a normal lookup. When that patch went in, the code began
    returning that error to userspace. The d_revalidate codepath however
    never had the corresponding change, so it was still possible to end up
    with a NULL ctx->state pointer after that.

    That patch caused a regression. When we attempt to open a directory that
    does not have a cached dentry, that open now errors out with EISDIR. If
    you attempt the same open with a cached dentry, it will succeed.

    Fix this by reverting the change in nfs_atomic_lookup and allowing
    attempts to open directories to fall back to a normal lookup

    Also, add a NFSv4-specific f_ops->open routine that just returns
    -ENOTDIR. This should never be called if things are working properly,
    but if it ever is, then the dprintk may help in debugging.

    To facilitate this, a new file_operations field is also added to the
    nfs_rpc_ops struct.

    Cc: stable@kernel.org
    Signed-off-by: Jeff Layton
    Signed-off-by: Trond Myklebust

    Jeff Layton
     

31 Oct, 2011

1 commit

  • Current pnfs_layoutcommit_inode can not handle parallel layoutcommit.
    And as Trond suggested , there is no need for client to optimize for
    parallel layoutcommit. So add NFS_INO_LAYOUTCOMMITTING flag to
    mark inflight layoutcommit and serialize lalyoutcommit with it.
    Also mark_inode_dirty_sync if pnfs_layoutcommit_inode fails to issue
    layoutcommit.

    Reported-by: Vitaliy Gusev
    Signed-off-by: Peng Tao
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Peng Tao
     

19 Oct, 2011

1 commit


02 Aug, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set
    VFS: Reorganise shrink_dcache_for_umount_subtree() after demise of dcache_lock
    VFS: Remove dentry->d_lock locking from shrink_dcache_for_umount_subtree()
    VFS: Remove detached-dentry counter from shrink_dcache_for_umount_subtree()
    switch posix_acl_chmod() to umode_t
    switch posix_acl_from_mode() to umode_t
    switch posix_acl_equiv_mode() to umode_t *
    switch posix_acl_create() to umode_t *
    block: initialise bd_super in bdget()
    vfs: avoid call to inode_lru_list_del() if possible
    vfs: avoid taking inode_hash_lock on pipes and sockets
    vfs: conditionally call inode_wb_list_del()
    VFS: Fix automount for negative autofs dentries
    Btrfs: load the key from the dir item in readdir into a fake dentry
    devtmpfs: missing initialialization in never-hit case
    hppfs: missing include

    Linus Torvalds
     

01 Aug, 2011

1 commit


31 Jul, 2011

1 commit

  • If the directory contents change, then we have to accept that the
    file->f_pos value may shrink if we do a 'search-by-cookie'. In that
    case, we should turn off the loop detection and let the NFS client
    try to recover.

    The patch also fixes a second loop detection bug by ensuring
    that after turning on the ctx->duped flag, we read at least one new
    cookie into ctx->dir_cookie before attempting to match with
    ctx->dup_cookie.

    Reported-by: Petr Vandrovec
    Cc: stable@kernel.org [2.6.39+]
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

20 Jul, 2011

2 commits


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

5 commits