Skip to content

Refactor snapshot vs nocow writers locking

Nikolay Borisov linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: Implement DRW lockfs/btrfs/Makefile fs/btrfs/drw_lock.c fs/btrfs/drw_lock.h+95 -13 replies
2/2btrfs: convert snapshot/nocow exlcusion to drw lockfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/extent-tree.c +3 more+19 -950 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/2] Refactor snapshot vs nocow writers locking

This patchset first factors out the open code which essentially implements a lock that allows to have either multiple reader or multiple writers but not both. Then patch 2 just converts the code to using the newly introduced lock.

The individual patch descriptions contain more information about the technical details and invariants that the lock provide.

I have also CC'ed a copule of the maintainer of linux memory model since my patches just factor out the code and I would really like someone proficient enough in the usage/semantics of memory barries to review it as well.

Nikolay Borisov (2):
btrfs: Implement DRW lock
btrfs: convert snapshot/nocow exlcusion to drw lock

 fs/btrfs/Makefile      |  2 +-
 fs/btrfs/ctree.h       | 10 ++----
 fs/btrfs/disk-io.c     | 39 ++---------------------
 fs/btrfs/drw_lock.c    | 71 ++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/drw_lock.h    | 23 ++++++++++++++
 fs/btrfs/extent-tree.c | 35 ---------------------
 fs/btrfs/file.c        | 12 +++----
 fs/btrfs/inode.c       |  8 ++---
 fs/btrfs/ioctl.c       | 10 ++----
 9 files changed, 114 insertions(+), 96 deletions(-)
 create mode 100644 fs/btrfs/drw_lock.c
 create mode 100644 fs/btrfs/drw_lock.h
Signature · 1 line
2.17.1