From: Nikolaus R. <Nik...@ra...> - 2010-06-17 16:17:34
|
Stef Bon <ste...@pu...> writes: > 2010/6/17 Nikolaus Rath <Nik...@pu...>: >> Stef Bon <ste...@pu...> writes: >>> Hello, >>> >>> >>> But what to do when a file (or a directory) is removed, while there is >>> an inode and entry created by my fs for this entry. >> >> This is more of a design question, I don't think there is a single >> answer that's will always be the best solution. Both keeping the entry >> alive and removing it can be justified. >> >>> 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? >> >> The kernel doesn't know anything about how your fs works, so it cannot >> possibly handle any issues with the underlying file system for you. Your >> file system has to cope with that on its own. > > Yes I know. But the kernel/VFS will detect that the inode does exist, > while a call like getattr gives an error like > -NOENT. My question is what does the kernel/VFS do with that? Nothing, it just forwards it to the userspace program that initiated the call. Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |