24 Apr, 2015

1 commit

  • This file is only used internally to the NFS v4 module, so it doesn't
    need to be in the global include path. I also renamed it from
    nfs_idmap.h to nfs4idmap.h to emphasize that it's an NFSv4-only include
    file.

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

    Anna Schumaker
     

28 Mar, 2015

1 commit


13 Feb, 2015

1 commit

  • Pull backing device changes from Jens Axboe:
    "This contains a cleanup of how the backing device is handled, in
    preparation for a rework of the life time rules. In this part, the
    most important change is to split the unrelated nommu mmap flags from
    it, but also removing a backing_dev_info pointer from the
    address_space (and inode), and a cleanup of other various minor bits.

    Christoph did all the work here, I just fixed an oops with pages that
    have a swap backing. Arnd fixed a missing export, and Oleg killed the
    lustre backing_dev_info from staging. Last patch was from Al,
    unexporting parts that are now no longer needed outside"

    * 'for-3.20/bdi' of git://git.kernel.dk/linux-block:
    Make super_blocks and sb_lock static
    mtd: export new mtd_mmap_capabilities
    fs: make inode_to_bdi() handle NULL inode
    staging/lustre/llite: get rid of backing_dev_info
    fs: remove default_backing_dev_info
    fs: don't reassign dirty inodes to default_backing_dev_info
    nfs: don't call bdi_unregister
    ceph: remove call to bdi_unregister
    fs: remove mapping->backing_dev_info
    fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info
    nilfs2: set up s_bdi like the generic mount_bdev code
    block_dev: get bdev inode bdi directly from the block device
    block_dev: only write bdev inode on close
    fs: introduce f_op->mmap_capabilities for nommu mmap support
    fs: kill BDI_CAP_SWAP_BACKED
    fs: deduplicate noop_backing_dev_info

    Linus Torvalds
     

04 Feb, 2015

1 commit


21 Jan, 2015

1 commit

  • bdi_destroy already does all the work, and if we delay freeing the
    anon bdev we can get away with just that single call.

    Addintionally remove the call during mount failure, as
    deactivate_super_locked will already call ->kill_sb and clean up
    the bdi for us.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

04 Apr, 2014

1 commit

  • Reclaim will be leaving shadow entries in the page cache radix tree upon
    evicting the real page. As those pages are found from the LRU, an
    iput() can lead to the inode being freed concurrently. At this point,
    reclaim must no longer install shadow pages because the inode freeing
    code needs to ensure the page tree is really empty.

    Add an address_space flag, AS_EXITING, that the inode freeing code sets
    under the tree lock before doing the final truncate. Reclaim will check
    for this flag before installing shadow pages.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Rik van Riel
    Reviewed-by: Minchan Kim
    Cc: Andrea Arcangeli
    Cc: Bob Liu
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Greg Thelen
    Cc: Hugh Dickins
    Cc: Jan Kara
    Cc: KOSAKI Motohiro
    Cc: Luigi Semenzato
    Cc: Mel Gorman
    Cc: Metin Doslu
    Cc: Michel Lespinasse
    Cc: Ozgun Erdogan
    Cc: Peter Zijlstra
    Cc: Roman Gushchin
    Cc: Ryan Mallon
    Cc: Tejun Heo
    Cc: Vlastimil Babka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

14 Jan, 2014

1 commit


29 Oct, 2013

1 commit


08 Sep, 2013

2 commits

  • NFSv4 security auto-negotiation has been broken since
    commit 4580a92d44e2b21c2254fa5fef0f1bfb43c82318 (NFS:
    Use server-recommended security flavor by default (NFSv3))
    because nfs4_try_mount() will automatically select AUTH_SYS
    if it sees no auth flavours.

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

    Trond Myklebust
     
  • What is the point of having a 'auth_flavor_len' field, if it is
    always set to 1, and can't be used to determine if the user has
    selected an auth flavour?
    This cleanup goes back to using auth_flavor_len for its original
    intended purpose, and gets rid of the ad-hoc replacements.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

19 Jun, 2013

1 commit


05 Apr, 2013

1 commit

  • Since commit ec88f28d in 2009, checking if the user-specified flavor
    is in the server's flavor list has been the source of a few
    noticeable regressions (now fixed), but there is one that is still
    vexing.

    An NFS server can list AUTH_NULL in its flavor list, which suggests
    a client should try to mount the server with the flavor of the
    client's choice, but the server will squash all accesses. In some
    cases, our client fails to mount a server because of this check,
    when the mount could have proceeded successfully.

    Skip this check if the user has specified "sec=" on the mount
    command line. But do consult the server-provided flavor list to
    choose a security flavor if no sec= option is specified on the mount
    command.

    If a server lists Kerberos pseudoflavors before "sys" in its export
    options, our client now chooses Kerberos over AUTH_UNIX for mount
    points, when no security flavor is specified by the mount command.
    This could be surprising to some administrators or users, who would
    then need to have Kerberos credentials to access the export.

    Or, a client administrator may not have enabled rpc.gssd. In this
    case, auth_rpcgss.ko might still be loadable, which is enough for
    the new logic to choose Kerberos over AUTH_UNIX. But the mount
    would fail since no GSS context can be created without rpc.gssd
    running.

    To retain the use of AUTH_UNIX by default:

    o The server administrator can ensure that "sys" is listed before
    Kerberos flavors in its export security options (see
    exports(5)),

    o The client administrator can explicitly specify "sec=sys" on
    its mount command line (see nfs(5)),

    o The client administrator can use "Sec=sys" in an appropriate
    section of /etc/nfsmount.conf (see nfsmount.conf(5)), or

    o The client administrator can blacklist auth_rpcgss.ko.

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

    Chuck Lever
     

26 Feb, 2013

1 commit

  • The following set of operations on a NFS client and server will cause

    server# mkdir a
    client# cd a
    server# mv a a.bak
    client# sleep 30 # (or whatever the dir attrcache timeout is)
    client# stat .
    stat: cannot stat `.': Stale NFS file handle

    Obviously, we should not be getting an ESTALE error back there since the
    inode still exists on the server. The problem is that the lookup code
    will call d_revalidate on the dentry that "." refers to, because NFS has
    FS_REVAL_DOT set.

    nfs_lookup_revalidate will see that the parent directory has changed and
    will try to reverify the dentry by redoing a LOOKUP. That of course
    fails, so the lookup code returns ESTALE.

    The problem here is that d_revalidate is really a bad fit for this case.
    What we really want to know at this point is whether the inode is still
    good or not, but we don't really care what name it goes by or whether
    the dcache is still valid.

    Add a new d_op->d_weak_revalidate operation and have complete_walk call
    that instead of d_revalidate. The intent there is to allow for a
    "weaker" d_revalidate that just checks to see whether the inode is still
    good. This is also gives us an opportunity to kill off the FS_REVAL_DOT
    special casing.

    [AV: changed method name, added note in porting, fixed confusion re
    having it possibly called from RCU mode (it won't be)]

    Cc: NeilBrown
    Signed-off-by: Jeff Layton
    Signed-off-by: Al Viro

    Jeff Layton
     

15 Dec, 2012

1 commit


17 Aug, 2012

1 commit

  • Some systems have a modprobe.d/nfs.conf file that sets an nfs4 alias
    pointing to nfs.ko, rather than nfs4.ko. This can prevent the v4 module
    from loading on mount, since the kernel sees that something named "nfs4"
    has already been loaded. To work around this, I've renamed the modules
    to "nfsv2.ko" "nfsv3.ko" and "nfsv4.ko".

    I also had to move the nfs4_fs_type back to nfs.ko to ensure that `mount
    -t nfs4` still works.

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

    bjschuma@gmail.com
     

31 Jul, 2012

7 commits


18 Jul, 2012

4 commits