1. 16 3月, 2017 4 次提交
  2. 23 2月, 2017 1 次提交
  3. 18 2月, 2017 1 次提交
  4. 16 2月, 2017 1 次提交
  5. 14 2月, 2017 1 次提交
  6. 26 12月, 2016 1 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
  7. 25 12月, 2016 1 次提交
  8. 16 12月, 2016 1 次提交
  9. 22 9月, 2016 1 次提交
  10. 03 8月, 2016 1 次提交
  11. 27 6月, 2016 3 次提交
    • A
      gfs2: Lock holder cleanup · 6df9f9a2
      Andreas Gruenbacher 提交于
      Make the code more readable by cleaning up the different ways of
      initializing lock holders and checking for initialized lock holders:
      mark lock holders as uninitialized by setting the holder's glock to NULL
      (gfs2_holder_mark_uninitialized) instead of zeroing out the entire
      object or using a separate flag.  Recognize initialized holders by their
      non-NULL glock (gfs2_holder_initialized).  Don't zero out holder objects
      which are immeditiately initialized via gfs2_holder_init or
      gfs2_glock_nq_init.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      6df9f9a2
    • A
      gfs2: Get rid of gfs2_ilookup · ec5ec66b
      Andreas Gruenbacher 提交于
      Now that gfs2_lookup_by_inum only takes the inode glock for new inodes
      (and not for cached inodes anymore), there no longer is a need to
      optimize the cached-inode case in gfs2_get_dentry or delete_work_func,
      and gfs2_ilookup can be removed.
      
      In addition, gfs2_get_dentry wasn't checking the GFS2_DIF_SYSTEM flag in
      i_diskflags in the gfs2_ilookup case (see gfs2_lookup_by_inum); this
      inconsistency goes away as well.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      ec5ec66b
    • A
      gfs2: Fix gfs2_lookup_by_inum lock inversion · 3ce37b2c
      Andreas Gruenbacher 提交于
      The current gfs2_lookup_by_inum takes the glock of a presumed inode
      identified by block number, verifies that the block is indeed an inode,
      and then instantiates and reads the new inode via gfs2_inode_lookup.
      
      However, instantiating a new inode may block on freeing a previous
      instance of that inode (__wait_on_freeing_inode), and freeing an inode
      requires to take the glock already held, leading to lock inversion and
      deadlock.
      
      Fix this by first instantiating the new inode, then verifying that the
      block is an inode (if required), and then reading in the new inode, all
      in gfs2_inode_lookup.
      
      If the block we are looking for is not an inode, we discard the new
      inode via iget_failed, which marks inodes as bad and unhashes them.
      Other tasks waiting on that inode will get back a bad inode back from
      ilookup or iget_locked; in that case, retry the lookup.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      3ce37b2c
  12. 13 4月, 2016 1 次提交
  13. 05 4月, 2016 1 次提交
  14. 24 3月, 2016 1 次提交
  15. 15 3月, 2016 2 次提交
  16. 14 1月, 2016 1 次提交
  17. 15 12月, 2015 2 次提交
  18. 17 11月, 2015 1 次提交
    • A
      GFS2: Use rht_for_each_entry_rcu in glock_hash_walk · 3dd1dd8c
      Andrew Price 提交于
      This lockdep splat was being triggered on umount:
      
      [55715.973122] ===============================
      [55715.980169] [ INFO: suspicious RCU usage. ]
      [55715.981021] 4.3.0-11553-g8d3de01c-dirty #15 Tainted: G        W
      [55715.982353] -------------------------------
      [55715.983301] fs/gfs2/glock.c:1427 suspicious rcu_dereference_protected() usage!
      
      The code it refers to is the rht_for_each_entry_safe usage in
      glock_hash_walk. The condition that triggers the warning is
      lockdep_rht_bucket_is_held(tbl, hash) which is checked in the
      __rcu_dereference_protected macro.
      
      The rhashtable buckets are not changed in glock_hash_walk so it's safe
      to rely on the rcu protection. Replace the rht_for_each_entry_safe()
      usage with rht_for_each_entry_rcu(), which doesn't care whether the
      bucket lock is held if the rcu read lock is held.
      Signed-off-by: NAndrew Price <anprice@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      3dd1dd8c
  19. 30 10月, 2015 1 次提交
  20. 04 9月, 2015 5 次提交
  21. 19 6月, 2015 1 次提交
    • B
      GFS2: Don't add all glocks to the lru · e7ccaf5f
      Bob Peterson 提交于
      The glocks used for resource groups often come and go hundreds of
      thousands of times per second. Adding them to the lru list just
      adds unnecessary contention for the lru_lock spin_lock, especially
      considering we're almost certainly going to re-use the glock and
      take it back off the lru microseconds later. We never want the
      glock shrinker to cull them anyway. This patch adds a new bit in
      the glops that determines which glock types get put onto the lru
      list and which ones don't.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      e7ccaf5f
  22. 30 3月, 2015 1 次提交
  23. 21 1月, 2015 1 次提交
  24. 09 1月, 2015 1 次提交
  25. 18 11月, 2014 1 次提交
  26. 08 10月, 2014 1 次提交
  27. 18 7月, 2014 3 次提交
    • B
      GFS2: Allow flocks to use normal glock dq rather than dq_wait · 5bef3e7c
      Bob Peterson 提交于
      This patch allows flock glocks to use a non-blocking dequeue rather
      than dq_wait. It also reverts the previous patch I had posted regarding
      dq_wait. The reverted patch isn't necessarily a bad idea, but I decided
      this might avoid unforeseen side effects, and was therefore safer.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5bef3e7c
    • S
      GFS2: Use GFP_NOFS when allocating glocks · fe0bbd29
      Steven Whitehouse 提交于
      Normally GFP_KERNEL is ok here, but there is now a rarely used code path
      relating to deallocation of unlinked inodes (in certain corner cases)
      which if hit at times of memory shortage can cause recursion while
      trying to free memory.
      
      One solution would be to try and move the gfs2_glock_get() call so
      that it is no longer called while another glock is held, but that
      doesn't look at all easy, so GFP_NOFS is the best solution for the
      time being.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fe0bbd29
    • S
      GFS2: Fix race in glock lru glock disposal · 94a09a39
      Steven Whitehouse 提交于
      We must not leave items on the LRU list with GLF_LOCK set, since
      they can be removed if the glock is brought back into use, which
      may then potentially result in a hang, waiting for GLF_LOCK to
      clear.
      
      It doesn't happen very often, since it requires a glock that has
      not been used for a long time to be brought back into use at the
      same moment that the shrinker is part way through disposing of
      glocks.
      
      The fix is to set GLF_LOCK at a later time, when we already know
      that the other locks can be obtained. Also, we now only release
      the lru_lock in case a resched is needed, rather than on every
      iteration.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      94a09a39