linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Direct IO reads being split unexpected at page boundary, but in the middle of a fs block (bs > ps cases)
@ 2025-10-01  1:29 Qu Wenruo
  2025-10-06 15:07 ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Qu Wenruo @ 2025-10-01  1:29 UTC (permalink / raw)
  To: linux-fsdevel@vger.kernel.org, linux-btrfs

Hi,

Recently during the btrfs bs > ps direct IO enablement, I'm hitting a 
case where:

- The direct IO iov is properly aligned to fs block size (8K, 2 pages)
   They do not need to be large folio backed, regular incontiguous pages
   are supported.

- The btrfs now can handle sub-block pages
   But still require the bi_size and (bi_sector << 9) to be block size
   aligned.

- The bio passed into iomap_dio_ops::submit_io is not block size
   aligned
   The bio only contains one page, not 2.

   This makes things like checksum verification impossible.


This can be worked around by falling direct IO read on inodes with 
checksum to buffered IO.

However the fallback itself is very slow (around 1/5 of the storage 
speed, something we will need to address in the future), I'm still 
trying to implement the true zero-copy direct read support when possible.


Any way to force the minimal amount of pages for iomap_dio_bio_iter()?

Thanks,
Qu

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-07 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01  1:29 Direct IO reads being split unexpected at page boundary, but in the middle of a fs block (bs > ps cases) Qu Wenruo
2025-10-06 15:07 ` Matthew Wilcox
2025-10-07  2:30   ` Qu Wenruo
2025-10-07 14:58     ` Darrick J. Wong
2025-10-07 21:28       ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).