Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp15243pxf; Wed, 17 Mar 2021 14:01:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfMm8TcKbSXsyq/Nl7IFmj/uYZZ3dsLO1qIbzndTDj3gKWRBmaVhC+a0sQwJggXKVBETLw X-Received: by 2002:a17:906:f9d8:: with SMTP id lj24mr37617631ejb.200.1616014890716; Wed, 17 Mar 2021 14:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616014890; cv=none; d=google.com; s=arc-20160816; b=jxREl5ISScaK2WIbuMTpfEdc7CEnAr3yjXcwrYRm68RkS5QQeXdv44LDD5eqy4fSX/ TOOXCHa1W7Pb1oSCdAVwROdLATjB48Z36rwarcrMMj+JfIFNI4n/6hwhTmN9QRaGNvDD kZc2ozZPSyrpio10+ZOD4m1PDkfi9FnNIMLR6VzNK+3SVIjeMk5N5EAmvnOxOFdJxn/q FJxwnhigIqmLwfAiAG+UDfEnSsaQZG4iUAoShdw5dwoD82w5W6E3yoJJEcBqEnhW6N5x YhLn+4RC0Go7PNqgNhdQVJ5HE6sunqEhhgImOso4xAIjB3WxM8RAJhghVdZh4pE4ccuu ZD7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:subject:dkim-signature; bh=2894I/LQmig+y2LdSsgD3xzz+gQLEJ32iAQUkX97XL0=; b=Tov/JPVuqqS7J7ER0lbm3UTa6FTL0o1bOo5uHC3Ddwc5Jz+LbsSP+HL6yN5P6RRLNi UBwZwKUmbhNu12NfX9vTzdTH5YsTwbkroinY2jArAr7W1iIkoCiBtuhoUQZA7rc1rPnR wcb0R6FClZcDXLJKLu6Y12oHl22k8GUbDFiqEVNY/eSJewFCh5bZRq6hH2GadY+twNSt ke33iCq52SSwFF9iyw+N7kG9VD5SD/pj0GLlbBNDRJ6lGzdW2mxDmlbhvLOOhA25pK3Z uqOKEwDFjqLxblgMGxf0nk6wh5LoQ6p7WY++xpLcb0FJ/RRlELK4yXcMK0T9pGEVwrPf GdNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=hwjka0Vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si18593987edq.271.2021.03.17.14.01.07; Wed, 17 Mar 2021 14:01:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=hwjka0Vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233525AbhCQU6n (ORCPT + 99 others); Wed, 17 Mar 2021 16:58:43 -0400 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:33881 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233516AbhCQU6U (ORCPT ); Wed, 17 Mar 2021 16:58:20 -0400 Received: from [192.168.111.103] (p4fd975c2.dip0.t-ipconnect.de [79.217.117.194]) (authenticated bits=0) by unimail.uni-dortmund.de (8.16.1/8.16.1) with ESMTPSA id 12HKwC80011602 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT); Wed, 17 Mar 2021 21:58:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1616014692; bh=3HNa2+WqZpFC4qf3gJ4PGfw6tm9BCKyr+RH5gsmRmqU=; h=Subject:Cc:References:From:Date:In-Reply-To; b=hwjka0Vg//0SHZ9HoOpgkDI5EMpeLvV0tl4RglTFV++67mSkzT8eVwghi8zVQSYo+ QShNcEpONvsBOb6tZ7tKuCYu/77QtsBfWLR9ziaJD/pSUVdrcpwc5cRSdUDYxxNtb0 KBq/kuHAnXvm3dD5RnNxJZaAfzwJrphyu+YGKwjU= Subject: Re: [PATCH v3] Updated locking documentation for transaction_t Cc: Horst Schirmeier , Jan Kara , "Theodore Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210211171410.17984-1-alexander.lochmann@tu-dortmund.de> From: Alexander Lochmann Message-ID: Date: Wed, 17 Mar 2021 21:58:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210211171410.17984-1-alexander.lochmann@tu-dortmund.de> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Does this patch look good to you either? - Alex On 11.02.21 18:14, 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 > Reviewed-by: Jan Kara > --- > 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; > > -- Technische Universität Dortmund Alexander Lochmann PGP key: 0xBC3EF6FD Otto-Hahn-Str. 16 phone: +49.231.7556141 D-44227 Dortmund fax: +49.231.7556116 http://ess.cs.tu-dortmund.de/Staff/al