Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1181022pxb; Wed, 10 Feb 2021 02:02:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt9INVYZllF4wUab0HwxED1gEyZltWiOZNdtfi1XJFjoXFKLHx5YLfsz5gbJ48sUJgLkde X-Received: by 2002:a17:906:1681:: with SMTP id s1mr1073469ejd.229.1612951322194; Wed, 10 Feb 2021 02:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612951322; cv=none; d=google.com; s=arc-20160816; b=v8Vq65fJpcLENPIdylPTp3GkKE1wKTTMI864b3gqY0NBAX6FMO75cdnejf7ffHPWUu W1C1UBbYa5scSbhmYApFWMQ/J6xbT1gUVCddYuiQj00djF/WyPX6J7fJDRmC/Usr4rey T+7cijHG+0Ru0/K6RVQ5PnnR2pLY5sIbSwXZ63wH3n/1nnFR6Zz86yRz2m8V8/9dMAma Xiooqdv/SeYW2cejZl9WYPt2HmDHSwzRCnq5CBw5bbcjki8YM+7kCKWjMn1Mc80cILyG 2YgeFyA7cYSCaxji9PFBt+9pTWORogg7pd1oZBD3PmDl/XwXdQDudTZRN6DNlGOmlA9q jZ7w== 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 :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=rELNrU/dkwZ3ZWkp+Tbv0o95Xz3ivc7Tax6c32yS3gk=; b=v5jTdoPSHwaHwH+3YaPPdQjCikEoZP+IYKLkLZRXN8yeV7LBCq3uTduHEp+J01YPtd ex2DiKcYTrvdUeTpq0jO4XsAY/qx2xc7dUVou5ayDWdYsONrdWpoQ3Ggpb4zQnC54KFa 0V06FfyHDPBTeO0/+j4lJ42zTyGG2FxnUUkgNMeCDnDy/fxmSn9obF+uSa0vnBa3kC03 F8nZrWvFHJ3XbvX5nql2OAHxfZIw90WDgngaCl6apgY8eg6oTIPi00VNqxiRfXxG++je /CJ3gnW4jWArVjutEFs57ClBeHfusJ9txkAQiKWMOiFeHhkrUZmuc0RLGXVb2+/yYFLj Cn0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b="EPp/sQQt"; 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 jr13si1002773ejb.269.2021.02.10.02.01.32; Wed, 10 Feb 2021 02:02:02 -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="EPp/sQQt"; 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 S230166AbhBJKA6 (ORCPT + 99 others); Wed, 10 Feb 2021 05:00:58 -0500 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:41548 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbhBJJ64 (ORCPT ); Wed, 10 Feb 2021 04:58:56 -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 11A9vewk028502 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 10:57:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1612951063; bh=HPi4PR1X2ZJY9+JjYLzNxyQAsDi3SUIOPqfv2OzAdSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EPp/sQQti/wmW19ZH1/F9Nf5L5Ny4s2ZvcsbizTdVHmUmoFKAbUR/ynwKEbrKi1hR jq4QpWdBFNj5IqmvjEXLN6/85RWMX70aL5q+ol4kb1rmE8H9eEHFOAGvgMdO9XWXAG D3rSbVcVIxfQI4CrPfBoyisdSG1plOYdH1Zj8JQU= 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:57:39 +0100 Message-Id: <20210210095740.54881-2-alexander.lochmann@tu-dortmund.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210210095740.54881-1-alexander.lochmann@tu-dortmund.de> References: <20210210095740.54881-1-alexander.lochmann@tu-dortmund.de> 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