Skip to content

Replace custom device-replace locking with rwsem

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btrfs: reada: reorder dev-replace locks before radix tree preloadfs/btrfs/reada.c+7 -50 replies
2/4btrfs: dev-replace: swich locking to rw semaphorefs/btrfs/ctree.h fs/btrfs/dev-replace.c fs/btrfs/disk-io.c+8 -80 replies
3/4btrfs: dev-replace: remove custom read/write blocking schemefs/btrfs/ctree.h fs/btrfs/dev-replace.c fs/btrfs/dev-replace.h +2 more+6 -280 replies
4/4btrfs: dev-replace: open code trivial locking helpersfs/btrfs/dev-replace.c fs/btrfs/dev-replace.h fs/btrfs/reada.c +2 more+52 -740 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Replace custom device-replace locking with rwsem

The first cleanup part went to 4.19, the actual switch from the custom locking to rswem was postponed as I found performance degradation. This turned out to be related to VM cache settings, so I'm resending the series again.

The custom locking is based on rwlock protected reader/writer counters, waitqueues, which essentially is what the readwrite semaphore does.

Previous patchset:
https://lore.kernel.org/linux-btrfs/[email protected]/

Patches correspond to 8/11-11/11 and there's no change besides refreshing on top of current misc-next.

David Sterba (4):
btrfs: reada: reorder dev-replace locks before radix tree preload
btrfs: dev-replace: swich locking to rw semaphore
btrfs: dev-replace: remove custom read/write blocking scheme
btrfs: dev-replace: open code trivial locking helpers

 fs/btrfs/ctree.h       |  4 +-
 fs/btrfs/dev-replace.c | 97 ++++++++++++++----------------------------
 fs/btrfs/dev-replace.h |  5 ---
 fs/btrfs/disk-io.c     |  4 +-
 fs/btrfs/reada.c       | 16 ++++---
 fs/btrfs/scrub.c       | 15 ++++---
 fs/btrfs/volumes.c     | 27 ++++++------
 7 files changed, 63 insertions(+), 105 deletions(-)
Signature · 1 line
2.19.1