lkml.org 
[lkml]   [2020]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] ovl: provide real_file() and overlayfs get_unmapped_area()
On Wed, Jun 10, 2020 at 05:13:52PM -0700, Mike Kravetz wrote:

> To address this issue,
> - Add a new file operation f_real while will return the underlying file.
> Only overlayfs provides a function for this operation.
> - Add a new routine real_file() which can be used by core code get an
> underlying file.
> - Update is_file_hugepages to get the real file.

Egads... So to find out whether it's a hugetlb you would
* check if a method is NULL
* if not, call it
* ... and check if the method table of the result is hugetlbfs one?

Here's a radical suggestion: FMODE_HUGEPAGES. Just have it set by
->open() and let is_file_hugepages() check it. In ->f_mode. And
make the bloody hugetlbfs_file_operations static, while we are at it.

\
 
 \ /
  Last update: 2020-06-11 02:38    [W:0.086 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site