Lou Gosselin: > Yes, either directly or indirectly, it is what I'm after. Although in > the past you indicated this would be difficult since filesystems in the > kernel are oblivious to processes?
Exactly. Every filesystem doesn't know about the process which is using a file in it. But lsof gives us the process-file relationship. If we (or a new utility) gives this relation to a kernel module (which may be separated from aufs itself), when it will be able to identify the busy inode on the branch. Currently I am thinking - find the processes using aufs by lsof - pass the pair of pid and fd, and the target branch index to aufs (or a new kernel module) by ioctl. - the ioctl routine retrieves the inode object from pid and fd. - and verifies whether the real inode makes the branch busy or not. - the new utility prints the pid based upon the result from ioctl. Because the process is running and there will be no lock at all, the result may be obsoleted or bogus. But this is my current best solution. J. R. Okajima ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d