[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100924175653.GB25129@shell>
Date: Fri, 24 Sep 2010 13:56:54 -0400
From: Valerie Aurora <vaurora@...hat.com>
To: Miklos Szeredi <miklos@...redi.hu>,
Andreas Gruenbacher <agruen@...e.de>,
alias ram Ram Pai <linuxram@...ibm.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
neilb@...e.de, viro@...iv.linux.org.uk
Subject: Re: [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype
On Mon, Sep 20, 2010 at 08:04:10PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.cz>
>
> This overlay filesystem is a hybrid of entirely filesystem based
> (unionfs, aufs) and entierly VFS based (union mounts) solutions.
[...]
> +static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev,
> + const char *link)
> +{
> + int err;
> + struct dentry *newdentry;
> + struct dentry *upperdir;
> + struct inode *inode;
> + struct kstat stat = {
> + .mode = mode,
> + .rdev = rdev,
> + };
> +
> + err = -ENOMEM;
> + inode = ovl_new_inode(dentry->d_sb, mode);
> + if (!inode)
> + goto out;
> +
> + err = ovl_copy_up(dentry->d_parent);
> + if (err)
> + goto out_iput;
> +
> + upperdir = ovl_dentry_upper(dentry->d_parent);
> + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT);
> +
> + newdentry = ovl_upper_create(upperdir, dentry, &stat, link);
> + err = PTR_ERR(newdentry);
> + if (IS_ERR(newdentry))
> + goto out_unlock;
> +
> + if (ovl_dentry_is_opaque(dentry) && S_ISDIR(mode)) {
> + err = ovl_set_opaque(newdentry);
> + if (err)
> + goto out_dput;
> + }
Andreas Gruenbacher just convinced me that every single new directory
created in the unioned file system should be marked opaque. "New"
means either it replaces a whiteout or has no matching directory on
the lower layer. The theory is that the topmost file system changes
should take precedence and override any changes (off-line) in the
lower file system.
What do you think?
-VAL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists