linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: yangerkun <yangerkun@huawei.com>
Cc: Filipe Manana <fdmanana@kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	chuck.lever@oracle.com, zlang@kernel.org,
	fstests@vger.kernel.org, linux-mm@kvack.org, hughd@google.com,
	akpm@linux-foundation.org,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] generic/736: don't run it on tmpfs
Date: Mon, 29 Jul 2024 07:21:37 -0700	[thread overview]
Message-ID: <ZqelcfdBQzc93w80@infradead.org> (raw)
In-Reply-To: <9514fd55-4f83-8e43-bdf7-925396ab5e48@huawei.com>

On Mon, Jul 29, 2024 at 09:53:52PM +0800, yangerkun wrote:
> But after commit a2e459555c5f("shmem: stable directory offsets"),
> simple_offset_rename will just add the new dentry to the maple tree of
> &SHMEM_I(inode)->dir_offsets->mt with the key always inc by 1(since
> simple_offset_add we will find free entry start with octx->newx_offset, so
> the entry freed in simple_offset_remove won't be found). And the same case
> upper will be break since we loop too many times(we can fall into infinite
> readdir without this break).
> 
> I prefer this is really a bug, and for the way to fix it, I think we can
> just use the same logic what 9b378f6ad48cf("btrfs: fix infinite directory
> reads") has did, introduce a last_index when we open the dir, and then
> readdir will not return the entry which index greater than the last index.
> 
> Looking forward to your comments!

I agree to all of the above.



  reply	other threads:[~2024-07-29 14:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-20  8:35 Yang Erkun
2024-07-20 17:26 ` Filipe Manana
2024-07-24 13:30   ` yangerkun
2024-07-29 13:53     ` yangerkun
2024-07-29 14:21       ` Christoph Hellwig [this message]
2024-07-29 14:26         ` yangerkun
2024-07-29 14:29       ` Chuck Lever III
2024-07-29 17:35         ` Filipe Manana
2024-07-30  1:02         ` yangerkun
2024-07-29 14:32       ` Filipe Manana
2024-07-30  1:05         ` yangerkun
2024-07-22 14:21 ` Christoph Hellwig
2024-07-22 14:25   ` Chuck Lever III

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=ZqelcfdBQzc93w80@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=chuck.lever@oracle.com \
    --cc=fdmanana@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hughd@google.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yangerkun@huawei.com \
    --cc=zlang@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