Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp677766img; Mon, 18 Mar 2019 11:44:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW+whIwCUGpiEX0jRkIOq7NP4i4DhN2Lz0lz77UJch065tiPAqU7VYPcWxPgbIAvreInld X-Received: by 2002:a62:4299:: with SMTP id h25mr20367875pfd.165.1552934673259; Mon, 18 Mar 2019 11:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552934673; cv=none; d=google.com; s=arc-20160816; b=ZXDp/y89nlMOTfShuIv4I6mHURDT9/J4kiIi1SyMcr1Z+Qlmi59uauE5eKb28ue5Y3 MZhjq3R2SF71r7bKLdU0SC37qz0dmvudJ+tTfDlJ6ebVP+YGSasGuHgcXfB5Oxdmlaj4 rPHakIv4Z1EYr8zqthF62lcm5chQgx8Ag06vlOTxE5LXliUDx1x6I+mXG9YmP4IWyBXK hDHytS4xulBysKPZ0eMgKci5vbCAGwJdFCQ0U2o8Ia3K9JnAPUs0SPDf9G/Ov6PMAgHu rUhF6VHm9EsUYEpoLWPn4tSymAXgbP3XOQTbq9srDMSV+gwOVMyUfUE6OUTuX144f8Cs XG5w== 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=2HANflyPDg5JwtSjYF7aNNew030A2Pf8s8Z2vF35KmU=; b=OvTES73A7TK4paNWwSo0Ya52/5L4DaOTCMfdxTxn+kpbxSrKoqc1f1CQMH1GcN8PzA S6a3rRE2s8uA3mQaiHyjzylYrsOQNFPI/iFIKshgC0vnk7crzdAhAjVIPU7kLkoQ1TIJ jmz/QQQpojTS0yM7kxMQvnwcMxx+X8Jqhu63anJjCmEDfYIZ1RR0b72B+g1pv8NX1v6E 9QRLtHTGpSrwklmYoJcbKtTmkBOg4p5JPoKl4WSQK/Aw8lOv5Z1QzpqOpODSJvhxAfKW z2TxHVyV753cbAi8QgzqXOpaJuPWIMXJSLewtiLLv4oqLBMOtMOfLgjmBcYtcNRzWoYP UpFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=m4PycWOT; 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 w5si9069168pgs.268.2019.03.18.11.44.17; Mon, 18 Mar 2019 11:44:33 -0700 (PDT) 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=m4PycWOT; 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 S1727381AbfCRSnR (ORCPT + 99 others); Mon, 18 Mar 2019 14:43:17 -0400 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:59758 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfCRSnR (ORCPT ); Mon, 18 Mar 2019 14:43:17 -0400 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 x2IIgbsb013809 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 18 Mar 2019 19:42:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1552934561; bh=dS+Iu0nU7v8R5JF6Pu8kqpuUTNJYAEvRwGOMhzRBqPQ=; h=From:To:Cc:Subject:Date; b=m4PycWOTX+zaMfX/QktT5IPL7j5snUs2DFAbkWAGFpl6sHLH3RTrUoGqxSMedOCxg dmisCnSHmz6HCs1moLBT+cHp9pQL5NWBa0jadUIwysSWtSlugndCYrhH6jEVkB2ZK/ mdcgIAeC5KofZkai1LWjaBg9Zp+t2UYFf46PaKxE= 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 v2] Updated locking documentation for transaction_t Date: Mon, 18 Mar 2019 19:42:37 +0100 Message-Id: <20190318184237.20677-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 transaction_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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 0f919d5fe84f..72f689746340 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -534,6 +534,7 @@ struct transaction_chp_stats_s { * The transaction keeps track of all of the buffers modified by a * running transaction, and all of the buffers committed but not yet * flushed to home for finished transactions. + * (Locking Documentation improved by LockDoc) */ /* @@ -585,7 +586,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 +649,17 @@ struct transaction_s unsigned long t_max_wait; /* - * When transaction started + * When transaction started [journal_t.j_state_lock] */ unsigned long t_start; /* - * When commit was requested + * When commit was requested [journal_t.j_state_lock] */ unsigned long t_requested; /* - * Checkpointing stats [j_checkpoint_sem] + * Checkpointing stats [journal_t.j_list_lock] */ struct transaction_chp_stats_s t_chp_stats; -- 2.20.1