User: Password:
|
|
Subscribe / Log in / New account

Another union filesystem approach

Another union filesystem approach

Posted Sep 3, 2010 5:34 UTC (Fri) by neilbrown (subscriber, #359)
In reply to: Another union filesystem approach by dpquigl
Parent article: Another union filesystem approach

Here is a question for you - why should 'readlink' take a dentry while 'permission' only gets the inode?

I don't know either, but given the prevalence of dentry being passed around, it seems hard to justify not letting permission get a dentry.

The core reason that the hybrid unionfs needs permission() to take a dentry is because Miklos chose to store the 'struct union_entry' in the dentry rather than in the inode. It would be fairly straight forward to store that structure in the inode instead, thus removing any need to change 'permission'. However that would require allocating an inode for every active file (rather than just for each directory) which might be seen as a waste of memory.

The concept of "permission checking based on path", while seemingly suggested by the change-log entry for the patch which gives dentry to permission(), is actually irrelevant here.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds