In reiser4 I contemplate the following architecture:
You have a current working plugin set which is changed by the act of cd'ing into the directory, and
that current working plugin set implements the VFS operations. It might choose to inherit the stat
data (including ACLs) from the directory for all files in that directory. This would be significant
as part of, say, implementing a 30 million file directory with 10 byte files in it (think web search
engines). With inheritance it can all fit into RAM and performance improves by an order of
magnitude because of that. To achieve extreme compression of ACLs, small files, etc., you need to
use current working plugins. The performance gain from caching less metadata in RAM is
significant. If you the user don't choose to change your current working plugins to look to the
parent directory for stat data then you don't get any change in performance or semantics.
For per file rather than per directory specified inheritance you have a flag to indicate whether you
inherit, and the key(s) of what you inherit from. I am going to hand wave here a bit in regards to
the datastructure for separately inheriting different stat data fields and file body parts from
different parents, we haven't held our v4 seminars yet (the NFS and alpha port stuff is delaying
them). In this case if you don't specify any indirections then you don't get anything different in
performance or semantics.
Only if you choose to use the feature do you get a change in performance/semantics. Assuming you
always choose to do the right thing this means you can only win. When you want to be able to change
the ACLs in one place quickly for many files, use inheritance. When accessing files that don't use
inheritance you don't have to look at any parents. Parents will likely be in cache, and accessing
them will be cheap.
Let's not get into a long discussion of this until Adamovich has finished this NFS and alpha port
crud (which he must hate, he has my sympathy), and he plus a still unhired compression specialist is
able to make real code from my vaporware.....
Hans
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/