Skip to content

Remove the XFS mrlock

Matthew Wilcox (Oracle) linux-xfs 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 0 repliesNew
  2. v53 patches 9 repliesSuperseded
  3. v44 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches6 repliesSuperseded
v25 patches8 repliesSuperseded
v15 patches27 repliesSuperseded

Changes in v6 from the cover letter

- Pick up acks/review tags from Wayman, Darrick & Dave
- Fix spacing around | (Darrick)
- Rebase on 577acb1ef359 (current xfs for-next)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3locking: Add rwsem_assert_held() and rwsem_assert_held_write()include/linux/rwbase_rt.h include/linux/rwsem.h+48 -70 replies
2/3xfs: Replace xfs_isilocked with xfs_assert_ilockedfs/xfs/libxfs/xfs_attr.c fs/xfs/libxfs/xfs_attr_remote.c fs/xfs/libxfs/xfs_bmap.c +20 more+65 -950 replies
3/3xfs: Remove mrlock wrapperfs/xfs/mrlock.h fs/xfs/xfs_inode.c fs/xfs/xfs_inode.h +3 more+18 -940 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)Waiman LongDarrick J. WongDave Chinner
1/3A-b A-b A-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/3] Remove the XFS mrlock

XFS has an mrlock wrapper around the rwsem which adds only the functionality of knowing whether the rwsem is currently held in read or write mode. Both regular rwsems and rt-rwsems know this, they just don't expose it as an API. By adding that, we can remove the XFS mrlock as well as improving the debug assertions for the mmap_lock when lockdep is disabled.

v6:
- Pick up acks/review tags from Wayman, Darrick & Dave
- Fix spacing around | (Darrick)
- Rebase on 577acb1ef359 (current xfs for-next)
v5:
- Rebase on 5bad490858c3 (current Linus head) to pick up XFS changes
v4:
- Switch the BUG_ONs to WARN_ONs (Wayman, Peter)
v3:
- Rename __rwsem_assert_held() and __rwsem_assert_held_write() to rwsem_assert_held*_nolockdep()
- Use IS_ENABLED(CONFIG_LOCKDEP) to only dump the information once
- Use ASSERT instead of BUG_ON in xfs
- Fix typo in subject line of patch 4
- Drop patch 5 (inode_assert_locked)
- Rebase on top of xfs-6.7-merge-2 which had a merge conflict
v2: Add rwsem_assert_held() and rwsem_assert_held_write() instead of augmenting the existing rwsem_is_locked() with rwsem_is_write_locked(). There's also an __rwsem_assert_held() and __rwsem_assert_held_write() for the benefit of XFS when it's in a context where lockdep doesn't know what's going on. It's still an improvement, so I hope those who are looking for perfection can accept a mere improvement.

Matthew Wilcox (Oracle) (3):
locking: Add rwsem_assert_held() and rwsem_assert_held_write()
xfs: Replace xfs_isilocked with xfs_assert_ilocked
xfs: Remove mrlock wrapper

 fs/xfs/libxfs/xfs_attr.c        |  2 +-
 fs/xfs/libxfs/xfs_attr_remote.c |  2 +-
 fs/xfs/libxfs/xfs_bmap.c        | 21 ++++----
 fs/xfs/libxfs/xfs_defer.c       |  2 +-
 fs/xfs/libxfs/xfs_inode_fork.c  |  2 +-
 fs/xfs/libxfs/xfs_rtbitmap.c    |  2 +-
 fs/xfs/libxfs/xfs_trans_inode.c |  6 +--
 fs/xfs/mrlock.h                 | 78 ------------------------------
 fs/xfs/scrub/readdir.c          |  4 +-
 fs/xfs/xfs_attr_list.c          |  2 +-
 fs/xfs/xfs_bmap_util.c          | 10 ++--
 fs/xfs/xfs_dir2_readdir.c       |  2 +-
 fs/xfs/xfs_dquot.c              |  4 +-
 fs/xfs/xfs_file.c               |  4 +-
 fs/xfs/xfs_inode.c              | 86 ++++++++++++---------------------
 fs/xfs/xfs_inode.h              |  4 +-
 fs/xfs/xfs_inode_item.c         |  4 +-
 fs/xfs/xfs_iops.c               |  7 ++-
 fs/xfs/xfs_linux.h              |  2 +-
 fs/xfs/xfs_qm.c                 | 10 ++--
 fs/xfs/xfs_reflink.c            |  2 +-
 fs/xfs/xfs_rtalloc.c            |  2 +-
 fs/xfs/xfs_super.c              |  4 +-
 fs/xfs/xfs_symlink.c            |  2 +-
 fs/xfs/xfs_trans.c              |  2 +-
 fs/xfs/xfs_trans_dquot.c        |  2 +-
 include/linux/rwbase_rt.h       |  9 +++-
 include/linux/rwsem.h           | 46 ++++++++++++++++--
 28 files changed, 129 insertions(+), 194 deletions(-)
 delete mode 100644 fs/xfs/mrlock.h
Signature · 1 line
2.43.0