mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, andrea.parri@amarulasolutions.com,
	peterz@infradead.org, paulmck@linux.ibm.com,
	Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 0/2] Refactor snapshot vs nocow writers locking
Date: Thu,  6 Jun 2019 16:52:17 +0300	[thread overview]
Message-ID: <20190606135219.1086-1-nborisov@suse.com> (raw)

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

-- 
2.17.1


             reply	other threads:[~2019-06-06 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 13:52 Nikolay Borisov [this message]
2019-06-06 13:52 ` [PATCH 1/2] btrfs: Implement DRW lock Nikolay Borisov
2019-06-06 15:15   ` Filipe Manana
2019-06-07 10:52   ` Paul E. McKenney
2019-06-07 11:59     ` Nikolay Borisov
2019-06-08 15:13       ` Paul E. McKenney
2019-06-08 15:44         ` Nikolay Borisov
2019-06-08 16:06           ` Paul E. McKenney
2019-06-08 16:21             ` Nikolay Borisov
2019-06-08 16:39               ` Paul E. McKenney
2019-06-08 16:33   ` Andrea Parri
2019-06-12 14:05   ` David Sterba
2019-06-06 13:52 ` [PATCH 2/2] btrfs: convert snapshot/nocow exlcusion to drw lock Nikolay Borisov
2019-06-06 15:21   ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606135219.1086-1-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.ibm.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®