linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Linus Torvalds <torvalds@linuxfoundation.org>,
	Heming Zhao <heming.zhao@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Dmitry Antipov <dmantipov@yandex.ru>,
	Mark Fasheh <mark@fasheh.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mm-commits@vger.kernel.org,
	Pasha Tatashin <pasha.tatashin@soleen.com>
Subject: Re: [GIT PULL] non-MM updates for 6.19-rc1
Date: Mon, 8 Dec 2025 12:01:09 +0800	[thread overview]
Message-ID: <f72b8316-ddae-466e-a72d-0df9960d6c82@linux.alibaba.com> (raw)
In-Reply-To: <CAHk-=wgvMBRrcR=DzsRKcLdZpmg-kJz49D1CzafjrWj+BzAGiQ@mail.gmail.com>



On 2025/12/8 10:21, Linus Torvalds wrote:
> On Mon, 8 Dec 2025 at 10:11, Joseph Qi <joseph.qi@linux.alibaba.com> wrote:
>>
>> On 2025/12/7 07:40, Linus Torvalds wrote:
>>>
>>> See commit c06c303832ec ("ocfs2: fix xattr array entry __counted_by
>>> error") which simply makes the 'last' pointer point to the actual last
>>> entry, rather than point to one _past_ the last entry.
>>
>> It looks fine to me.
>> Sorry for the noise and thank you for pointing out my mistake.
> 
> Note that if my fix is correct, the mistake is most certainly not
> yours and goes all the way back to 2009, and commit 0fe9b66c65f3
> ("ocfs2: Add preserve to reflink").
> 
> But I would really love to have somebody who knows that code go
> through it, and see if my fix actually is the right thing to do.
> 

Go through the code logic again, maybe I'm wrong before.

Take the following flow for example:

ocfs2_reflink_xattr_in_block
  ocfs2_create_empty_xattr_block
    ocfs2_create_xattr_block
      memset(xblk, 0, inode->i_sb->s_blocksize);
  ocfs2_reflink_xattr_block
    ocfs2_reflink_xattr_header

It seems now new_xh->xh_count is 0. That's means, it is trying to add a
new entry and here 'last' is pointing the next free entry.
If so, the original code seems right.

Heming, could you please verify this? I'm not familiar with this logic...

Thanks,
Joseph


  reply	other threads:[~2025-12-08  4:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-06 19:15 Andrew Morton
2025-12-06 23:33 ` pr-tracker-bot
2025-12-06 23:40 ` Linus Torvalds
2025-12-08  1:11   ` Joseph Qi
2025-12-08  2:21     ` Linus Torvalds
2025-12-08  4:01       ` Joseph Qi [this message]
2025-12-08  4:08         ` Linus Torvalds
2025-12-08  7:58         ` Heming Zhao
2025-12-08 19:07           ` Mark Fasheh

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=f72b8316-ddae-466e-a72d-0df9960d6c82@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmantipov@yandex.ru \
    --cc=heming.zhao@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark@fasheh.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=torvalds@linuxfoundation.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