Re: [PATCH 4/8] btrfs: Switch to iomap_dio_rw() for dio

Christoph Hellwig
2020-01-07T17:21:17Z

On Tue, Jan 07, 2020 at 05:59:09AM -0600, Goldwyn Rodrigues wrote:
> Testing revealed that removing check_direct_IO will not work. We try and
> reserve space as a whole for the entire direct write. These checks
> safeguard from requests unaligned to fs_info->sectorsize.

Ok. The fact that a wrong sector size falls back to buffered I/O
instead of failing the I/O is still bogus, though. Btrfs should align
with all other file systems there.

>
> I liked the patch to split and fold the direct_IO code. However to merge
> it into this will make it difficult to understand the changes since we
> are moving it to a different file rather than changing in-place. A
> separate patch would better serve as a cleanup.

Sure, this can be added on top.