linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Viacheslav Dubeyko <slava@dubeyko.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"frank.li@vivo.com" <frank.li@vivo.com>
Cc: "Slava.Dubeyko@ibm.com" <Slava.Dubeyko@ibm.com>
Subject: Re: [PATCH] hfs: fix not erasing deleted b-tree node issue
Date: Tue, 29 Apr 2025 08:28:01 +0200	[thread overview]
Message-ID: <abd793e61cd23e1954d2c46554127dafbd80c61c.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <78d3899f-5e07-4a76-8135-81cfea3b0086@wdc.com>

Hi Johannes,

On Tue, 2025-04-29 at 06:05 +0000, Johannes Thumshirn wrote:
> On 29.04.25 03:16, Viacheslav Dubeyko wrote:
> > Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
> > ---
> >   fs/hfs/bnode.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
> > index cb823a8a6ba9..c5eae7c418a1 100644
> > --- a/fs/hfs/bnode.c
> > +++ b/fs/hfs/bnode.c
> > @@ -219,6 +219,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
> >   		tree->root = 0;
> >   		tree->depth = 0;
> >   	}
> > +
> > +	hfs_bnode_clear(node, 0, tree->node_size);
> >   	set_bit(HFS_BNODE_DELETED, &node->flags);
> >   }
> >   
> 
> I've just checked HFS+ code and hfs_bnode_unlink() in fs/hfsplus/bnode.c 
> is a copy of the fs/hfs/bnode.c one (maybe most of the file is so 
> there's room for unification?). So I think the fix is needed there as well.

Good catch. I assume we should be able to reproduce the above error with xfstests
with HFS+ as well and the same fix should address the bug accordingly.

I haven't created my xfstests setup yet, so hopefully someone will beat me to this.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

  reply	other threads:[~2025-04-29  6:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  1:15 [PATCH] hfs: fix not erasing deleted b-tree node issue Viacheslav Dubeyko
2025-04-29  6:05 ` Johannes Thumshirn
2025-04-29  6:28   ` John Paul Adrian Glaubitz [this message]
2025-04-29 17:19   ` Viacheslav Dubeyko
2025-04-29 22:28     ` Viacheslav Dubeyko

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=abd793e61cd23e1954d2c46554127dafbd80c61c.camel@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=frank.li@vivo.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=slava@dubeyko.com \
    /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).