All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <dgc@kernel.org>
To: Chris Wedgwood <cw@f00f.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/9] libxlog: import the kernel's log recovery, log items and AIL
Date: Thu, 3 Sep 2026 09:48:39 +1000	[thread overview]
Message-ID: <api11z0M--RCj_p-@dread> (raw)
In-Reply-To: <49d9d6c177ed570d0ee5668df8a6d65ac3a27c6b.1788110147.git.cw@f00f.org>

On Wed, Aug 26, 2026 at 10:09:03PM -0700, Chris Wedgwood wrote:
> xfs_repair cannot replay a dirty log.  The code that can is in the
> kernel, and xfsprogs already carries kernel code rather than
> reimplementing it, so import it.
> 
> libxfs/ mirrors the kernel's fs/xfs/libxfs/ and these files are not from
> there; they are from the top level of fs/xfs.  They go in libxlog/,
> which is where this tree keeps log code, so that each directory has one
> kernel counterpart and tools/libxfs-diff can check both.
> 
> The files are copied from Linux v7.1 and are byte-identical to their
> kernel counterparts apart from their #include lists, which is the
> adaptation libxfs has always used.  v7.1 is the kernel this tree's
> libxfs/ is currently in sync with: comparing xfsprogs libxfs/ against
> v7.1 reports no difference in any of 102 files, while against v7.2 it
> reports 33.  Importing from a newer kernel than libxfs/ is synced to
> would mix two kernel versions in one tree.

This is not a direct code import - it mixed modification with code
copying.

Call it intuition, but the first thing I looked for was xlog_write()
- the function that writes new log records to disk. I immediately
notices that the kernel compat header neuters all the xlog_wait()
meaning iclogs do not work.  Hence I wondered how intent replay is
writing to the journal....

Yup, as I suspected,  the iclog code has been removed from the
journal IO path.  i.e. there's a heap of custom code buffer writing
code that is most definitely not the same as the kernel code. This
path is critical for correctness, and I have little confidence a
massive rewrite like this gets it right the first go.

Hence this whole patchset needs to seperate out the "lift to
userspace" file copies from the "modify for userspace" code changes
so that we can sanely review the actual code changes that matter.

This means -a lot more work for you-; these patches need to be
broken down into much smaller chunks that we can actually review;
a 14000 line patch that mixes kernel code with custom modifications
is not reviewable by anyone, not even a frontier LLM.

I'm not going to look at this in any more detail other than the
cursory scan I've already simply because it is impossible to find
all the changes that need careful review in this massive code
dump....

If the next posting of this series isn't at least 50+ patches, then
it probably still isn't fine grained enough to review
effectively....

Cheers,

Dave.
-- 
Dave Chinner
dgc@kernel.org

  parent reply	other threads:[~2026-09-02 23:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 17:15 [PATCH 0/9] xfsprogs: add xfs_repair -R --- log replay Chris Wedgwood
2026-08-21  0:22 ` [PATCH 1/9] libxfs: make XBF_DONE actually mark a buffer uptodate Chris Wedgwood
2026-08-31 13:37   ` Christoph Hellwig
2026-08-21  0:26 ` [PATCH 2/9] libxfs: don't corrupt a delwri list when a buffer is queued twice Chris Wedgwood
2026-08-31 13:38   ` Christoph Hellwig
2026-08-21  5:42 ` [PATCH 3/9] libxfs: record a failed buffer write when it fails Chris Wedgwood
2026-08-31 13:39   ` Christoph Hellwig
2026-08-27  5:08 ` [PATCH 6/9] libxfs-diff: also compare libxlog against the kernel Chris Wedgwood
2026-08-31 13:40   ` Christoph Hellwig
2026-08-31 17:37     ` Darrick J. Wong
2026-09-02 23:25       ` Dave Chinner
2026-08-27  5:08 ` [PATCH 4/9] libxlog: rename xfs_log_recover.c to logscan.c Chris Wedgwood
2026-08-31 13:42   ` Christoph Hellwig
2026-08-27  5:09 ` [PATCH 5/9] libxlog: import the kernel's log recovery, log items and AIL Chris Wedgwood
2026-08-31 13:45   ` Christoph Hellwig
2026-09-02 23:48   ` Dave Chinner [this message]
2026-08-27  5:24 ` [PATCH 7/9] libxlog: build the imported kernel code Chris Wedgwood
2026-08-31 13:46   ` Christoph Hellwig
2026-08-27  5:25 ` [PATCH 8/9] xfs_repair: add -R to replay a dirty log before repairing Chris Wedgwood
2026-08-31 13:48   ` Christoph Hellwig
2026-09-02 23:57   ` Dave Chinner
2026-08-27  5:48 ` [PATCH 9/9] xfs_repair: finish deletions the crash interrupted Chris Wedgwood
2026-08-31 13:50   ` Christoph Hellwig
2026-08-31 13:36 ` [PATCH 0/9] xfsprogs: add xfs_repair -R --- log replay Christoph Hellwig

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=api11z0M--RCj_p-@dread \
    --to=dgc@kernel.org \
    --cc=cw@f00f.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.