On Thu, Aug 26, 2010 at 08:33:45PM +0200, Miklos Szeredi wrote:
This is elegant and readable code. I am still reviewing it but have a
few comments now.
Passing a NULL namiedata pointer to vfs_create() is a convenient
temporary hack, but unfortunately NFS, ceph, etc. still use the
nameidata passed to vfs_create() and other ops.
The way union mounts gets a valid nameidata is by doing the create in
the VFS before calling file system ops that may trigger a copyup,
while we still have the original nameidata. This is one of the major
reasons union mounts lives in the VFS.
A lot of my conversations about union mounts with Al go like this:
Al: "Rewrite it this way."
Val: "But then how do we get the nameidata?"
Al: "Arrrrrrrrrrrrrggggh."
Can you think of a way to construct a good nameidata for these
implicit copyups? That might be a solution.
-VAL
--