All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
	linux-xfs@vger.kernel.org, Fedor Pchelkin <pchelkin@ispras.ru>,
	Chandan Babu R <chandanbabu@kernel.org>
Subject: Re: flakey assert failures in xfs/538 in for-next
Date: Wed, 16 Jul 2025 18:02:34 +0200	[thread overview]
Message-ID: <20250716160234.GA15830@lst.de> (raw)
In-Reply-To: <20250716153812.GG2672049@frogsfrogsfrogs>

On Wed, Jul 16, 2025 at 08:38:12AM -0700, Darrick J. Wong wrote:
> I've seen this happen maybe once or twice, I think the problem is that
> the symlink xfs_bmapi_write fails to allocate enough blocks to store the
> symlink target, doesn't notice, and then the actual target write runs
> out of blocks before it runs out of pathlen and kaboom.
> 
> Probably the right answer is to ENOSPC if we can't allocate blocks, but
> I guess we did reserve free space so perhaps we just keep bmapi'ing
> until we get all the space we need?
> 
> The weird part is that XFS_SYMLINK_MAPS should be large enough to fit
> all the target we need, so ... I don't know if bmapi_write is returning
> fewer than 3 nmaps because it hit ENOSPC or what?
> 
> (and because I can't reproduce it reliably, I have not investigated
> further :()

I guess the recent cleanups are not too blame then, or just slightly
changed the timing for me to have a streak to frequently hit it.

xfs/538 is the alloc minlen test that injects getting back the minlen
or failing allocations if minlen > 1.  I guess that interacts badly
somehow with the rather uncommon multi-map allocations.  The only
other one is xfs_da_grow_inode_int, and that only for directories
with a larger directory block size, and as a fallback when the contig
allocations fails.  It might be worth crafting a test doing a lot
of symlinking while doing that error injetion to trigger it more
reliably.

  reply	other threads:[~2025-07-16 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 12:13 flakey assert failures in xfs/538 in for-next Christoph Hellwig
2025-07-16 15:38 ` Darrick J. Wong
2025-07-16 16:02   ` Christoph Hellwig [this message]
2025-07-18 12:19     ` Chandan Babu R

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=20250716160234.GA15830@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=chandanbabu@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=pchelkin@ispras.ru \
    /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.