Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - inotify fails in ETFS watching: (5 Items)
   
inotify fails in ETFS watching  
we want to monitor the activity of certain directory, for instance, a file is added or delete. By using the inotify, it 
works for the FAT (SD storage) but it fails to inotify_add_watch for path under ETFS. It looks like the ETFS can not 
support inotify. 

Is there any recommendation to walk around this - Watch the ETFS and get the activity events

Thank you.
Re: inotify fails in ETFS watching  
Maybe, a resource manager is what you are looking for. Documentation can be found here:
http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.resmgr/topic/about.html

IIRC there's also an example for monitoring file / directory access, but I'm unable to find it at the moment.

Regards,
Michael.
Re: inotify fails in ETFS watching  
inotify is a Linux API that was initially not available in any QNX file system.

Then an implementation (6.6 onwards I think) was provided that worked with an extra resource manager that polled the 
file system and implemented the inotify API for clients to use. See http://www.qnx.com/developers/docs/6.6.0_anm11_wf10/
#com.qnx.doc.neutrino.utilities/topic/f/fsevmgr.html. QNX 7.1 still has that daemon in its documentation.

If my understanding is correct then the fsevmgr is tied to the devb block filesystem, and so would not work with ETFS. 
Even though technically thinkable, I argue it is a considerable amount of work to be done to add a backend to fsevmgr to
 talk to ETFS.

Regards,
Albrecht
Re: inotify fails in ETFS watching  
Thanks for your reply and understand inotify is not a preferred mechanism to do so. Above on that,  is there any other 
insights to watch ETFS directories activities (such as the file adding or deleting)?

Best regards,
Guangliang

Re: inotify fails in ETFS watching  
My view is different. inoitify()  *is* the preferred method of watching directory changes but it so happens that it is 
not implemented in ETFS.

I am not aware of any other method than polling to gather changes. You need to explicitly enable "access times" in ETFS,
 if you do that maybe you can watch the directory entry itself for change in access time and only then re-read the 
actual contents of the directory.

-Al