[GIT PULL] Please pull NFS client fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resending pull request after appending Chuck's fix for the nfs_umount() panic.

-----------------------------------------------------------------------------

Hi Linus,

Please pull from the "bugfixes" branch of the repository at

   git pull git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git bugfixes

This will update the following files through the appended changesets.

  Cheers,
    Trond

----
 Documentation/filesystems/Locking |    7 +++-
 Documentation/filesystems/vfs.txt |    7 +++
 fs/nfs/dir.c                      |   76 +++++++++++++++++--------------------
 fs/nfs/file.c                     |    2 +
 fs/nfs/inode.c                    |    1 +
 fs/nfs/mount_clnt.c               |    4 +-
 fs/nfs/nfs4proc.c                 |    9 ++++
 fs/nfs/pagelist.c                 |    4 +-
 fs/nfs/read.c                     |    1 -
 fs/nfs/super.c                    |    4 --
 fs/nfs/write.c                    |    3 +-
 include/linux/fs.h                |    1 +
 include/linux/nfs_fs.h            |    1 +
 include/linux/nfs_page.h          |    1 +
 mm/filemap.c                      |    5 ++
 mm/truncate.c                     |    4 ++
 mm/vmscan.c                       |    7 +++
 17 files changed, 85 insertions(+), 52 deletions(-)

commit 5b362ac3799ff4225c40935500f520cad4d7ed66
Author: Chuck Lever <chuck.lever@xxxxxxxxxx>
Date:   Fri Dec 10 12:31:14 2010 -0500

    NFS: Fix panic after nfs_umount()
    
    After a few unsuccessful NFS mount attempts in which the client and
    server cannot agree on an authentication flavor both support, the
    client panics.  nfs_umount() is invoked in the kernel in this case.
    
    Turns out nfs_umount()'s UMNT RPC invocation causes the RPC client to
    write off the end of the rpc_clnt's iostat array.  This is because the
    mount client's nrprocs field is initialized with the count of defined
    procedures (two: MNT and UMNT), rather than the size of the client's
    proc array (four).
    
    The fix is to use the same initialization technique used by most other
    upper layer clients in the kernel.
    
    Introduced by commit 0b524123, which failed to update nrprocs when
    support was added for UMNT in the kernel.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=24302
    BugLink: http://bugs.launchpad.net/bugs/683938
    
    Reported-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
    Tested-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
    Cc: stable@xxxxxxxxxx # >= 2.6.32
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 2df485a774ba59c3f43bfe84107672c1d9b731a0
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Tue Dec 7 22:39:17 2010 -0500

    nfs: remove extraneous and problematic calls to nfs_clear_request
    
    When a nfs_page is freed, nfs_free_request is called which also calls
    nfs_clear_request to clean out the lock and open contexts and free the
    pagecache page.
    
    However, a couple of places in the nfs code call nfs_clear_request
    themselves. What happens here if the refcount on the request is still high?
    We'll be releasing contexts and freeing pointers while the request is
    possibly still in use.
    
    Remove those bare calls to nfs_clear_context. That should only be done when
    the request is being freed.
    
    Note that when doing this, we need to watch out for tests of req->wb_page.
    Previously, nfs_set_page_tag_locked() and nfs_clear_page_tag_locked()
    would check the value of req->wb_page to figure out if the page is mapped
    into the nfsi->nfs_page_tree. We now indicate the page is mapped using
    the new bit PG_MAPPED in req->wb_flags .
    
    Reported-by: Jeff Layton <jlayton@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 0de1b7e800188782973598158e0acbb9e08e6c99
Author: Mi Jinlong <mijinlong@xxxxxxxxxxxxxx>
Date:   Sat Oct 30 10:19:33 2010 +0800

    nfs: kernel should return EPROTONOSUPPORT when not support NFSv4
    
      When nfs client(kernel) don't support NFSv4, maybe user build
      kernel without NFSv4, there is a problem.
    
      Using command "mount SERVER-IP:/nfsv3 /mnt/" to mount NFSv3
      filesystem, mount should should success, but fail and get error:
    
        "mount.nfs: an incorrect mount option was specified"
    
      System call mount "nfs"(not "nfs4") with "vers=4",
      if CONFIG_NFS_V4 is not defined, the "vers=4" will be parsed
      as invalid argument and kernel return EINVAL to nfs-utils.
    
      About that, we really want get EPROTONOSUPPORT rather than
      EINVAL. This path make sure kernel parses argument success,
      and return EPROTONOSUPPORT at nfs_validate_mount_data().
    
    Signed-off-by: Mi Jinlong <mijinlong@xxxxxxxxxxxxxx>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 21ac19d484a8ffb66f64487846c8d53afef04d2b
Author: Sergey Vlasov <vsu@xxxxxxxxxxx>
Date:   Sun Nov 28 21:04:05 2010 +0000

    NFS: Fix fcntl F_GETLK not reporting some conflicts
    
    The commit 129a84de2347002f09721cda3155ccfd19fade40 (locks: fix F_GETLK
    regression (failure to find conflicts)) fixed the posix_test_lock()
    function by itself, however, its usage in NFS changed by the commit
    9d6a8c5c213e34c475e72b245a8eb709258e968c (locks: give posix_test_lock
    same interface as ->lock) remained broken - subsequent NFS-specific
    locking code received F_UNLCK instead of the user-specified lock type.
    To fix the problem, fl->fl_type needs to be saved before the
    posix_test_lock() call and restored if no local conflicts were reported.
    
    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=23892
    Tested-by: Alexander Morozov <amorozov@xxxxxxxxxxx>
    Signed-off-by: Sergey Vlasov <vsu@xxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 08a22b392a141c201d7ed4d435de942aa853acd3
Author: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
Date:   Wed Dec 1 10:42:16 2010 +0000

    nfs: Discard ACL cache on mode update
    
    An update of mode bits can result in ACL value being changed. We need
    to mark the acl cache invalid when we update mode. Similarly we need
    to update file attribute when we change ACL value
    
    Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 47c716cbf638a16583441d78be3fc24345eab636
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Tue Dec 7 12:44:56 2010 -0500

    NFS: Readdir cleanups
    
    No functional changes, but clarify the code.
    
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 18fb5fe40ce7f789b5cfc3aa81ff1e6175b0a5be
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Tue Dec 7 12:41:58 2010 -0500

    NFS: nfs_readdir_search_for_cookie() don't mark as eof if cookie not found
    
    If we're searching for a specific cookie, and it isn't found in the page
    cache, we should try an uncached_readdir(). To do so, we return EBADCOOKIE,
    but we don't set desc->eof.
    
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 11de3b11e08cac26d59e88efaf4e316701883552
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Wed Dec 1 14:17:06 2010 -0500

    NFS: Fix a memory leak in nfs_readdir
    
    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@xxxxxxxxxx>

commit 6072d13c429373c5d63b69dadbbef40a9b035552
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Dec 1 13:35:19 2010 -0500

    Call the filesystem back whenever a page is removed from the page cache
    
    NFS needs to be able to release objects that are stored in the page
    cache once the page itself is no longer visible from the page cache.
    
    This patch adds a callback to the address space operations that allows
    filesystems to perform page cleanups once the page has been removed
    from the page cache.
    
    Original patch by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    [trondmy: cover the cases of invalidate_inode_pages2() and
              truncate_inode_pages()]
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

commit 0aded708d125a3ff7e5abaea9c2d9c6d7ebbfdcd
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Tue Nov 30 21:56:32 2010 -0500

    NFS: Ensure we use the correct cookie in nfs_readdir_xdr_filler
    
    We need to use the cookie from the previous array entry, not the
    actual cookie that we are searching for (except for the case of
    uncached_readdir).
    
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>


-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux