Re: [PATCH v5 09/14] ntfs: update runlist handling and cluster allocator
From: Christoph Hellwig
Date: Fri Jan 16 2026 - 04:21:44 EST
> + for (index = start_index; index < end_index; index++) {
> + folio = filemap_lock_folio(vol->lcnbmp_ino->i_mapping, index);
> + if (IS_ERR(folio)) {
> + page_cache_sync_readahead(vol->lcnbmp_ino->i_mapping, ra, NULL,
You probably only want to kick off a read for -ENOENT here, and not
any error?
> + index, end_index - index);
> + folio = read_mapping_folio(vol->lcnbmp_ino->i_mapping, index, NULL);
> + if (!IS_ERR(folio))
> + folio_lock(folio);
> + }
either way, this seems like a nice primitive for doing reasonably
efficient reads from the page cache, and I could think of a few
other places to it. Maybe factor it into helper, even if you keep
it in the ntfs code for now?