1. 06 5月, 2017 1 次提交
    • B
      GFS2: Allow glocks to be unlocked after withdraw · ed17545d
      Bob Peterson 提交于
      This bug fixes a regression introduced by patch 0d1c7ae9.
      
      The intent of the patch was to stop promoting glocks after a
      file system is withdrawn due to a variety of errors, because doing
      so results in a BUG(). (You should be able to unmount after a
      withdraw rather than having the kernel panic.)
      
      Unfortunately, it also stopped demotions, so glocks could not be
      unlocked after withdraw, which means the unmount would hang.
      
      This patch allows function do_xmote to demote locks to an
      unlocked state after a withdraw, but not promote them.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      ed17545d
  2. 03 4月, 2017 1 次提交
  3. 16 3月, 2017 4 次提交
  4. 23 2月, 2017 1 次提交
  5. 18 2月, 2017 1 次提交
  6. 16 2月, 2017 1 次提交
  7. 14 2月, 2017 1 次提交
  8. 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
  9. 25 12月, 2016 1 次提交
  10. 16 12月, 2016 1 次提交
  11. 22 9月, 2016 1 次提交
  12. 03 8月, 2016 1 次提交
  13. 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
  14. 13 4月, 2016 1 次提交
  15. 05 4月, 2016 1 次提交
  16. 24 3月, 2016 1 次提交
  17. 15 3月, 2016 2 次提交
  18. 14 1月, 2016 1 次提交
  19. 15 12月, 2015 2 次提交
  20. 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
  21. 30 10月, 2015 1 次提交
  22. 04 9月, 2015 5 次提交
  23. 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
  24. 30 3月, 2015 1 次提交
  25. 21 1月, 2015 1 次提交
  26. 09 1月, 2015 1 次提交
  27. 18 11月, 2014 1 次提交
  28. 08 10月, 2014 1 次提交
  29. 18 7月, 2014 1 次提交