FANOTIFY API To Become More Useful With The Linux 5.1 Kernel

Written by Michael Larabel in Linux Kernel on 2 March 2019 at 03:05 AM EST. 13 Comments
The fanotify API that is used for monitoring/intercepting file-system events is set to tack on a few more features with the upcoming Linux 5.1 kernel cycle.

Fanotify allows monitoring objects on a file-system for accesses, opening, modifying, closing, reads, and opening while traditionally the inotify API has filled in the blanks for capabilities not offered by fanotify. With the upcoming Linux 5.1 kernel, there is fanotify support for directory events and other improvements to fill in some of those gaps for fanotify.

With the fanotify additions for Linux 5.1 there is finally support for create, move, and delete events as part of the new "directory events" addition along with events for the changing of attributes/metadata. The newly-added events indicate changes to meta-data, file moved from / move to, create sub-file, delete sub-file, delete self, and move self. There is also a change now to use interruptible waits when waiting on permission events so they can be properly stopped.

The fanotify changes for Linux 5.1 were already submitted as part of this pull request by SUSE's Jan Kara. For those wanting to dig more into the technical details of the changes can see this fsnotify branch while the Linux 5.1 merge window should be opening on Sunday night.

This API for monitoring of file-system events has been used for various storage management applications as well as virus /malware scanning, and other real-time file scanning applications.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week