 |
|
| Linux Forum Index » Linux Development - System » inotify usage when large filetree is created.... |
|
Page 1 of 1 |
|
| Author |
Message |
| Oge... |
Posted: Fri Sep 11, 2009 3:06 pm |
|
|
|
Guest
|
I am trying to use inotify to track creation and deletion of files and
directories in my volume. This works in simple cases. But when I have
a growing file-tree (eg: i untar a file-tree that has multiple
directories and files) I am not able to find an optimal way to handle
this.
The main concern is about losing file-creation events for files in a
subdirectory whose parent is being watched.
Say, I have a watch on DirA.
And I untar into DirA a tar file that has DirB whose child is FileC.
I will get a notification for DirB because its parent DirA is being
watched.
But I will not get a notification for FileC unless I have a watch for
DirB. The problem is, by the time I know about DirB and add a watch
for it, it may be too late for the kernel to notify me of FileC's
creation.
In small file trees, I can trigger a re-scan of a directory being
added. But this is not practical for larger file trees.
Anyone with experience with inotify who can give tips to handling such
a scenario?
Many thanks! |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Fri Dec 11, 2009 2:45 pm
|
|