From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02E8EC04AB1 for ; Thu, 9 May 2019 13:54:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4B9520675 for ; Thu, 9 May 2019 13:54:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726558AbfEINy5 (ORCPT ); Thu, 9 May 2019 09:54:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:54020 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726706AbfEINy4 (ORCPT ); Thu, 9 May 2019 09:54:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 62806AC70; Thu, 9 May 2019 13:54:55 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 16E3EDA8DC; Thu, 9 May 2019 15:55:51 +0200 (CEST) Date: Thu, 9 May 2019 15:55:51 +0200 From: David Sterba To: Nikolay Borisov Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs: Add comments on locking of several device-related fields Message-ID: <20190509135550.GS20156@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nikolay Borisov , linux-btrfs@vger.kernel.org References: <20190507142428.6531-1-nborisov@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190507142428.6531-1-nborisov@suse.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Tue, May 07, 2019 at 05:24:28PM +0300, Nikolay Borisov wrote: > Signed-off-by: Nikolay Borisov > --- > 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