[ 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 |