[PATCH v8 9/9] erofs: implement .fadvise for page cache share
Gao Xiang
hsiangkao at linux.alibaba.com
Mon Nov 17 14:48:50 AEDT 2025
On 2025/11/14 17:55, Hongbo Li wrote:
> From: Hongzhen Luo <hongzhen at linux.alibaba.com>
>
> This patch implements the .fadvise interface for page cache share.
> Similar to overlayfs, it drops those clean, unused pages through
> vfs_fadvise().
>
> Signed-off-by: Hongzhen Luo <hongzhen at linux.alibaba.com>
> Signed-off-by: Hongbo Li <lihongbo22 at huawei.com>
> ---
> fs/erofs/ishare.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/fs/erofs/ishare.c b/fs/erofs/ishare.c
> index 14b2690055c5..88c4af3f8993 100644
> --- a/fs/erofs/ishare.c
> +++ b/fs/erofs/ishare.c
> @@ -239,6 +239,16 @@ static int erofs_ishare_mmap(struct file *file, struct vm_area_struct *vma)
> return generic_file_readonly_mmap(file, vma);
> }
>
> +static int erofs_ishare_fadvice(struct file *file, loff_t offset,
> + loff_t len, int advice)
s/fadvice/fadvise/
Otherwise it looks good to me,
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list