Re: [PATCH v2] erofs: support SEEK_HOLE/SEEK_DATA in inode_share mode

From: Chao Yu

Date: Sun Aug 23 2026 - 20:44:14 EST


On 8/20/26 21:40, Jingbo Xu wrote:
When inode_share is enabled, erofs_ishare_fops.llseek falls back to
generic_file_llseek, which treats the whole file as data and always
returns i_size for SEEK_HOLE, hiding real holes in sparse files.

Switch it to erofs_file_llseek instead. For user files f_mapping->host
is always the real erofs inode, so SEEK_HOLE/SEEK_DATA resolve the
per-file on-disk layout via iomap_seek_hole()/iomap_seek_data().

Reviewed-by: Gao Xiang <xiang@xxxxxxxxxx>
Signed-off-by: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,