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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 ACD76C433E0 for ; Thu, 11 Feb 2021 17:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7AB1C64E76 for ; Thu, 11 Feb 2021 17:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbhBKRAW (ORCPT ); Thu, 11 Feb 2021 12:00:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:36034 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbhBKPv3 (ORCPT ); Thu, 11 Feb 2021 10:51:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2B6E3AC69; Thu, 11 Feb 2021 15:50:48 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id D58911E14C6; Thu, 11 Feb 2021 16:50:47 +0100 (CET) Date: Thu, 11 Feb 2021 16:50:47 +0100 From: Jan Kara To: Alexander Lochmann Cc: Horst Schirmeier , Theodore Ts'o , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Updated locking documentation for transaction_t Message-ID: <20210211155047.GS19070@quack2.suse.cz> References: <20210211135424.42826-1-alexander.lochmann@tu-dortmund.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210211135424.42826-1-alexander.lochmann@tu-dortmund.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 11-02-21 14:54:23, Alexander Lochmann wrote: > Some members of transaction_t are allowed to be read without > any lock being held if accessed from the correct context. > We used LockDoc's findings to determine those members. > Each member of them is marked with a short comment: > "no lock needed for jbd2 thread". > > Signed-off-by: Alexander Lochmann > Signed-off-by: Horst Schirmeier Thanks. You can add: Reviewed-by: Jan Kara Honza > --- > include/linux/jbd2.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h > index 99d3cd051ac3..1f19d19f6435 100644 > --- a/include/linux/jbd2.h > +++ b/include/linux/jbd2.h > @@ -594,18 +594,18 @@ struct transaction_s > */ > unsigned long t_log_start; > > - /* Number of buffers on the t_buffers list [j_list_lock] */ > + /* Number of buffers on the t_buffers list [j_list_lock, no locks needed for jbd2 thread] */ > int t_nr_buffers; > > /* > * Doubly-linked circular list of all buffers reserved but not yet > - * modified by this transaction [j_list_lock] > + * modified by this transaction [j_list_lock, no locks needed for jbd2 thread] > */ > struct journal_head *t_reserved_list; > > /* > * Doubly-linked circular list of all metadata buffers owned by this > - * transaction [j_list_lock] > + * transaction [j_list_lock, no locks needed for jbd2 thread] > */ > struct journal_head *t_buffers; > > @@ -631,7 +631,7 @@ struct transaction_s > /* > * Doubly-linked circular list of metadata buffers being shadowed by log > * IO. The IO buffers on the iobuf list and the shadow buffers on this > - * list match each other one for one at all times. [j_list_lock] > + * list match each other one for one at all times. [j_list_lock, no locks needed for jbd2 thread] > */ > struct journal_head *t_shadow_list; > > -- > 2.20.1 > -- Jan Kara SUSE Labs, CR