public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	axboe@kernel.dk, dlemoal@kernel.org, linux-block@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Weird loop device behavior in 6.15-rc1?
Date: Mon, 7 Apr 2025 23:44:34 -0700	[thread overview]
Message-ID: <Z_TF0vYWljwlWxoY@infradead.org> (raw)
In-Reply-To: <20250407233007.GG6266@frogsfrogsfrogs>

On Mon, Apr 07, 2025 at 04:30:07PM -0700, Darrick J. Wong wrote:
> Hey Christoph,
> 
> I have a ... weird test setup where loop devices have directio enabled
> unconditionally on a system with 4k-lba disks, and now that I pulled
> down 6.15-rc1, I see failures in xfs/259:

Hmm, this works just fine for with a 4k LBA size NVMe setup on -rc1
with latest xfsprogs and xfstests for-next.

> Then trying to format an XFS filesystem fails:

That on the other hand I can reproduce locally.

> I think there's a bug in the loop driver where changing
> LO_FLAGS_DIRECT_IO doesn't actually try to change the O_DIRECT state of
> the underlying lo->lo_backing_file->f_flags.  So I can try to set a 2k
> block size on the loop dev, which turns off LO_FLAGS_DIRECT_IO but the
> fd is still open O_DIRECT so the writes fail.  But this isn't a
> regression in -rc1, so maybe this is the expected behavior?

This does look old, but also I would not call it expected.

> On 6.15-rc1, you actually /can/ change the sector size:

> But the backing file still has O_DIRECT on, so formatting fails:

Looks like the fact that fixing the silent failure to change the sector
size exposed the not clear O_DIRECT bug..

I'll cook up a patch to clear O_DIRECT.

> Thoughts?
> 
> --D
> 
> (/me notes that xfs/801 is failing across the board, and I don't know
> what changed about THPs in tmpfs but clearly something's corrupting
> memory.)

That one always failed for me because it uses a sysfs-dump tool that
simply doesn't seem to exist.


  reply	other threads:[~2025-04-08  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 23:30 Weird loop device behavior in 6.15-rc1? Darrick J. Wong
2025-04-08  6:44 ` Christoph Hellwig [this message]
2025-04-08 14:27   ` Darrick J. Wong

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=Z_TF0vYWljwlWxoY@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=djwong@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@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