Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6020541imb; Fri, 8 Mar 2019 07:36:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxp4QlwLZhukjtnReSVs/aKVPK6SO/tQQLL4/nB6rN46PrlcMkVnyHJBI2jVd/WKjqGvLrC X-Received: by 2002:a17:902:a414:: with SMTP id p20mr18959512plq.289.1552059384485; Fri, 08 Mar 2019 07:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552059384; cv=none; d=google.com; s=arc-20160816; b=i8r2LsRHPyOSDHKAlkBfhPWsc3cdjNpmnkLbJ/GvMBRpbfpwHD/2/Hc00+EwtKvmuR YVS6fW/xOtaAip34+Q5a1P9JdFQc28zZuSJOkePbkTuEo9IG61K+0+M43NddfgKOeULn AAn+79S/wPJg/81bUIZo2WilwQm6sCLxuJRiVhhOu/vaWbtgQxvat6rOEkagNTFuKUFN 2o1kftYIXEHX531zPAKrNB99jwhKgngKtLBtm351IMYamCyJZbCWZVxzqYtkmllV4XMd wvKcjaEAPxL2ar2S8JENBIuaT+KRnqXYjNNON1VcZyHKO/2rbRfJakQQB01ZrPcozcWB ZUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=pFZtZ8vZReIXjv9UmNF+sDDPv/RuJhdBqkOk5sntulI=; b=0Z1zCIcP/kBSUnEpXpNv5bspKIYPXJlaiQyeI8CavMQZSWdr2l3X6zYya1HnD1ZZAI qzE7YHfE7pskWZ3cXBXFfSvJob74DzbG+gtfco0zTShHzds2FrH4l53qqwo4cKMYHaxK 6mjMrb6UjZNNzLUIeLU8/mcQzmZJ/ZT8IVuBha+7WXOz6ghCAIN7oJY5NXyATHw0eKom fO3Aps5pmTcYUZQBUHoW43TtfdLRe7TzOsZvRu4d7GiDga3lAOoCGgX8+d1Obk8vuX8A 5ps72vAGVhdn6yrHScE+yrKZazNF7PDi+6c8gEmmLsjMGXG8eWPC9Tje+OvppgyHw+hP D6tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=N1quzFS1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si6729648pgn.536.2019.03.08.07.36.09; Fri, 08 Mar 2019 07:36:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=N1quzFS1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbfCHPfM (ORCPT + 99 others); Fri, 8 Mar 2019 10:35:12 -0500 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:49908 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbfCHPfK (ORCPT ); Fri, 8 Mar 2019 10:35:10 -0500 X-Greylist: delayed 1704 seconds by postgrey-1.27 at vger.kernel.org; Fri, 08 Mar 2019 10:35:09 EST 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.0.29/8.16.0.41) with ESMTPSA id x28F653Q023425 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Mar 2019 16:06:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1552057573; bh=PWNiNjlc9N/RtIFVtL/iGsr1nM93mWZMXl8l7RoKb68=; h=From:To:Cc:Subject:Date; b=N1quzFS1wZrASeq3RfeaTp4E4bTMoc63P944IsyNjnq1IQT8MmwCNluDym4Z7pOVv j+/S69NST0ts9+KbA++Xr03Jc5FClTMpQ5984SRTlYFk6kkXljIcTatK01rTbSrVnA LwYqe/1ZKbq0g1RKW4oLKqG0vlGA7J5OBRDLk2y0= From: Alexander Lochmann Cc: tytso@mit.edu, jack@suse.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Lochmann , Horst Schirmeier Subject: [PATCH 1/1] Updated locking documentation for struct journal_t Date: Fri, 8 Mar 2019 16:06:05 +0100 Message-Id: <20190308150605.98405-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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We used LockDoc to derive locking rules for each member of struct journal_t. Based on those results, we extended the existing documentation by more members of struct inode, and updated the existing documentation. Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier --- include/linux/jbd2.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 0f919d5fe84f..c1ba44ca515a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -585,7 +585,8 @@ struct transaction_s } t_state; /* - * Where in the log does this transaction's commit start? [no locking] + * Where in the log does this transaction's commit start? + * [journal_t->j_state_lock] */ unsigned long t_log_start; @@ -647,17 +648,17 @@ struct transaction_s unsigned long t_max_wait; /* - * When transaction started + * When transaction started [j_state_lock] */ unsigned long t_start; /* - * When commit was requested + * When commit was requested [j_state_lock] */ unsigned long t_requested; /* - * Checkpointing stats [j_checkpoint_sem] + * Checkpointing stats [j_list_lock] */ struct transaction_chp_stats_s t_chp_stats; @@ -744,6 +745,7 @@ jbd2_time_diff(unsigned long start, unsigned long end) /** * struct journal_s - The journal_s type is the concrete type associated with * journal_t. + * (Locking Documentation improved by LockDoc) */ struct journal_s { @@ -762,6 +764,7 @@ struct journal_s /** * @j_sb_buffer: The first part of the superblock buffer. + * [j_checkpoint_mutex] */ struct buffer_head *j_sb_buffer; @@ -1015,6 +1018,7 @@ struct journal_s * @j_commit_interval: * * What is the maximum transaction lifetime before we begin a commit? + * [super_block->s_umount] */ unsigned long j_commit_interval; @@ -1032,7 +1036,7 @@ struct journal_s * @j_revoke: * * The revoke table - maintains the list of revoked blocks in the - * current transaction. + * current transaction. [j_state_lock] */ struct jbd2_revoke_table_s *j_revoke; -- 2.20.1