Re: [PATCH] ovl: implement ->get_unmapped_area()
From: Miklos Szeredi
Date: Mon Aug 31 2026 - 04:36:46 EST
On Fri, 28 Aug 2026 at 14:41, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> No, not at all. All this patch needs to be is:
>
> +++ b/fs/overlayfs/file.c
> @@ -657,6 +657,7 @@ const struct file_operations ovl_file_operations = {
> .fallocate = ovl_fallocate,
> .fadvise = ovl_fadvise,
> .flush = ovl_flush,
> + .get_unmapped_area = thp_get_unmapped_area,
> .splice_read = ovl_splice_read,
> .splice_write = ovl_splice_write,
>
>
> All this "oh we have to call the underlying filesystem's
> get_unmapepd_area" betrays a lack of understanding of the problem.
>
> And Lorenzo suggested this in the linked thread:
>
> https://lore.kernel.org/linux-unionfs/69b72e3d-b101-4641-9ce5-51346c93a98d@lucifer.local/
There seems to be a logical fallacy in saying thp_get_unmapepd_area is
the most suitable value, yet not making it the default for all
filesystems.
Saying this without any understanding of the subtle difference between
setting .get_unmapepd_area to NULL and to thp_get_unmapepd_area. All
I can see that the difference is indeed subtle.
Can you please explain?
Thanks,
Miklos