All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Qu Wenruo <wqu@suse.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.6.y] btrfs: always fallback to buffered write if the inode requires checksum
Date: Thu,  8 May 2025 21:52:39 -0400	[thread overview]
Message-ID: <20250508142104-cd77d6c00d4c73c6@stable.kernel.org> (raw)
In-Reply-To: <54c7002136a047b7140c36478200a89e39d6bd04.1746666535.git.wqu@suse.com>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 968f19c5b1b7d5595423b0ac0020cc18dfed8cb5

Status in newer kernel trees:
6.14.y | Not found
6.12.y | Not found

Note: The patch differs from the upstream commit:
---
1:  968f19c5b1b7d ! 1:  cf0081b3a1276 btrfs: always fallback to buffered write if the inode requires checksum
    @@ Metadata
      ## Commit message ##
         btrfs: always fallback to buffered write if the inode requires checksum
     
    +    commit 968f19c5b1b7d5595423b0ac0020cc18dfed8cb5 upstream.
    +
         [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
    @@ Commit message
           to buffered IO.  At least by this, we avoid the more deadly false data
           checksum mismatch error.
     
    +    CC: stable@vger.kernel.org # 6.6
         Suggested-by: Christoph Hellwig <hch@infradead.org>
         Reviewed-by: Filipe Manana <fdmanana@suse.com>
         Signed-off-by: Qu Wenruo <wqu@suse.com>
         Reviewed-by: David Sterba <dsterba@suse.com>
         Signed-off-by: David Sterba <dsterba@suse.com>
    +    [ Fix a conflict due to the movement of the function. ]
     
    - ## fs/btrfs/direct-io.c ##
    -@@ fs/btrfs/direct-io.c: ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
    - 		btrfs_inode_unlock(BTRFS_I(inode), ilock_flags);
    + ## fs/btrfs/file.c ##
    +@@ fs/btrfs/file.c: static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
      		goto buffered;
      	}
    + 
     +	/*
     +	 * We can't control the folios being passed in, applications can write
     +	 * to them while a direct IO write is in progress.  This means the
    @@ fs/btrfs/direct-io.c: ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_
     +		btrfs_inode_unlock(BTRFS_I(inode), ilock_flags);
     +		goto buffered;
     +	}
    - 
    ++
      	/*
      	 * The iov_iter can be mapped to the same file range we are writing to.
    + 	 * If that's the case, then we will deadlock in the iomap code, because
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y        |  Success    |  Success   |

      parent reply	other threads:[~2025-05-09  1:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08  1:09 [PATCH 6.6.y] btrfs: always fallback to buffered write if the inode requires checksum Qu Wenruo
2025-05-08  1:09 ` [PATCH] " Qu Wenruo
2025-05-08  5:30   ` Greg KH
2025-05-08  7:05     ` Qu Wenruo
2025-05-09  1:52   ` Sasha Levin
2025-05-09  1:52 ` Sasha Levin [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=20250508142104-cd77d6c00d4c73c6@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=stable@vger.kernel.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 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.