[PATCH v2 0/3] erofs: bound file-backed mount nesting and use a bio_set for requests
From: Daejun Park via B4 Relay
Date: Tue Nov 03 2026 - 01:32:06 EST
File-backed EROFS mounts cap each request at 16 bvecs. A larger
readahead window then takes several backing reads. This series
allocates file-backed requests from a bio_set to hold up to
BIO_MAX_VECS bvecs per request.
All file-backed mounts share that bio_set mempool. Patches 1 and 2
first close two ways for file-backed mounts to nest past the stacked
fs check: extra devices, and files shared by inode_share. Patch 3 then
switches request allocation to the bio_set. Without the mm readahead
alignment patch, larger backing reads slow some buffered reads.
Tested in a QEMU guest with KASAN:
- Images and device= blobs shared by inode_share are rejected. So is
an image after a remount clears inode_share.
- Unshared files still mount.
---
Changes in v2:
- New patch 2 for inode_share, reported by Sashiko. It checks the
file, not the option, which a remount can clear.
- Patch 3 no longer says "does not fail", nor that a backing read
cannot reach the pool again in the same task.
---
Daejun Park (3):
erofs: apply the stacked fs check to extra file-backed devices
erofs: treat files shared by inode_share as stacked
erofs: allocate file-backed mount requests from a bio_set
fs/erofs/fileio.c | 47 +++++++++++++++++++++++++++++++++++------------
fs/erofs/internal.h | 4 ++++
fs/erofs/super.c | 30 +++++++++++++++++++++++++++---
3 files changed, 66 insertions(+), 15 deletions(-)
---
base-commit: 209108a5456171ab430e25b54b2dfe083455bfb6
change-id: 20261029-erofs-fileio-bioset-713570b89d89
Best regards,
--
Daejun Park <daejun7.park@xxxxxxxxxxx>