Re: [PATCH] fs/ntfs3: remove ntfs_bio_pages and use page cache for compressed I/O
From: Matthew Wilcox
Date: Fri Oct 31 2025 - 10:07:30 EST
On Fri, Oct 31, 2025 at 08:15:16AM +0100, Konstantin Komarov wrote:
> Replace the use of ntfs_bio_pages with the disk page cache for reading and
> writing compressed files. This slightly improves performance when reading
> compressed data and simplifies the I/O logic.
Yes, this is a good improvement.
> + /* Read range [lbo, lbo+len). */
> + page = read_mapping_page(mapping, lbo >> PAGE_SHIFT, NULL);
I'm not keen on this though. read_mapping_page() is deprecated; please
use read_mapping_folio().
> + kaddr = kmap_local_page(page);
kmap_local_folio()
> + if (wr) {
> + memcpy(kaddr + off, buf, op);
> + set_page_dirty(page);
folio_mark_dirty()
> + } else {
> + memcpy(buf, kaddr + off, op);
> + flush_dcache_page(page);
flush_dcache_folio()
> + }
> + kunmap_local(kaddr);
> + put_page(page);
folio_put()