From: Jean-Pierre A. <jea...@wa...> - 2010-05-12 06:13:04
|
Hi John, John Muir wrote: > On 2010-05-11, at 5:04 AM, Jean-Pierre André wrote: > >> I have not been able to get this to work. >> What I want is (for instance) the result of a chmod() >> to be reflected immediately in a subsequent stat(), >> though cacheing is used. >> >> So, I tried to end the callback function setattr() with >> the sequence : >> >> fuse_lowlevel_notify_inval_inode(ctx->fc,ino,-1,0); >> fuse_reply_attr(req, &stbuf, ATTR_TIMEOUT); >> > This call to inval_inode() is an error and is not necessary. The cache > in the kernel will be up to date when your setattr() call-back returns > with fure_reply_attr() assuming that you've updated the attributes > correctly within stbuf. > > The 'inval_inode()' and 'inval_entry()' functions are only required to > invalidate the cache in the kernel when your file-system makes changes > that are NOT driven by the local kernel through the VFS and fuse > kernel module. Confirmed by experimentations. Thanks for making it clear. Regards Jean-Pierre |