From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasily Novikov Subject: Re: A few concerns about fanotify implementation. Date: Mon, 6 Jun 2011 13:42:11 +0400 Message-ID: <4DECA0F3.60302@kaspersky.com> References: <1288095195.29745.4010.camel@novikov-v> <201010261358.46974.tvrtko.ursulin@sophos.com> <1288169699.7715.103.camel@novikov-v> <1288195134.2655.202.camel@localhost.localdomain> <4DE8ACAD.2080003@kaspersky.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: "linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "malware-list-h+Im9A44IAFcMpApZELgcQ@public.gmane.org" , Eric Paris To: Douglas Leeder Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: malware-list-bounces-h+Im9A44IAFcMpApZELgcQ@public.gmane.org Errors-To: malware-list-bounces-h+Im9A44IAFcMpApZELgcQ@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org Douglas, >> 1. The file is thrown out of the cache only when it is modified. But in >> case there are different scan options for different dirs that's not >> enough. So we also need it to be evicted from cache on rename or number >> of hard links change. > > This is interesting, as it makes the cache less efficient for those > users who don't have different scanning within a filesystem. If you consider overhead is a problem here it could be solved by adding some flag to a fsnotify group that would be responsible for whether file would be evicted from cache on modify only or on renaming or changing attributes as well for each group. Another thought about this issue: it solves the problem only if a file is moved/renamed but not a directory. I just don't know how to resolve it without adding too much overhead. Forgot to write that it would also be nice to have a possibility to set cache size (i.e. group->fanotify_data.max_marks). -- Best regards, Vasily Novikov | Software developer | Kaspersky Lab Direct: +7 495 123 45 67 x2344 | Mobile: +7 964 786 44 82 | vasily.novikov-BkmlMuIjteXqlBn2x/YWAg@public.gmane.org 10/1, 1st Volokolamsky Proezd, Moscow, 123060, Russia | www.kaspersky.com, www.securelist.com