Re: [PATCH v2 11/16] fanotify: disable readahead if we have pre-content watches

Christian Brauner
2024-08-09T12:12:59Z

On Thu, Aug 08, 2024 at 03:27:13PM GMT, Josef Bacik wrote:
> With page faults we can trigger readahead on the file, and then
> subsequent faults can find these pages and insert them into the file
> without emitting an fanotify event. To avoid this case, disable
> readahead if we have pre-content watches on the file. This way we are
> guaranteed to get an event for every range we attempt to access on a
> pre-content watched file.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---

Looks sensible,
Reviewed-by: Christian Brauner <brauner@kernel.org>