linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
To: Jan Kara <jack@suse.cz>
Cc: Horst Schirmeier <horst.schirmeier@tu-dortmund.de>,
	"Theodore Ts'o" <tytso@mit.edu>, Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Updated locking documentation for journal_t
Date: Wed, 17 Mar 2021 21:57:37 +0100	[thread overview]
Message-ID: <31c3e70b-c513-a9ac-8d94-211d80221942@tu-dortmund.de> (raw)
In-Reply-To: <ad82c7a9-a624-4ed5-5ada-a6410c44c0b3@tu-dortmund.de>

Does this patch look good to you?
Might it be ready to be merged?

- Alex

On 11.02.21 10:51, Alexander Lochmann wrote:
> 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 <alexander.lochmann@tu-dortmund.de>
> Signed-off-by: Horst Schirmeier <horst.schirmeier@tu-dortmund.de>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
>  include/linux/jbd2.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
> index 18f77d9b1745..4dca33a063dd 100644
> --- a/include/linux/jbd2.h
> +++ b/include/linux/jbd2.h
> @@ -768,7 +768,7 @@ enum passtype {PASS_SCAN, PASS_REVOKE, PASS_REPLAY};
>  struct journal_s
>  {
>      /**
> -     * @j_flags: General journaling state flags [j_state_lock]
> +     * @j_flags: General journaling state flags [j_state_lock, no lock
> for quick racy checks]
>       */
>      unsigned long        j_flags;
> 
> @@ -808,7 +808,7 @@ struct journal_s
>      /**
>       * @j_barrier_count:
>       *
> -     * Number of processes waiting to create a barrier lock [j_state_lock]
> +     * Number of processes waiting to create a barrier lock
> [j_state_lock, no lock for quick racy checks]
>       */
>      int            j_barrier_count;
> 
> @@ -821,7 +821,7 @@ struct journal_s
>       * @j_running_transaction:
>       *
>       * Transactions: The current running transaction...
> -     * [j_state_lock] [caller holding open handle]
> +     * [j_state_lock, no lock for quick racy checks] [caller holding
> open handle]
>       */
>      transaction_t        *j_running_transaction;
> 
> @@ -1033,7 +1033,7 @@ struct journal_s
>       * @j_commit_sequence:
>       *
>       * Sequence number of the most recently committed transaction
> -     * [j_state_lock].
> +     * [j_state_lock, no lock for quick racy checks].
>       */
>      tid_t            j_commit_sequence;
> 
> @@ -1041,7 +1041,7 @@ struct journal_s
>       * @j_commit_request:
>       *
>       * Sequence number of the most recent transaction wanting commit
> -     * [j_state_lock]
> +     * [j_state_lock, no lock for quick racy checks]
>       */
>      tid_t            j_commit_request;
> 

-- 
Technische Universität Dortmund
Alexander Lochmann                PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16                 phone:  +49.231.7556141
D-44227 Dortmund                  fax:    +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al

  reply	other threads:[~2021-03-17 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10  9:57 [PATCH 2/2] Updated locking documentation for journal_t Alexander Lochmann
2021-02-10  9:57 ` [PATCH 1/2] Updated locking documentation for transaction_t Alexander Lochmann
2021-02-11  9:30   ` Jan Kara
2021-02-11  9:53     ` Alexander Lochmann
2021-02-11 13:13       ` Jan Kara
2021-03-26  8:18     ` Alexander Lochmann
2021-03-29 10:14       ` Jan Kara
2021-02-11  9:37 ` [PATCH 2/2] Updated locking documentation for journal_t Jan Kara
2021-02-11  9:51   ` [PATCH v2] " Alexander Lochmann
2021-03-17 20:57     ` Alexander Lochmann [this message]
2021-04-02 15:40     ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31c3e70b-c513-a9ac-8d94-211d80221942@tu-dortmund.de \
    --to=alexander.lochmann@tu-dortmund.de \
    --cc=horst.schirmeier@tu-dortmund.de \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).