Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2248672pxb; Thu, 11 Feb 2021 07:54:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxU4Vt8HOuH+KpkJlV8nfyJ0PTHjbZU2oiMEPeBwYIT4uP8NVjQytCbt+IpA12seGJZ9g5D X-Received: by 2002:a17:906:1199:: with SMTP id n25mr8967794eja.431.1613058897538; Thu, 11 Feb 2021 07:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613058897; cv=none; d=google.com; s=arc-20160816; b=xcB7c21LUJGpGqC4SkKN/tHlieg7CfnY0hyH8Tl4cjlJcKEny9Nhlt9wUTXCHiXN/c jD79LG6IVONPgeELjhfZBX6sLNNjodnzyK+nBdc6nVHB2gBUQKDf/w4k+MI05zKLgYMo k+/BWfoZVsvrzngTG4ae6cP0KYVE4OAw3jRHo9N4eX4J0o9hmHK9DtclNg+1XenMM/DY l8GP9yzADBCpF7rI2R3EIajDk5g6cEMgwYTJeTCAiyZnj6bgtVsvv9zbffgW9Lsf5vSw e7XD/u5jMgJRUjI1p1ubdCXD5CcrBaZfUx+pIP5R9Vmq7gCBTjUBrVZ8gdfp2JosuhiK Pvdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CadQe1Yw21fVpeSmLkC2UZ44yu2Iq8xQ18TWyZJFPls=; b=ZIlZpKo+lED4oUVur6uzPimGqPSu91yRe/M0nnDCBQbVzL7A9aTenNFNbiNevwyGF2 gcHvnxP7nvPRFXz6zo7IsQsoir1ro0GFPhj+TRacWO40RND4bnd+eyxwU4ZhhBDyzf19 hZNEEpEypccPDGsBoqciPFg9xHQvh2zZyaSpTwm61ONrG7SZbMZxYZXtVPUtPzKSJyI8 4dFU33ECo54BCOx/ltV1IXMB5da51ZAw3av/9G8YkQoLsUDQiez4RE1QS36M+TdUMNkM RPec0Snn9KdA7wh5NPyn+W4Qgx3uMRcuogsHzwCK3W+XeZjOWFbhWekFg+bTh9SJEicM 45AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 b21si4241166edx.44.2021.02.11.07.54.31; Thu, 11 Feb 2021 07:54:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbhBKPyH (ORCPT + 99 others); Thu, 11 Feb 2021 10:54:07 -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-ext4@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