From: Christoph Hellwig <hch@infradead.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: Implement DRW lock
Date: Thu, 30 Jan 2020 05:43:10 -0800 [thread overview]
Message-ID: <20200130134310.GA29879@infradead.org> (raw)
In-Reply-To: <58590063-9d21-a261-03a1-84319727ed94@suse.com>
On Thu, Jan 30, 2020 at 03:42:27PM +0200, Nikolay Borisov wrote:
>
>
> On 30.01.20 г. 15:41 ч., Christoph Hellwig wrote:
> > On Thu, Jan 30, 2020 at 02:59:41PM +0200, Nikolay Borisov wrote:
> >> A (D)ouble (R)eader (W)riter lock is a locking primitive that allows
> >> to have multiple readers or multiple writers but not multiple readers
> >> and writers holding it concurrently. The code is factored out from
> >> the existing open-coded locking scheme used to exclude pending
> >> snapshots from nocow writers and vice-versa. Current implementation
> >> actually favors Readers (that is snapshot creaters) to writers (nocow
> >> writers of the filesystem).
> >
> > Any reason not to move it to lib/ under a new option so that other
> > users could reuse it as needed?
> >
>
> Yes, I think it's rather specific to btrfs. I don't care honestly if
> there is demand I wouldn't mind.
Ok, just keep it in btrfs for now, we can always move it later.
It just looks like very generic code.
next prev parent reply other threads:[~2020-01-30 13:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 12:59 [PATCH 0/2] Refactor snapshot vs nocow writers locking Nikolay Borisov
2020-01-30 12:59 ` [PATCH 1/2] btrfs: Implement DRW lock Nikolay Borisov
2020-01-30 13:41 ` Christoph Hellwig
2020-01-30 13:42 ` Nikolay Borisov
2020-01-30 13:43 ` Christoph Hellwig [this message]
2020-01-30 12:59 ` [PATCH 2/2] btrfs: convert snapshot/nocow exlcusion to drw lock Nikolay Borisov
2020-01-30 12:59 ` [RESEND PATCH v2 0/2] Refactor snapshot vs nocow writers locking Nikolay Borisov
2020-01-30 14:21 ` David Sterba
2020-02-21 14:51 ` David Sterba
2020-01-30 12:59 ` [PATCH v2 1/2] btrfs: Implement DRW lock Nikolay Borisov
2020-01-30 13:37 ` Nikolay Borisov
2020-01-30 14:06 ` David Sterba
2020-01-30 14:11 ` Nikolay Borisov
2020-01-30 12:59 ` [PATCH v2 2/2] btrfs: convert snapshot/nocow exlcusion to drw lock Nikolay Borisov
-- strict thread matches above, loose matches on Subject: below --
2020-02-24 15:26 [PATCH v3 0/2] Refactor snapshot vs nocow writers locking Nikolay Borisov
2020-02-24 15:32 ` [PATCH 1/2] btrfs: Implement DRW lock Nikolay Borisov
2019-06-06 13:52 [PATCH 0/2] Refactor snapshot vs nocow writers locking Nikolay Borisov
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
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=20200130134310.GA29879@infradead.org \
--to=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).