From: Goswin v. B. <gos...@we...> - 2010-06-30 11:25:52
|
Stef Bon <st...@gm...> writes: > 2010/6/23 Goswin von Brederlow <gos...@we...>: >> Stef Bon <st...@gm...> writes: >> >>> >>> Do I have to program it in my fs, everywhere in my fs when it appears >>> that in the underlying >>> entries are changed or deleted, or is this done by the VFS subsystem >>> in the kernel? >>> >> >> Why do you care? >> >> If you implement your FS to keep FDs open as long as the file is open >> then you do not need to care about the directory being there or not. If >> a directory is removed on the underlying FS it won't show up in an ls in >> your FS anymore either. Just like if the directory had been removed in >> your FS. Keeping the FDs open allows read/write to continue to work just >> like with (most) normal FSes. > > Well, > > My question is not about open fd's. It's about about the keeping in > sync of the entry and > inode structures, when the underlying fs is changed. > > I guess it's a good thing to keep the entry and inode structures of my > fs in sync > as possible. > > You're right that in practice entries and inodes which are not valid > anymore do not disturb anything, well in my fuse fs. > > Stef Hmm, do you cache entries? Because then you would have to keep the cache in sync with the undelying fs. I can see where you get a problem then. I wasn't thinking of caching in my reply and then any time the fuse filesystem gets accessed it would access the undelying fs in turn so it would always be in sync. MfG Goswin |