lkml.org 
[lkml]   [2010]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/5] union: hybrid union filesystem prototype
From
Date
On Wed, 1 Sep 2010, Valerie Aurora wrote:
> > +
> > + err = vfs_create(upperdir, newdentry, attr->ia_mode, NULL);
>
> 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.

Not a big deal, just set up nd as if this was a single component
lookup. The previous version did it like this:

+ struct nameidata nd = {
+ .last_type = LAST_NORM,
+ .last = *name,
+ };
+
+ nd.path = pue->upperpath;
+ path_get(&nd.path);
+
+ newdentry = lookup_create(&nd, S_ISDIR(attr->ia_mode));

But that's not a solution to the NFS suckage, it's just a workaround.

"Fortunately" NFS isn't good for a writable layer of a union for other
reasons, so this isn't a big concern at the moment.

Thanks,
Miklos


\
 
 \ /
  Last update: 2010-09-02 11:23    [W:0.167 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site