From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <david@fromorbit.com>
Cc: cem@kernel.org, linux-xfs@vger.kernel.org, hch@lst.de, djwong@kernel.org
Subject: Re: [PATCH 1/2] xfs: replace iclogs circular list with a list_head
Date: Tue, 24 Jun 2025 15:57:40 +0200 [thread overview]
Message-ID: <20250624135740.GA24420@lst.de> (raw)
In-Reply-To: <aFoKgNq6IuPJAJAv@dread.disaster.area>
On Tue, Jun 24, 2025 at 12:16:32PM +1000, Dave Chinner wrote:
> Hence I think that the ring should remain immutable and the
> log->l_iclog pointer retained to index the first object in the ring.
> This means we don't need a list head in the struct xlog for the
> iclog ring, we can have the ring simply contain just the iclogs as
> they currently do.
Alternatively do away with the list entirely and replace it with
an array of pointers, i.e.
struct xlog {
...
struct xlog_in_core *l_iclog;
struct xlog_in_core *l_iclogs[XLOG_MAX_ICLOGS];
};
static inline struct xlog_in_core *
xlog_next_iclog(
struct xlog_in_core *iclog)
{
if (iclog == iclog->ic_log->l_iclogs[log->l_iclog_bufs - 1])
return iclog->ic_log->l_iclogs[0];
return iclog + 1;
}
and the typical loop become something like:
struct xlog_in_core *iclog = log->l_iclog;
do {
...
} while ((iclog = xlog_next_iclog(iclog)) != log->l_iclog);
next prev parent reply other threads:[~2025-06-24 13:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 7:07 [PATCH 0/2] xfs: iclog small cleanup cem
2025-06-20 7:07 ` [PATCH 1/2] xfs: replace iclogs circular list with a list_head cem
2025-06-24 2:16 ` Dave Chinner
2025-06-24 4:43 ` Carlos Maiolino
2025-06-24 13:57 ` Christoph Hellwig [this message]
2025-06-24 18:17 ` Carlos Maiolino
2025-06-25 6:21 ` Christoph Hellwig
2025-06-25 8:20 ` Carlos Maiolino
2025-06-25 11:22 ` Christoph Hellwig
2025-06-20 7:08 ` [PATCH 2/2] xfs: kill xlog_in_core_2_t typedef cem
2025-06-24 13:59 ` Christoph Hellwig
2025-06-25 8:21 ` Carlos Maiolino
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=20250624135740.GA24420@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.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;
as well as URLs for NNTP newsgroup(s).