1. 15 8月, 2017 1 次提交
  2. 20 7月, 2017 3 次提交
  3. 04 5月, 2017 1 次提交
  4. 03 5月, 2017 1 次提交
  5. 29 4月, 2017 1 次提交
  6. 21 4月, 2017 2 次提交
    • T
      pNFS: unexport nfs4_pnfs_v3_ds_connect_unload · 675e508f
      Trond Myklebust 提交于
      It is not used outside the NFSv4 module.
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      675e508f
    • N
      NFS: fix usage of mempools. · 518662e0
      NeilBrown 提交于
      When passed GFP flags that allow sleeping (such as
      GFP_NOIO), mempool_alloc() will never return NULL, it will
      wait until memory is available.
      
      This means that we don't need to handle failure, but that we
      do need to ensure one thread doesn't call mempool_alloc()
      twice on the one pool without queuing or freeing the first
      allocation.  If multiple threads did this during times of
      high memory pressure, the pool could be exhausted and a
      deadlock could result.
      
      pnfs_generic_alloc_ds_commits() attempts to allocate from
      the nfs_commit_mempool while already holding an allocation
      from that pool.  This is not safe.  So change
      nfs_commitdata_alloc() to take a flag that indicates whether
      failure is acceptable.
      
      In pnfs_generic_alloc_ds_commits(), accept failure and
      handle it as we currently do.  Else where, do not accept
      failure, and do not handle it.
      
      Even when failure is acceptable, we want to succeed if
      possible.  That means both
       - using an entry from the pool if there is one
       - waiting for direct reclaim is there isn't.
      
      We call mempool_alloc(GFP_NOWAIT) to achieve the first, then
      kmem_cache_alloc(GFP_NOIO|__GFP_NORETRY) to achieve the
      second.  Each of these can fail, but together they do the
      best they can without blocking indefinitely.
      
      The objects returned by kmem_cache_alloc() will still be freed
      by mempool_free().  This is safe as mempool_alloc() uses
      exactly the same function to allocate objects (since the mempool
      was created with mempool_create_slab_pool()).  The object returned
      by mempool_alloc() and kmem_cache_alloc() are indistinguishable
      so mempool_free() will handle both identically, either adding to the
      pool or calling kmem_cache_free().
      
      Also, don't test for failure when allocating from
      nfs_wdata_mempool.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      518662e0
  7. 18 3月, 2017 2 次提交
  8. 02 12月, 2016 1 次提交
  9. 20 9月, 2016 1 次提交
  10. 20 7月, 2016 2 次提交
  11. 06 7月, 2016 1 次提交
  12. 25 6月, 2016 1 次提交
  13. 26 5月, 2016 1 次提交
    • W
      nfs: avoid race that crashes nfs_init_commit · ade8febd
      Weston Andros Adamson 提交于
      Since the patch "NFS: Allow multiple commit requests in flight per file"
      we can run multiple simultaneous commits on the same inode.  This
      introduced a race over collecting pages to commit that made it possible
      to call nfs_init_commit() with an empty list - which causes crashes like
      the one below.
      
      The fix is to catch this race and avoid calling nfs_init_commit and
      initiate_commit when there is no work to do.
      
      Here is the crash:
      
      [600522.076832] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
      [600522.078475] IP: [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs]
      [600522.078745] PGD 4272b1067 PUD 4272cb067 PMD 0
      [600522.078972] Oops: 0000 [#1] SMP
      [600522.079204] Modules linked in: nfsv3 nfs_layout_flexfiles rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vmw_vsock_vmci_transport vsock bonding ipmi_devintf ipmi_msghandler coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ppdev vmw_balloon parport_pc parport acpi_cpufreq vmw_vmci i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel serio_raw vmxnet3
      [600522.081380]  vmw_pvscsi ata_generic pata_acpi
      [600522.081809] CPU: 3 PID: 15667 Comm: /usr/bin/python Not tainted 4.1.9-100.pd.88.el7.x86_64 #1
      [600522.082281] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014
      [600522.082814] task: ffff8800bbbfa780 ti: ffff88042ae84000 task.ti: ffff88042ae84000
      [600522.083378] RIP: 0010:[<ffffffffa0479e72>]  [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs]
      [600522.083973] RSP: 0018:ffff88042ae87438  EFLAGS: 00010246
      [600522.084571] RAX: 0000000000000000 RBX: ffff880003485e40 RCX: ffff88042ae87588
      [600522.085188] RDX: 0000000000000000 RSI: ffff88042ae874b0 RDI: ffff880003485e40
      [600522.085756] RBP: ffff88042ae87448 R08: ffff880003486010 R09: ffff88042ae874b0
      [600522.086332] R10: 0000000000000000 R11: 0000000000000005 R12: ffff88042ae872d0
      [600522.086905] R13: ffff88042ae874b0 R14: ffff880003485e40 R15: ffff88042704c840
      [600522.087484] FS:  00007f4728ff2740(0000) GS:ffff88043fd80000(0000) knlGS:0000000000000000
      [600522.088070] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [600522.088663] CR2: 0000000000000040 CR3: 000000042b6aa000 CR4: 00000000001406e0
      [600522.089327] Stack:
      [600522.089926]  0000000000000001 ffff88042ae87588 ffff88042ae874f8 ffffffffa04f09fa
      [600522.090549]  0000000000017840 0000000000017840 ffff88042ae87588 ffff8803258d9930
      [600522.091169]  ffff88042ae87578 ffffffffa0563d80 0000000000000000 ffff88042704c840
      [600522.091789] Call Trace:
      [600522.092420]  [<ffffffffa04f09fa>] pnfs_generic_commit_pagelist+0x1da/0x320 [nfsv4]
      [600522.093052]  [<ffffffffa0563d80>] ? ff_layout_commit_prepare_v3+0x30/0x30 [nfs_layout_flexfiles]
      [600522.093696]  [<ffffffffa0562645>] ff_layout_commit_pagelist+0x15/0x20 [nfs_layout_flexfiles]
      [600522.094359]  [<ffffffffa047bc78>] nfs_generic_commit_list+0xe8/0x120 [nfs]
      [600522.095032]  [<ffffffffa047bd6a>] nfs_commit_inode+0xba/0x110 [nfs]
      [600522.095719]  [<ffffffffa046ac54>] nfs_release_page+0x44/0xd0 [nfs]
      [600522.096410]  [<ffffffff811a8122>] try_to_release_page+0x32/0x50
      [600522.097109]  [<ffffffff811bd4f1>] shrink_page_list+0x961/0xb30
      [600522.097812]  [<ffffffff811bdced>] shrink_inactive_list+0x1cd/0x550
      [600522.098530]  [<ffffffff811bea65>] shrink_lruvec+0x635/0x840
      [600522.099250]  [<ffffffff811bed60>] shrink_zone+0xf0/0x2f0
      [600522.099974]  [<ffffffff811bf312>] do_try_to_free_pages+0x192/0x470
      [600522.100709]  [<ffffffff811bf6ca>] try_to_free_pages+0xda/0x170
      [600522.101464]  [<ffffffff811b2198>] __alloc_pages_nodemask+0x588/0x970
      [600522.102235]  [<ffffffff811fbbd5>] alloc_pages_vma+0xb5/0x230
      [600522.103000]  [<ffffffff813a1589>] ? cpumask_any_but+0x39/0x50
      [600522.103774]  [<ffffffff811d6115>] wp_page_copy.isra.55+0x95/0x490
      [600522.104558]  [<ffffffff810e3438>] ? __wake_up+0x48/0x60
      [600522.105357]  [<ffffffff811d7d3b>] do_wp_page+0xab/0x4f0
      [600522.106137]  [<ffffffff810a1bbb>] ? release_task+0x36b/0x470
      [600522.106902]  [<ffffffff8126dbd7>] ? eventfd_ctx_read+0x67/0x1c0
      [600522.107659]  [<ffffffff811da2a8>] handle_mm_fault+0xc78/0x1900
      [600522.108431]  [<ffffffff81067ef1>] __do_page_fault+0x181/0x420
      [600522.109173]  [<ffffffff811446a6>] ? __audit_syscall_exit+0x1e6/0x280
      [600522.109893]  [<ffffffff810681c0>] do_page_fault+0x30/0x80
      [600522.110594]  [<ffffffff81024f36>] ? syscall_trace_leave+0xc6/0x120
      [600522.111288]  [<ffffffff81790a58>] page_fault+0x28/0x30
      [600522.111947] Code: 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 4c 8d 87 d0 01 00 00 48 89 e5 53 48 89 fb 48 83 ec 08 4c 8b 0e 49 8b 41 18 4c 39 ce <48> 8b 40 40 4c 8b 50 30 74 24 48 8b 87 d0 01 00 00 48 8b 7e 08
      [600522.113343] RIP  [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs]
      [600522.114003]  RSP <ffff88042ae87438>
      [600522.114636] CR2: 0000000000000040
      
      Fixes: af7cf057 (NFS: Allow multiple commit requests in flight per file)
      CC: stable@vger.kernel.org
      Signed-off-by: NWeston Andros Adamson <dros@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      ade8febd
  14. 09 5月, 2016 1 次提交
  15. 06 2月, 2016 1 次提交
  16. 01 1月, 2016 2 次提交
  17. 21 8月, 2015 1 次提交
    • P
      NFS41: fix list splice type · 046be74d
      Peng Tao 提交于
      We want to move commiting pages to pages list instead.
      Otherwise it causes pnfs small writes crash like:
      
      [34560.037692] BUG: unable to handle kernel NULL pointer dereference at 0000000000000068
      [34560.038557] IP: [<ffffffffa05423d6>] nfs_init_commit+0x26/0x130 [nfs]
      [34560.039400] PGD 69f5a067 PUD 69f59067 PMD 0
      [34560.040207] Oops: 0000 [#1] SMP
      [34560.041014] Modules linked in: nfsv3(OE) nfs_layout_flexfiles(OE) nfsv4(OE) nfs(OE) fscache(E) rpcsec_gss_krb5(E) xt_addrtype(E) xt_conntrack(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) iptable_filter(E) ip_tables(E) x_tables(E) nf_nat(E) nf_conntrack(E) bridge(E) stp(E) llc(E) dm_thin_pool(E) dm_persistent_data(E) dm_bio_prison(E) dm_bufio(E) ppdev(E) vmw_balloon(E) coretemp(E) crc32_pclmul(E) ghash_clmulni_intel(E) aesni_intel(E) aes_x86_64(E) glue_helper(E) lrw(E) gf128mul(E) ablk_helper(E) cryptd(E) psmouse(E) serio_raw(E) vmw_vmci(E) i2c_piix4(E) shpchp(E) parport_pc(E) parport(E) mac_hid(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) xfs(E) libcrc32c(E) hid_generic(E) usbhid(E) hid(E) e1000(E) mptspi(E)
      [34560.045106]  mptscsih(E) mptbase(E) vmwgfx(E) drm_kms_helper(E) ttm(E) drm(E) autofs4(E) [last unloaded: fscache]
      [34560.045897] CPU: 0 PID: 130543 Comm: bash Tainted: G           OE   4.2.0-rc5-dp-00057-gf993a93 #11
      [34560.046699] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
      [34560.047525] task: ffff880031b0a980 ti: ffff880045fec000 task.ti: ffff880045fec000
      [34560.048264] RIP: 0010:[<ffffffffa05423d6>]  [<ffffffffa05423d6>] nfs_init_commit+0x26/0x130 [nfs]
      [34560.049000] RSP: 0018:ffff880045fefc18  EFLAGS: 00010246
      [34560.049717] RAX: 0000000000000000 RBX: ffff8800208fbc80 RCX: ffff880045fefd50
      [34560.050396] RDX: ffff880031c19ec0 RSI: ffff880045fefc88 RDI: ffff8800208fbc80
      [34560.051041] RBP: ffff880045fefc28 R08: ffff8800208fbe68 R09: ffff880045fefc88
      [34560.051666] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880045fefc78
      [34560.052247] R13: ffff880045fefc88 R14: ffff880045fefa90 R15: ffff880045fefd50
      [34560.052825] FS:  00007fa02d58c740(0000) GS:ffff88006d600000(0000) knlGS:0000000000000000
      [34560.053410] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [34560.053992] CR2: 0000000000000068 CR3: 000000003b37a000 CR4: 00000000001406f0
      [34560.054615] Stack:
      [34560.055200]  ffff8800208fbc80 ffff8800208fbc80 ffff880045fefcc8 ffffffffa05c1a5b
      [34560.055800]  ffff880045fefcc8 ffff880045fefd50 0000000045fefcb8 ffff880045fefd40
      [34560.056418]  ffff8800420608e0 ffffffffa04f3910 0000000100000001 ffff880045fefd50
      [34560.057013] Call Trace:
      [34560.057672]  [<ffffffffa05c1a5b>] pnfs_generic_commit_pagelist+0x1cb/0x300 [nfsv4]
      [34560.058277]  [<ffffffffa04f3910>] ? ff_layout_commit_pagelist+0x20/0x20 [nfs_layout_flexfiles]
      [34560.058907]  [<ffffffffa04f3905>] ff_layout_commit_pagelist+0x15/0x20 [nfs_layout_flexfiles]
      [34560.059557]  [<ffffffffa0543fc1>] nfs_generic_commit_list+0xb1/0xf0 [nfs]
      [34560.060214]  [<ffffffffa0543e47>] ? nfs_scan_commit+0x37/0xa0 [nfs]
      [34560.060825]  [<ffffffffa0544081>] nfs_commit_inode+0x81/0x150 [nfs]
      [34560.061432]  [<ffffffffa05443ae>] nfs_wb_all+0x1ae/0x400 [nfs]
      [34560.062035]  [<ffffffffa05380ad>] nfs_getattr+0x33d/0x510 [nfs]
      [34560.062630]  [<ffffffff8122499c>] vfs_getattr_nosec+0x2c/0x40
      [34560.063223]  [<ffffffff81224a66>] vfs_getattr+0x26/0x30
      [34560.063818]  [<ffffffff81224b35>] vfs_fstatat+0x65/0xa0
      [34560.064413]  [<ffffffff81224f3f>] SYSC_newstat+0x1f/0x40
      [34560.065016]  [<ffffffff8102b176>] ? do_audit_syscall_entry+0x66/0x70
      [34560.065626]  [<ffffffff8102c773>] ? syscall_trace_enter_phase1+0x113/0x170
      [34560.066245]  [<ffffffff81003017>] ? trace_hardirqs_on_thunk+0x17/0x19
      [34560.066868]  [<ffffffff812251ae>] SyS_newstat+0xe/0x10
      [34560.067533]  [<ffffffff817a5df2>] entry_SYSCALL_64_fastpath+0x16/0x7a
      [34560.068173] Code: 0f 1f 44 00 00 0f 1f 44 00 00 55 4c 8d 87 e8 01 00 00 48 89 e5 53 48 89 fb 48 83 ec 08 4c 8b 0e 49 8b 41 18 4c 39 ce 48 8b 40 40 <4c> 8b 50 68 74 24 48 8b 87 e8 01 00 00 48 8b 7e 08 4d 89 41 08
      [34560.069609] RIP  [<ffffffffa05423d6>] nfs_init_commit+0x26/0x130 [nfs]
      [34560.070295]  RSP <ffff880045fefc18>
      [34560.071008] CR2: 0000000000000068
      [34560.073207] ---[ end trace f85f873260977406 ]---
      
      [fixes 27571297(pNFS: Tighten up locking around DS commit buckets)]
      Signed-off-by: NPeng Tao <tao.peng@primarydata.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      046be74d
  18. 18 8月, 2015 1 次提交
  19. 13 8月, 2015 1 次提交
  20. 11 8月, 2015 1 次提交
  21. 28 3月, 2015 1 次提交
  22. 12 3月, 2015 1 次提交
    • A
      nfs: do not export discarded symbols · df137bc1
      Arnd Bergmann 提交于
      The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
      used by other modules, but is also marked '__exit' and will be
      discarded when built into the kernel, as pointed out by this
      linker error:
      
      `nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
      
      This removes the __exit annotation to make it safe to call this function.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 5f01d953 ("nfs41: create NFSv3 DS connection if specified")
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      df137bc1
  23. 18 2月, 2015 1 次提交
  24. 04 2月, 2015 11 次提交