1. 13 2月, 2013 1 次提交
  2. 21 12月, 2012 1 次提交
    • D
      NFS: Use FS-Cache invalidation · de242c0b
      David Howells 提交于
      Use the new FS-Cache invalidation facility from NFS to deal with foreign
      changes being detected on the server rather than attempting to retire the old
      cookie and get a new one.
      
      The problem with the old method was that NFS did not wait for all outstanding
      storage and retrieval ops on the cache to complete.  There was no automatic
      wait between the calls to ->readpages() and calls to invalidate_inode_pages2()
      as the latter can only wait on locked pages that have been added to the
      pagecache (which they haven't yet on entry to ->readpages()).
      
      This was leading to oopses like the one below when an outstanding read got cut
      off from its cookie by a premature release.
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8
      IP: [<ffffffffa0075118>] __fscache_read_or_alloc_pages+0x1dd/0x315 [fscache]
      PGD 15889067 PUD 15890067 PMD 0
      Oops: 0000 [#1] SMP
      CPU 0
      Modules linked in: cachefiles nfs fscache auth_rpcgss nfs_acl lockd sunrpc
      
      Pid: 4544, comm: tar Not tainted 3.1.0-rc4-fsdevel+ #1064                  /DG965RY
      RIP: 0010:[<ffffffffa0075118>]  [<ffffffffa0075118>] __fscache_read_or_alloc_pages+0x1dd/0x315 [fscache]
      RSP: 0018:ffff8800158799e8  EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff8800070d41e0 RCX: ffff8800083dc1b0
      RDX: 0000000000000000 RSI: ffff880015879960 RDI: ffff88003e627b90
      RBP: ffff880015879a28 R08: 0000000000000002 R09: 0000000000000002
      R10: 0000000000000001 R11: ffff880015879950 R12: ffff880015879aa4
      R13: 0000000000000000 R14: ffff8800083dc158 R15: ffff880015879be8
      FS:  00007f671e9d87c0(0000) GS:ffff88003bc00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00000000000000a8 CR3: 000000001587f000 CR4: 00000000000006f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process tar (pid: 4544, threadinfo ffff880015878000, task ffff880015875040)
      Stack:
       ffffffffa00b1759 ffff8800070dc158 ffff8800000213da ffff88002a286508
       ffff880015879aa4 ffff880015879be8 0000000000000001 ffff88002a2866e8
       ffff880015879a88 ffffffffa00b20be 00000000000200da ffff880015875040
      Call Trace:
       [<ffffffffa00b1759>] ? nfs_fscache_wait_bit+0xd/0xd [nfs]
       [<ffffffffa00b20be>] __nfs_readpages_from_fscache+0x7e/0x13f [nfs]
       [<ffffffff81095fe7>] ? __alloc_pages_nodemask+0x156/0x662
       [<ffffffffa0098763>] nfs_readpages+0xee/0x187 [nfs]
       [<ffffffff81098a5e>] __do_page_cache_readahead+0x1be/0x267
       [<ffffffff81098942>] ? __do_page_cache_readahead+0xa2/0x267
       [<ffffffff81098d7b>] ra_submit+0x1c/0x20
       [<ffffffff8109900a>] ondemand_readahead+0x28b/0x29a
       [<ffffffff810990ce>] page_cache_sync_readahead+0x38/0x3a
       [<ffffffff81091d8a>] generic_file_aio_read+0x2ab/0x67e
       [<ffffffffa008cfbe>] nfs_file_read+0xa4/0xc9 [nfs]
       [<ffffffff810c22c4>] do_sync_read+0xba/0xfa
       [<ffffffff810a62c9>] ? might_fault+0x4e/0x9e
       [<ffffffff81177a47>] ? security_file_permission+0x7b/0x84
       [<ffffffff810c25dd>] ? rw_verify_area+0xab/0xc8
       [<ffffffff810c29a4>] vfs_read+0xaa/0x13a
       [<ffffffff810c2a79>] sys_read+0x45/0x6c
       [<ffffffff813ac37b>] system_call_fastpath+0x16/0x1b
      Reported-by: NMark Moseley <moseleymark@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      de242c0b
  3. 15 12月, 2012 1 次提交
  4. 05 11月, 2012 1 次提交
  5. 01 11月, 2012 1 次提交
    • W
      NFS: add nfs_sb_deactive_async to avoid deadlock · 324d003b
      Weston Andros Adamson 提交于
      Use nfs_sb_deactive_async instead of nfs_sb_deactive when in a workqueue
      context.  This avoids a deadlock where rpc_shutdown_client loops forever
      in a workqueue kworker context, trying to kill all RPC tasks associated with
      the client, while one or more of these tasks have already been assigned to the
      same kworker (and will never run rpc_exit_task).
      
      This approach is needed because RPC tasks that have already been assigned
      to a kworker by queue_work cannot be canceled, as explained in the comment
      for workqueue.c:insert_wq_barrier.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      [Trond: add module_get/put.]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      324d003b
  6. 03 10月, 2012 1 次提交
  7. 29 9月, 2012 2 次提交
  8. 05 9月, 2012 1 次提交
  9. 01 8月, 2012 1 次提交
    • M
      nfs: disable data cache revalidation for swapfiles · 29418aa4
      Mel Gorman 提交于
      The VM does not like PG_private set on PG_swapcache pages.  As suggested
      by Trond in http://lkml.org/lkml/2006/8/25/348, this patch disables NFS
      data cache revalidation on swap files.  as it does not make sense to have
      other clients change the file while it is being used as swap.  This avoids
      setting PG_private on swap pages, since there ought to be no further races
      with invalidate_inode_pages2() to deal with.
      
      Since we cannot set PG_private we cannot use page->private which is
      already used by PG_swapcache pages to store the nfs_page.  Thus augment
      the new nfs_page_find_request logic.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NRik van Riel <riel@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Eric B Munson <emunson@mgebm.net>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Xiaotian Feng <dfeng@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29418aa4
  10. 31 7月, 2012 5 次提交
  11. 18 7月, 2012 1 次提交
  12. 29 6月, 2012 2 次提交
  13. 20 6月, 2012 1 次提交
  14. 01 6月, 2012 1 次提交
  15. 25 5月, 2012 2 次提交
  16. 20 5月, 2012 1 次提交
  17. 06 5月, 2012 1 次提交
  18. 02 5月, 2012 6 次提交
  19. 28 4月, 2012 1 次提交
    • F
      NFS: create struct nfs_commit_info · ea2cf228
      Fred Isaman 提交于
      It is COMMIT that is handled the most differently between
      the paged and direct paths.  Create a structure that encapsulates
      everything either path needs to know about the commit state.
      
      We could use void to hide some of the layout driver stuff, but
      Trond suggests pulling it out to ensure type checking, given the
      huge changes being made, and the fact that it doesn't interfere
      with other drivers.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ea2cf228
  20. 29 3月, 2012 1 次提交
  21. 21 3月, 2012 1 次提交
  22. 11 3月, 2012 1 次提交
  23. 07 3月, 2012 2 次提交
  24. 06 3月, 2012 1 次提交
  25. 03 3月, 2012 1 次提交
  26. 07 2月, 2012 2 次提交
    • S
      NFS: make cb_ident_idr per net ns · 28cd1b3f
      Stanislav Kinsbursky 提交于
      This patch makes ID's infrastructure network namespace aware. This was done
      mainly because of nfs_client_lock, which is desired to be per network
      namespace, but protects NFS clients ID's.
      
      NOTE: NFS client's net pointer have to be set prior to ID initialization,
      proper assignment was moved.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      28cd1b3f
    • S
      NFS: make nfs_client_list per net ns · 6b13168b
      Stanislav Kinsbursky 提交于
      This patch splits global list of NFS clients into per-net-ns array of lists.
      This looks more strict and clearer.
      BTW, this patch also makes "/proc/fs/nfsfs/servers" entry content depends on
      /proc mount owner pid namespace. See below for details.
      
      NOTE: few words about how was /proc/fs/nfsfs/ entries content show per network
      namespace done. This is a little bit tricky and not the best is could be. But
      it's cheap (proper fix for /proc conteinerization is a hard nut to crack).
      The idea is simple: take proper network namespace from pid namespace
      child reaper nsproxy of /proc/ mount creator.
      This actually means, that if there are 2 containers with different net
      namespace sharing pid namespace, then read of /proc/fs/nfsfs/ entries will
      always return content, taken from net namespace of pid namespace creator task
      (and thus second namespace set wil be unvisible).
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6b13168b