Re: [PATCH] block/file-posix: allow BLKZEROOUT with -t writeback

2025-04-21 Thread Eric Blake
On Thu, Apr 17, 2025 at 05:10:53PM -0400, Stefan Hajnoczi wrote: > The Linux BLKZEROOUT ioctl is only invoked when BDRV_O_NOCACHE is set > because old kernels did not invalidate the page cache. In that case > mixing BLKZEROOUT with buffered I/O could lead to corruption. > > However, Linux 4.9 comm

[PATCH] block/file-posix: allow BLKZEROOUT with -t writeback

2025-04-17 Thread Stefan Hajnoczi
The Linux BLKZEROOUT ioctl is only invoked when BDRV_O_NOCACHE is set because old kernels did not invalidate the page cache. In that case mixing BLKZEROOUT with buffered I/O could lead to corruption. However, Linux 4.9 commit 22dd6d356628 ("block: invalidate the page cache when issuing BLKZEROOUT"