linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "hch@infradead.org" <hch@infradead.org>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] btrfs: always fallback to buffered write if the inode requires checksum
Date: Fri, 7 Feb 2025 07:02:38 +1030	[thread overview]
Message-ID: <cb330b95-b995-429e-aa4c-9fbb75b6c16b@gmx.com> (raw)
In-Reply-To: <Z6TDpRo8ijZUt29d@infradead.org>



在 2025/2/7 00:43, hch@infradead.org 写道:
> On Tue, Feb 04, 2025 at 02:00:23PM +1030, Qu Wenruo wrote:
>> [BUG]
>> It is a long known bug that VM image on btrfs can lead to data csum
>> mismatch, if the qemu is using direct-io for the image (this is commonly
>> known as cache mode none).
>>
>> [CAUSE]
>> Inside the VM, if the fs is EXT4 or XFS, or even NTFS from Windows, the
>> fs is allowed to dirty/modify the folio even the folio is under
>> writeback (as long as the address space doesn't have AS_STABLE_WRITES
>> flag inherited from the block device).
>
> Btw, can you add an xfstests that reproduces this by modifying pages
> under direct I/O?  That would be really helpful to verify the code when
> we want to turn back on real direct I/O eventually when the VM is fixed
> to prevent the modifications.

Sure, although I'm afraid it will need to be a C program instead.

Thanks,
Qu


      reply	other threads:[~2025-02-06 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e9b8716e2d613cac27e59ceb141f973540f40eef.1738639778.git.wqu@suse.com>
2025-02-06 14:13 ` hch
2025-02-06 20:32   ` Qu Wenruo [this message]

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=cb330b95-b995-429e-aa4c-9fbb75b6c16b@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wqu@suse.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