Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1180468pxb; Wed, 10 Feb 2021 02:01:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbS4a5DaCQUx6e5Zgtj1iZXMZXNy/DBl3xmdU7M/i+Xq7JwDHtH+2Ajz+TkERZziWO+dJ1 X-Received: by 2002:a17:906:2353:: with SMTP id m19mr2203139eja.13.1612951272634; Wed, 10 Feb 2021 02:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612951272; cv=none; d=google.com; s=arc-20160816; b=cMTGVpHegUtnZOM5r+CGv4kgHSr7I5BdgWjVBbnwiNeWColgcFLi01J9Eu1hOh/C4n YedAT3/bpFt/U4/hoV+sZe1DNmAnaJLZPmPMFxrxrQzPPc6NsgO+4xlcG4Fr39kc24d7 Vdw6vjE+4et81AIOYw8Eq8vF5BOHbQ/CrqoHd7rJiOp4SpMgkCI+lw5+Fbj5gQlMkt+S FhO6I9ePxhMOXQHhlIUVJ+pAtjDvKSoixFE9ruMMwO2ConY/Wu3DnhfKbPc6Dhmt2ryB sCIkr7gZ2BEMvKsFZmiM7FTMHNZ55JM8pNMaDbofBOAeNWuZSC2nijucBGQrpGA1dge2 NI1g== 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:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=rELNrU/dkwZ3ZWkp+Tbv0o95Xz3ivc7Tax6c32yS3gk=; b=pLYEJLZtY44zDsh2C0/JLZrpyk9NcOOxrTKSPXAaUWUhoUauqeLuZTM7OBLJI3JYkf nf+fgnLdQh6IDth7dPopbRCxwQ/Ky9X+pDbaSuuIvGhx6dpLzeBAdqNs7ZBwR2/NHFtu QjO6kbPAU4ch4y10bfbgoK0B9yp43yPJZQrDKWg74QxRULEZisKZQfc8NWEXP1eMMJDt R4q8F0q9EZwnutCv6Mc7RWowJpceSlqia6WZzN2RWtZf5Mi4LSy9k0v2GL0mPpqn9I0/ Gv0qcU2frNH6njJ2SfiYZz4p0+N+UdFqWAQZVXRekZxYLICBIebrSXXcHP/P0ycjg6ha oqog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=C3ZWOFGs; 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 t21si1229479edi.124.2021.02.10.02.00.41; Wed, 10 Feb 2021 02:01:12 -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; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=C3ZWOFGs; 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 S230383AbhBJKAV (ORCPT + 99 others); Wed, 10 Feb 2021 05:00:21 -0500 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:64986 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230407AbhBJJ5x (ORCPT ); Wed, 10 Feb 2021 04:57:53 -0500 Received: from ios.cs.uni-dortmund.de (ios.cs.uni-dortmund.de [129.217.43.100]) (authenticated bits=0) by unimail.uni-dortmund.de (8.16.1/8.16.1) with ESMTPSA id 11A9unNX027344 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 10:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1612951017; bh=HPi4PR1X2ZJY9+JjYLzNxyQAsDi3SUIOPqfv2OzAdSQ=; h=From:To:Cc:Subject:Date; b=C3ZWOFGsjiS+o2dyE2P3lkBLkR7MJpdzsVr/KZuHAos+9Ct/sD+cwzytvxFBle8jK idmg3TfrIMT4wuCPKkl6uhFGhlg6vSj2gXD06O6blzmanPFf84nM411pfE552Yt+7T cqQaK55yo1K/GK4ZXtNYTj1J6uI1c9fzBjDhduFU= From: Alexander Lochmann Cc: Alexander Lochmann , Horst Schirmeier , "Theodore Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Updated locking documentation for transaction_t Date: Wed, 10 Feb 2021 10:56:48 +0100 Message-Id: <20210210095649.51836-1-alexander.lochmann@tu-dortmund.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Some members of transaction_t are allowed to be read without any lock being held if consistency doesn't matter. Based on LockDoc's findings, we extended the locking documentation of those members. Each one of them is marked with a short comment: "no lock for quick racy checks". Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier --- 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..18f77d9b1745 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 lock for quick racy checks] */ 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 lock for quick racy checks] */ 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 lock for quick racy checks] */ 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 lock for quick racy checks] */ struct journal_head *t_shadow_list; -- 2.20.1