mbox series

[v3,0/2] Refactor snapshot vs nocow writers locking

Message ID 20200224152637.30774-1-nborisov@suse.com (mailing list archive)
Headers show
Series Refactor snapshot vs nocow writers locking | expand

Message

Nikolay Borisov Feb. 24, 2020, 3:26 p.m. UTC
Here is v3 of the DRW locking patches.

Main changes in this verison:
 * Removed EXPORT_SYMBOL for function since I do not intend to submit the locktorture
 patch
 * Added high-level comment as per David's request.

V2:
* Fixed all checkpatch warnings (Andrea Parri)
* Properly call write_unlock in btrfs_drw_try_write_lock (Filipe Manana)
* Comment fix.
* Stress tested it via locktorture. Survived for 8 straight days on a 4 socket
48 thread machine.

Nikolay Borisov (2):
  btrfs: convert snapshot/nocow exlcusion to drw lock
  btrfs: Hook btrfs' DRW lock to locktorture infrastructure

 fs/btrfs/ctree.h             |  9 +----
 fs/btrfs/disk-io.c           | 46 ++++++---------------
 fs/btrfs/extent-tree.c       | 44 ---------------------
 fs/btrfs/file.c              | 11 +++---
 fs/btrfs/inode.c             |  8 ++--
 fs/btrfs/ioctl.c             | 10 ++---
 fs/btrfs/locking.c           |  5 +++
 fs/btrfs/locking.h           |  1 +
 kernel/locking/locktorture.c | 77 +++++++++++++++++++++++++++++++++++-
 9 files changed, 107 insertions(+), 104 deletions(-)

--
2.17.1

Comments

David Sterba Feb. 24, 2020, 4:02 p.m. UTC | #1
On Mon, Feb 24, 2020 at 05:26:35PM +0200, Nikolay Borisov wrote:
> Here is v3 of the DRW locking patches.

As discussed, let's rename it to DREW locks, where E stands for
exclusion: double reader/writer exclusion.