linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Christoph Hellwig <hch@infradead.org>,
	Bharata B Rao <bharata@linux.vnet.ibm.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jan Blunck <j.blunck@tu-harburg.de>
Subject: Re: [RFC PATCH 4/4] Directory listing support for union mounted directories.
Date: Sat, 30 Jun 2007 10:43:32 +0100	[thread overview]
Message-ID: <20070630094332.GA22889@infradead.org> (raw)
In-Reply-To: <1182361492.6480.12.camel@heimdal.trondhjem.org>

On Wed, Jun 20, 2007 at 01:44:52PM -0400, Trond Myklebust wrote:
> > Which is exactly that problem this tries to solve.  Once you have
> > union mounts you'll have a single open file descriptor for multiple
> > actual directories.   Beause of that you can't simply attach to the
> > state to the struct file but have to keep it in a different way.
> 
> Which creates another, much WORSE problem.
> 
> Authentication information is part of a series of things that POSIX
> requires you to keep on per-descriptor basis (because POSIX assumes that
> you can suid/sgid a process without any security implications for file
> descriptors that are already open). It is quite natural to pass it
> around by means of the struct file.
> 
> If you don't want to pass the struct file around, then you at least need
> to come up with an alternative mechanism that allows filesystems to
> provide correct semantics in the standard non-union case.

That'd be struct ucred..

Anyway, to get back to the original problem - currently filesystems
are perfectly fine to keep whatever state they want in struct file
(mostly ->private), with union mounts we will have a single file descriptor
and struct file for two directories, so we need to restrict this.
Getting this right is the key to any unioning work that actually works
on an arbitrary filesystem and not just on disk filesystems that don't
do anything fancy.

      reply	other threads:[~2007-06-30  9:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20  5:50 [RFC PATCH 0/4] New approach to VFS based union mount Bharata B Rao
2007-06-20  5:51 ` [RFC PATCH 1/4] Union mount documentation Bharata B Rao
2007-06-20  8:11   ` Jan Blunck
2007-06-20  9:09     ` Bharata B Rao
2007-06-20  5:52 ` [RFC PATCH 2/4] Mount changes to support union mount Bharata B Rao
2007-06-20  7:47   ` Jan Blunck
2007-06-20  8:53     ` Bharata B Rao
2007-06-21 16:40       ` Josef Sipek
2007-06-20  5:53 ` [RFC PATCH 3/4] Lookup " Bharata B Rao
2007-06-20  7:51   ` Jan Blunck
2007-06-20  8:56     ` Bharata B Rao
2007-06-20  5:54 ` [RFC PATCH 4/4] Directory listing support for union mounted directories Bharata B Rao
2007-06-20 12:09   ` Christoph Hellwig
2007-06-20 14:22     ` Trond Myklebust
2007-06-20 17:02       ` Christoph Hellwig
2007-06-20 17:44         ` Trond Myklebust
2007-06-30  9:43           ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070630094332.GA22889@infradead.org \
    --to=hch@infradead.org \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=j.blunck@tu-harburg.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).