From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/8] xfs: ensure log tail is always up to date
Date: Tue, 12 Jul 2022 09:42:05 +1000 [thread overview]
Message-ID: <20220711234205.GE3861211@dread.disaster.area> (raw)
In-Reply-To: <Ysu+PPbq41DKByAw@infradead.org>
On Sun, Jul 10, 2022 at 11:07:56PM -0700, Christoph Hellwig wrote:
> On Fri, Jul 08, 2022 at 11:55:53AM +1000, Dave Chinner wrote:
> > lockdep_assert_held(&log->l_icloglock);
> > @@ -544,7 +543,7 @@ xlog_state_release_iclog(
> > if ((iclog->ic_state == XLOG_STATE_WANT_SYNC ||
> > (iclog->ic_flags & XLOG_ICL_NEED_FUA)) &&
> > !iclog->ic_header.h_tail_lsn) {
> > - tail_lsn = xlog_assign_tail_lsn(log->l_mp);
> > + xfs_lsn_t tail_lsn = atomic64_read(&log->l_tail_lsn);
> > iclog->ic_header.h_tail_lsn = cpu_to_be64(tail_lsn);
>
> Nit: I'd just do this as:
>
> iclog->ic_header.h_tail_lsn =
> cpu_to_be64(atomic64_read(&log->l_tail_lsn));
>
> > +/*
> > + * Callers should pass the the original tail lsn so that we can detect if the
> > + * tail has moved as a result of the operation that was performed. If the caller
> > + * needs to force a tail LSN update, it should pass NULLCOMMITLSN to bypass the
> > + * "did the tail LSN change?" checks.
> > + */
>
> Should we also document the old_lsn == 0 case here?
I can, it's just the "tail did not change" value....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-07-11 23:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 1:55 [RFC] [PATCH 0/8] xfs: byte-base grant head reservation tracking Dave Chinner
2022-07-08 1:55 ` [PATCH 1/8] xfs: AIL doesn't need manual pushing Dave Chinner
2022-07-08 7:23 ` kernel test robot
2022-07-11 6:02 ` Christoph Hellwig
2022-07-11 23:40 ` Dave Chinner
2022-07-08 1:55 ` [PATCH 2/8] xfs: AIL targets log space, not grant space Dave Chinner
2022-07-11 6:04 ` Christoph Hellwig
2022-07-08 1:55 ` [PATCH 3/8] xfs: ensure log tail is always up to date Dave Chinner
2022-07-11 6:07 ` Christoph Hellwig
2022-07-11 23:42 ` Dave Chinner [this message]
2022-07-08 1:55 ` [PATCH 4/8] xfs: l_last_sync_lsn is really tracking AIL state Dave Chinner
2022-07-11 6:42 ` Christoph Hellwig
2022-07-11 23:47 ` Dave Chinner
2022-07-20 1:18 ` Dave Chinner
2022-07-08 1:55 ` [PATCH 5/8] xfs: track log space pinned by the AIL Dave Chinner
2022-07-11 6:54 ` Christoph Hellwig
2022-07-11 23:53 ` Dave Chinner
2022-07-08 1:55 ` [PATCH 6/8] xfs: pass the full grant head to accounting functions Dave Chinner
2022-07-08 1:55 ` [PATCH 7/8] xfs: move and xfs_trans_committed_bulk Dave Chinner
2022-07-08 7:54 ` kernel test robot
2022-07-08 9:15 ` kernel test robot
2022-07-11 6:12 ` Christoph Hellwig
2022-07-11 23:54 ` Dave Chinner
2022-07-08 1:55 ` [PATCH 8/8] xfs: grant heads track byte counts, not LSNs Dave Chinner
2022-07-11 6:59 ` Christoph Hellwig
2022-07-11 23:59 ` Dave Chinner
2022-07-12 8:28 ` [xfs] 65cf4eb83e: xfstests.xfs.011.fail kernel test robot
2022-07-12 22:24 ` Dave Chinner
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=20220711234205.GE3861211@dread.disaster.area \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/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