From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:34781 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758254AbcLTPU2 (ORCPT ); Tue, 20 Dec 2016 10:20:28 -0500 From: Amir Goldstein To: Jan Kara Cc: Al Viro , Eric Paris , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH 0/2] fsnotify: super block watch Date: Tue, 20 Dec 2016 17:20:05 +0200 Message-Id: <1482247207-4424-1-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jan, This 2 patch series is the 2nd part of fanotify super block watch work. The full work is available on my github: 1. fsnotify: misc cleanups - 4 patches posted on Dec 17 https://github.com/amir73il/linux/commits/fsnotify_dentry 2. fsnotify: super block watch - 2 patches in this posting https://github.com/amir73il/linux/commits/fsnotify_sb 3. fanotify: add support for more events - 6 patches posted on Oct 10 https://github.com/amir73il/linux/commits/fanotify_dentry 4. fanotify: add super block watch - 6 patches not posted yet https://github.com/amir73il/linux/commits/fanotify_sb On the Oct 10 posting you asked me about the use case and it was hard to explain the use case with only part of the work done. The issue, which this work sets to solve, is the poor scalability of recursive inotify watches. Other operating systems have a scalable way of watching changes on a large file system. Windows has USN Journal, macOS has FSEvents and BSD has kevents. The only way in Linux to monitor file system namei events (e.g. create/delete/move) is the recursive inotify watch way and this method scales very poorly for large enough directory trees. Beyond the exploding probability of a need for full scan, pinning all directory inodes wastes a lot of memory. The efforts to merge fanotify took several steps in the direction of solving the scalability issue, but they did not go all the way to provide the functionality required to replace inotify. Unfortunately, the fsnotify subsystem has been suffering from neglection for quite some time, so it hard for me to get proper feedback on this work. The fanotify super block watch feature is currently being tested by my employer and by other interested parties as well. I am planning to write some more testing tools and gather more benchmark results before posting the patches for the last part of this work (fanotify_sb). Any assistance you can provide with review and with helping to push this work forward would be very much appreciated. Thanks! Amir. Amir Goldstein (2): fsnotify: add event mask FS_EVENT_ON_SB fsnotify: implement event reporting to super block's root inode fs/notify/fsnotify.c | 60 ++++++++++++++++++++++++++++++++++++---- include/linux/fsnotify_backend.h | 29 +++++++++++++++++-- 2 files changed, 81 insertions(+), 8 deletions(-) -- 2.7.4