From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Subject: Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events Date: Fri, 14 Nov 2014 22:30:40 +0100 Message-ID: <54667480.2040703@gmx.de> References: <20141007192330.GE30038@quack.suse.cz> <1414100107-3750-1-git-send-email-xypron.glpk@gmx.de> <20141110203029.GA8125@quack.suse.cz> <20141111073415.GA21776@infradead.org> <20141111110943.GD10456@quack.suse.cz> <546269AE.4050200@gmx.de> <20141114100135.GB17262@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Christoph Hellwig , Eric Paris , Alexander Viro , OGAWA Hirofumi , Jeff Layton , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Jan Kara Return-path: In-Reply-To: <20141114100135.GB17262@quack.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hello Jan, thank you for the review. On 14.11.2014 11:01, Jan Kara wrote: >> >> We only want to create FAN_MODIFY events for ATTR_SIZE. So only for >> these events we need a path. >> >> To my knowledge notify_change is called with ATTR_SIZE from >> do_truncate(), ecryptfs_truncate() and will be called with ATTR_SIZE >> from ovl_setattr() for a truncation. > There's also a call in fs/cachefiles/interface.c: cachefiles_attr_changed() > and fs/hpfs/namei.c: hpfs_unlink() and nfs plays with ATTR_SIZE although I > wasn't able to track down whether it actually passes it to notify_change(). cachefiles_attr_changed() contains two calls to notify_change(). Both calls pass ATTR_SIZE as sole attribute. In cachefiles_attr_changed() we can create a path object with path.dentry = object->backer; path.mnt = cache->mnt; In hpfs_unlink() a truncation occurs only if deletion fails. I do not see how to access a path here. notify_change() is not called in directory fs/nfs. grep -GHrn notify_change fs/nfs/ This does not test for any indirect call. Best regards Heinrich Schuchardt