[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100716210226.GD21201@shell>
Date: Fri, 16 Jul 2010 17:02:27 -0400
From: Valerie Aurora <vaurora@...hat.com>
To: Ian Kent <raven@...maw.net>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Miklos Szeredi <miklos@...redi.hu>,
Jan Blunck <jblunck@...e.de>,
Christoph Hellwig <hch@...radead.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 21/38] union-mount: Support for mounting union mount file systems
On Tue, Jul 13, 2010 at 12:47:02PM +0800, Ian Kent wrote:
> On Tue, Jun 15, 2010 at 11:39:51AM -0700, Valerie Aurora wrote:
> > +
> > +static int
> > +check_mnt_union(struct path *mntpnt, struct vfsmount *topmost_mnt, int mnt_flags)
> > +{
> > + struct vfsmount *lower_mnt = mntpnt->mnt;
> > +
> > + if (!(mnt_flags & MNT_UNION))
> > + return 0;
> > +
> > +#ifndef CONFIG_UNION_MOUNT
> > + return -EINVAL;
> > +#endif
> > + if (!(lower_mnt->mnt_sb->s_flags & MS_RDONLY))
> > + return -EBUSY;
> > +
> > + if (!list_empty(&lower_mnt->mnt_mounts))
> > + return -EBUSY;
> > +
> > + if (!IS_ROOT(mntpnt->dentry))
> > + return -EINVAL;
> > +
> > + if (mnt_flags & MNT_READONLY)
> > + return -EROFS;
> > +
> > + if (!(topmost_mnt->mnt_sb->s_flags & MS_WHITEOUT))
> > + return -EINVAL;
> > +
>
> Is there a need to check fallthru, umm ... that probably doesn't
> apply for the ROOT(), right?
Actually, that's on my todo list - right now I'm assuming MS_WHITEOUT
implies fallthru support as well. But it doesn't.
We're a little short on MS_* flags. I'm thinking of just checking
->whiteout and ->fallthru for non-NULL on the root dir and getting rid
of MS_WHITEOUT entirely. Thoughts?
-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