From: Viacheslav Dubeyko <slava@dubeyko.com>
To: Hengyu Liang <hengyul@cs.unc.edu>
Cc: glaubitz@physik.fu-berlin.de, frank.li@vivo.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] hfs: avoid reusing occupied CNIDs after deletion
Date: Sat, 17 Oct 2026 15:35:01 -0700 [thread overview]
Message-ID: <9b478e124201b9e3fb3292f900f2ff287b31ad40.camel@dubeyko.com> (raw)
In-Reply-To: <20261016023125.2271361-1-hengyul@cs.unc.edu>
Hi Hengyu,
On Thu, 2026-10-15 at 22:31 -0400, Hengyu Liang wrote:
> Hi Slava,
>
> On Thu, Oct 15, 2026 at 12:58:14PM -0700, Viacheslav Dubeyko wrote:
> > (1) The goal of hfs_correct_next_unused_CNID() was to fix the
> > volume
> > corruption issue. Have you run hfs.fsck tool to check that volume
> > is
> > valid (not corrupted) after your fix?
>
> Thanks for pointing this out. I have now run the additional checks on
> v7.3-rc6 with this patch, using fsck.hfs 540.1-Linux:
>
> - All 14 normal-volume images from the original tests passed
> fsck.hfs -fn after unmount. This includes the reproducer, CNID
> holes,
> missing optional file threads, concurrent operations, and reordered
> leaf node numbers. The checker did not modify the images.
>
> > (2) Have you run xfstests (especially, generic/736) with your fix?
> > Because, the patch had goal to fix the generic/736 failure:
>
> - On a freshly formatted 64 MiB HFS volume, I ran:
>
> ./check -i 10 generic/736
>
> All 10 iterations passed, including the filesystem checks after
> each
> iteration, with FSCK_OPTIONS="-fn". A separate fsck.hfs -fn after
> the run also passed. There was no "invalid MDB drNxtCNID" error.
> The unpatched v7.3-rc6 kernel also passed these 10 iterations.
>
> - I repeated the minimal reproducer on a separate fresh volume. The
> first creation of c failed with EEXIST without the patch and
> succeeded
> with it. The surviving file's CNID and contents were unchanged, and
> the patched volume passed fsck.hfs -fn after unmount.
Sounds great! Let me take a look into the code.
>
> For completeness, I initially ran generic/736 on a 256 MiB HFS
> volume.
> The test body completed, but the final fsck reported:
>
> Invalid map node linkage
> (4, 2048)
>
> I reproduced the same failure on unpatched v7.3-rc6 with the same
> volume
> size and tools. The catalog had 6129 nodes, while its header map and
> single map node covered only 5984 nodes. I then used fresh 64 MiB
> volumes
> for the runs above; their filesystem checks passed without repair.
It looks that we have enough issues yet for the fix.
Thanks,
Slava.
>
> No KASAN report or kernel BUG/WARNING was observed during these runs.
>
> Thanks,
> Hengyu
next prev parent reply other threads:[~2026-10-17 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 11:01 Hengyu Liang
2026-10-15 19:58 ` Viacheslav Dubeyko
2026-10-16 2:31 ` Hengyu Liang
2026-10-17 22:35 ` Viacheslav Dubeyko [this message]
2026-10-19 23:29 ` Viacheslav Dubeyko
2026-10-21 15:31 ` Hengyu Liang
2026-10-21 22:26 ` Viacheslav Dubeyko
2026-10-22 12:06 ` Hengyu Liang
2026-10-22 22:40 ` Viacheslav Dubeyko
2026-10-23 17:32 ` Hengyu Liang
2026-10-26 17:20 ` Viacheslav Dubeyko
2026-10-28 3:59 ` Hengyu Liang
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=9b478e124201b9e3fb3292f900f2ff287b31ad40.camel@dubeyko.com \
--to=slava@dubeyko.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=hengyul@cs.unc.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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
all inboxes | Powered by JetHome®