public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Add comments on locking of several device-related fields
Date: Thu, 9 May 2019 16:31:53 +0200	[thread overview]
Message-ID: <20190509143153.GU20156@twin.jikos.cz> (raw)
In-Reply-To: <f66548de-3f42-9c07-06c3-c4c9c6b1e4fc@suse.com>

On Thu, May 09, 2019 at 05:12:16PM +0300, Nikolay Borisov wrote:
> 
> 
> On 9.05.19 г. 16:55 ч., David Sterba wrote:
> > On Tue, May 07, 2019 at 05:24:28PM +0300, Nikolay Borisov wrote:
> >> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> >> ---
> >>  fs/btrfs/volumes.h | 11 ++++++++---
> >>  1 file changed, 8 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
> >> index 3b97e8092ba7..514799362244 100644
> >> --- a/fs/btrfs/volumes.h
> >> +++ b/fs/btrfs/volumes.h
> >> @@ -52,8 +52,8 @@ struct btrfs_io_geometry {
> >>  #define BTRFS_DEV_STATE_FLUSH_SENT	(4)
> >>  
> >>  struct btrfs_device {
> >> -	struct list_head dev_list;
> >> -	struct list_head dev_alloc_list;
> >> +	struct list_head dev_list; /* device_list_mutex */
> >> +	struct list_head dev_alloc_list; /* chunk mutex */
> >>  	struct list_head post_commit_list; /* chunk mutex */
> > 
> > Please update the documentation in the comment 'Device locking' in
> > volumes.c
> 
> Right the only thing that is missing from the Device Locking comment is
> the mention of post_commit_list. However, dev_list and dev_alloc_list
> are essentially "the other side" of btrfs_fs_devices::alloc_list  hence
> I've added them as inline comments. I think it makes more sense to those
> small comments next to the variables at least as a remainder.

Ok.

  reply	other threads:[~2019-05-09 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 14:24 [PATCH] btrfs: Add comments on locking of several device-related fields Nikolay Borisov
2019-05-09 13:55 ` David Sterba
2019-05-09 14:12   ` Nikolay Borisov
2019-05-09 14:31     ` David Sterba [this message]
2019-05-09 15:11   ` [PATCH v2] " Nikolay Borisov
2019-05-10 11:51     ` 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=20190509143153.GU20156@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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