1. 03 Aug, 2014 5 commits
    • NeilBrown's avatar
      NFS: nfs4_do_open should add negative results to the dcache. · 4fa2c54b
      NeilBrown authored
      If you have an NFSv4 mounted directory which does not container 'foo'
      and:
      
        ls -l foo
        ssh $server touch foo
        cat foo
      
      then the 'cat' will fail (usually, depending a bit on the various
      cache ages).  This is correct as negative looks are cached by default.
      However with the same initial conditions:
      
        cat foo
        ssh $server touch foo
        cat foo
      
      will usually succeed.  This is because an "open" does not add a
      negative dentry to the dcache, while a "lookup" does.
      
      This can have negative performance effects.  When "gcc" searches for
      an include file, it will try to "open" the file in every director in
      the search path.  Without caching of negative "open" results, this
      generates much more traffic to the server than it should (or than
      NFSv3 does).
      
      The root of the problem is that _nfs4_open_and_get_state() will call
      d_add_unique() on a positive result, but not on a negative result.
      Compare with nfs_lookup() which calls d_materialise_unique on both
      a positive result and on ENOENT.
      
      This patch adds a call d_add() in the ENOENT case for
      _nfs4_open_and_get_state() and also calls nfs_set_verifier().
      
      With it, many fewer "open" requests for known-non-existent files are
      sent to the server.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      4fa2c54b
    • Andrey Utkin's avatar
      nfs3_list_one_acl(): check get_acl() result with IS_ERR_OR_NULL · 7a9e75a1
      Andrey Utkin authored
      There was a check for result being not NULL. But get_acl() may return
      NULL, or ERR_PTR, or actual pointer.
      The purpose of the function where current change is done is to "list
      ACLs only when they are available", so any error condition of get_acl()
      mustn't be elevated, and returning 0 there is still valid.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81111Signed-off-by: default avatarAndrey Utkin <andrey.krieger.utkin@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Fixes: 74adf83f (nfs: only show Posix ACLs in listxattr if actually...)
      Cc: stable@vger.kernel.org # 3.14+
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      7a9e75a1
    • Trond Myklebust's avatar
      Merge branch 'nfs-rdma' of git://git.linux-nfs.org/projects/anna/nfs-rdma into linux-next · 9806755c
      Trond Myklebust authored
      * 'nfs-rdma' of git://git.linux-nfs.org/projects/anna/nfs-rdma: (916 commits)
        xprtrdma: Handle additional connection events
        xprtrdma: Remove RPCRDMA_PERSISTENT_REGISTRATION macro
        xprtrdma: Make rpcrdma_ep_disconnect() return void
        xprtrdma: Schedule reply tasklet once per upcall
        xprtrdma: Allocate each struct rpcrdma_mw separately
        xprtrdma: Rename frmr_wr
        xprtrdma: Disable completions for LOCAL_INV Work Requests
        xprtrdma: Disable completions for FAST_REG_MR Work Requests
        xprtrdma: Don't post a LOCAL_INV in rpcrdma_register_frmr_external()
        xprtrdma: Reset FRMRs after a flushed LOCAL_INV Work Request
        xprtrdma: Reset FRMRs when FAST_REG_MR is flushed by a disconnect
        xprtrdma: Properly handle exhaustion of the rb_mws list
        xprtrdma: Chain together all MWs in same buffer pool
        xprtrdma: Back off rkey when FAST_REG_MR fails
        xprtrdma: Unclutter struct rpcrdma_mr_seg
        xprtrdma: Don't invalidate FRMRs if registration fails
        xprtrdma: On disconnect, don't ignore pending CQEs
        xprtrdma: Update rkeys after transport reconnect
        xprtrdma: Limit data payload size for ALLPHYSICAL
        xprtrdma: Protect ia->ri_id when unmapping/invalidating MRs
        ...
      9806755c
    • Trond Myklebust's avatar
      NFS: Enforce an upper limit on the number of cached access call · 3a505845
      Trond Myklebust authored
      This may be used to limit the number of cached credentials building up
      inside the access cache.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      3a505845
    • Trond Myklebust's avatar
      SUNRPC: Enforce an upper limit on the number of cached credentials · bae6746f
      Trond Myklebust authored
      In some cases where the credentials are not often reused, we may want
      to limit their total number just in order to make the negative lookups
      in the hash table more manageable.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      bae6746f
  2. 31 Jul, 2014 21 commits
  3. 22 Jul, 2014 1 commit
    • Yan Burman's avatar
      xprtrdma: Fix DMA-API-DEBUG warning by checking dma_map result · bf858ab0
      Yan Burman authored
      Fix the following warning when DMA-API debug is enabled by checking ib_dma_map_single result:
      [ 1455.345548] ------------[ cut here ]------------
      [ 1455.346863] WARNING: CPU: 3 PID: 3929 at /home/yanb/kernel/net-next/lib/dma-debug.c:1140 check_unmap+0x4e5/0x990()
      [ 1455.349350] mlx4_core 0000:00:07.0: DMA-API: device driver failed to check map error[device address=0x000000007c9f2090] [size=2656 bytes] [mapped as single]
      [ 1455.349350] Modules linked in: xprtrdma netconsole configfs nfsv3 nfs_acl ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm autofs4 auth_rpcgss oid_registry nfsv4 nfs fscache lockd sunrpc dm_mirror dm_region_hash dm_log microcode pcspkr mlx4_ib ib_sa ib_mad ib_core ib_addr mlx4_en ipv6 ptp pps_core vxlan mlx4_core virtio_balloon cirrus ttm drm_kms_helper drm sysimgblt sysfillrect syscopyarea i2c_piix4 i2c_core button ext3 jbd virtio_blk virtio_net virtio_pci virtio_ring virtio uhci_hcd ata_generic ata_piix libata
      [ 1455.349350] CPU: 3 PID: 3929 Comm: mount.nfs Not tainted 3.15.0-rc1-dbg+ #13
      [ 1455.349350] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
      [ 1455.349350]  0000000000000474 ffff880069dcf628 ffffffff8151c341 ffffffff817b69d8
      [ 1455.349350]  ffff880069dcf678 ffff880069dcf668 ffffffff8105b5fc 0000000069dcf658
      [ 1455.349350]  ffff880069dcf778 ffff88007b0c9f00 ffffffff8255ec40 0000000000000a60
      [ 1455.349350] Call Trace:
      [ 1455.349350]  [<ffffffff8151c341>] dump_stack+0x52/0x81
      [ 1455.349350]  [<ffffffff8105b5fc>] warn_slowpath_common+0x8c/0xc0
      [ 1455.349350]  [<ffffffff8105b6e6>] warn_slowpath_fmt+0x46/0x50
      [ 1455.349350]  [<ffffffff812e6305>] check_unmap+0x4e5/0x990
      [ 1455.349350]  [<ffffffff81521fb0>] ? _raw_spin_unlock_irq+0x30/0x60
      [ 1455.349350]  [<ffffffff812e6a0a>] debug_dma_unmap_page+0x5a/0x60
      [ 1455.349350]  [<ffffffffa0389583>] rpcrdma_deregister_internal+0xb3/0xd0 [xprtrdma]
      [ 1455.349350]  [<ffffffffa038a639>] rpcrdma_buffer_destroy+0x69/0x170 [xprtrdma]
      [ 1455.349350]  [<ffffffffa03872ff>] xprt_rdma_destroy+0x3f/0xb0 [xprtrdma]
      [ 1455.349350]  [<ffffffffa04a95ff>] xprt_destroy+0x6f/0x80 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a9625>] xprt_put+0x15/0x20 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a899a>] rpc_free_client+0x8a/0xe0 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a8a58>] rpc_release_client+0x68/0xa0 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a9060>] rpc_shutdown_client+0xb0/0xc0 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a8f5d>] ? rpc_ping+0x5d/0x70 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a91ab>] rpc_create_xprt+0xbb/0xd0 [sunrpc]
      [ 1455.349350]  [<ffffffffa04a9273>] rpc_create+0xb3/0x160 [sunrpc]
      [ 1455.349350]  [<ffffffff81129749>] ? __probe_kernel_read+0x69/0xb0
      [ 1455.349350]  [<ffffffffa053851c>] nfs_create_rpc_client+0xdc/0x100 [nfs]
      [ 1455.349350]  [<ffffffffa0538cfa>] nfs_init_client+0x3a/0x90 [nfs]
      [ 1455.349350]  [<ffffffffa05391c8>] nfs_get_client+0x478/0x5b0 [nfs]
      [ 1455.349350]  [<ffffffffa0538e50>] ? nfs_get_client+0x100/0x5b0 [nfs]
      [ 1455.349350]  [<ffffffff81172c6d>] ? kmem_cache_alloc_trace+0x24d/0x260
      [ 1455.349350]  [<ffffffffa05393f3>] nfs_create_server+0xf3/0x4c0 [nfs]
      [ 1455.349350]  [<ffffffffa0545ff0>] ? nfs_request_mount+0xf0/0x1a0 [nfs]
      [ 1455.349350]  [<ffffffffa031c0c3>] nfs3_create_server+0x13/0x30 [nfsv3]
      [ 1455.349350]  [<ffffffffa0546293>] nfs_try_mount+0x1f3/0x230 [nfs]
      [ 1455.349350]  [<ffffffff8108ea21>] ? get_parent_ip+0x11/0x50
      [ 1455.349350]  [<ffffffff812d6343>] ? __this_cpu_preempt_check+0x13/0x20
      [ 1455.349350]  [<ffffffff810d632b>] ? try_module_get+0x6b/0x190
      [ 1455.349350]  [<ffffffffa05449f7>] nfs_fs_mount+0x187/0x9d0 [nfs]
      [ 1455.349350]  [<ffffffffa0545940>] ? nfs_clone_super+0x140/0x140 [nfs]
      [ 1455.349350]  [<ffffffffa0543b20>] ? nfs_auth_info_match+0x40/0x40 [nfs]
      [ 1455.349350]  [<ffffffff8117e360>] mount_fs+0x20/0xe0
      [ 1455.349350]  [<ffffffff811a1c16>] vfs_kern_mount+0x76/0x160
      [ 1455.349350]  [<ffffffff811a29a8>] do_mount+0x428/0xae0
      [ 1455.349350]  [<ffffffff811a30f0>] SyS_mount+0x90/0xe0
      [ 1455.349350]  [<ffffffff8152af52>] system_call_fastpath+0x16/0x1b
      [ 1455.349350] ---[ end trace f1f31572972e211d ]---
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      bf858ab0
  4. 21 Jul, 2014 9 commits
  5. 20 Jul, 2014 4 commits