linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Extent buffer locking and documentation
@ 2019-10-30 10:56 David Sterba
  2019-10-30 10:56 ` [PATCH v2 1/5] btrfs: merge blocking_writers branches in btrfs_tree_read_lock David Sterba
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: David Sterba @ 2019-10-30 10:56 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

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(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-05 10:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 10:56 [PATCH v2 0/5] Extent buffer locking and documentation David Sterba
2019-10-30 10:56 ` [PATCH v2 1/5] btrfs: merge blocking_writers branches in btrfs_tree_read_lock David Sterba
2019-10-31 10:22   ` Johannes Thumshirn
2019-10-30 10:56 ` [PATCH v2 2/5] btrfs: set blocking_writers directly, no increment or decrement David Sterba
2019-10-30 10:57 ` [PATCH v2 3/5] btrfs: access eb::blocking_writers according to ACCESS_ONCE policies David Sterba
2019-10-30 10:57 ` [PATCH v2 4/5] btrfs: document extent buffer locking David Sterba
2019-10-30 10:57 ` [PATCH v2 5/5] btrfs: locking: add lock assertions David Sterba
2019-11-05 10:31   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).