Skip to content

Extent buffer locking and documentation

David Sterba linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesIn review
  2. v15 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- removed one READ_ONCE in 3/5 "btrfs: access eb::blocking_writers according to ACCESS_ONCE policies"
- drop patch 4/5 "btrfs: serialize blocking_writers updates"
- enhance locking documentatin
- add lockdep assertions

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: merge blocking_writers branches in btrfs_tree_read_lockfs/btrfs/locking.c+14 -131 reply
2/5btrfs: set blocking_writers directly, no increment or decrementfs/btrfs/locking.c+2 -20 replies
3/5btrfs: access eb::blocking_writers according to ACCESS_ONCE policiesfs/btrfs/locking.c+21 -110 replies
4/5btrfs: document extent buffer lockingfs/btrfs/locking.c+158 -140 replies
5/5btrfs: locking: add lock assertionsfs/btrfs/locking.c+3 -01 reply

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchJohannnes Thumshirn
1/5R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] Extent buffer locking and documentation

V2:
- removed one READ_ONCE in 3/5 "btrfs: access eb::blocking_writers according to ACCESS_ONCE policies"
- drop patch 4/5 "btrfs: serialize blocking_writers updates"
- enhance locking documentatin
- add lockdep assertions

----------------

I've spent a lot of time staring at the locking code and speculating about all sorts of weird problems that could happen due to memory ordering or lost wakeups or if the custom locking is safe at all, also regarding the recent changes.

Inevitably I found something but also wrote documentation. Please read it and if you see need for more clarifications, I'm happy to add it as I'm now in a state that things become temporarily obvious and trivial.

I've tested it in fstests with KCSAN (the new concurrency sanitizer), no problems found but this is not considered sufficient, more tests will follow.

David Sterba (5):
btrfs: merge blocking_writers branches in btrfs_tree_read_lock
btrfs: set blocking_writers directly, no increment or decrement
btrfs: access eb::blocking_writers according to ACCESS_ONCE policies
btrfs: document extent buffer locking
btrfs: locking: add lock assertions

 fs/btrfs/locking.c | 234 +++++++++++++++++++++++++++++++++++++--------
 1 file changed, 196 insertions(+), 38 deletions(-)
Signature · 1 line
2.23.0