From: Mike Waychison <Michael.Waychison@Sun.COM>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2.6.10-rd1-bk12] user-level lookup handler for tmpfs
Date: Wed, 03 Nov 2004 11:38:40 -0500 [thread overview]
Message-ID: <41890990.8080304@sun.com> (raw)
In-Reply-To: <200411032158.iA3Lw5o01778@freya.yggdrasil.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Adam J. Richter wrote:
> This patch eliminates the user level race condition that
> I mentioned in my original trapfs announcement and which Michael
> Waychison also complained out. Now, if an attempt is made to
> open or stat a file name that is already blocking on a user
> level helper, the new attempt will also invoke a user level
> helper and block.
>
> A side effect of this is that, if a user level program
> wants to create a plain text file, the helper program has to create
> it with some file name that the program knows to ignore and then
> rename them to the correct file names. This is because there is
> nothing special about the user level helper program's attempts to
> open the nonexistant files, so that open() invokes another instance
> instance of a user level helper program, which needs to know to ignore
> the file name. This should be pretty easy to do, and I've added an
> untested hypothetical example of it to
> Documentation/filesystems/lookup-trap.txt.
So the ignoring is done by the userspace agent?
>
> If you want to have a directory tree that has no such file
> names, then make it a "mount --bind" copy of a subdirectory of a
> hidden tmpfs file system, something like this:
>
> mount -t tmpfs /hidden
> mkdir /hidden/mirror /hidden/tmp-files
> mount --bind /hidden/mirror /public
>
> ...and then have your user level helper program create
> files in /hidden/tmp-files and move them to /hidden/mirror or /public
> (makes no difference, although using /hidden/mirror would make it clearer
> that the move is within the same file system).
Stuff like moving a directory with a mountpoint on it can't be done
(from userspace). This scheme would require doing an explicit mkdir and
a mount --move.
>
> Serialization is up to the user level helper programs to deal
> with if necessary. This approach not only keeps the kernel code
> small, but also allows the user level helper programs to avoid
> unnecessary serialization.
>
> Anyhow, here is the updated patch. Please let me know what
> you think. I will probably post this and the devfs patch to
> lkml soon for comments from a wider audience.
>
- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBiQmQdQs4kOxk3/MRAo6rAJ907iugzAz6h/m9zvzO8dpvG+a3UACghljw
aRWbEwiNizzvjat4r+1dYmg=
=lwzL
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2004-11-03 16:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 21:58 [PATCH 2.6.10-rd1-bk12] user-level lookup handler for tmpfs Adam J. Richter
2004-11-03 14:45 ` Matthew Wilcox
2004-11-03 16:38 ` Mike Waychison [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-05 9:46 Adam J. Richter
2004-11-05 8:27 Adam J. Richter
2004-11-04 7:34 Adam J. Richter
2004-11-04 13:28 ` Matthew Wilcox
2004-11-03 18:51 Adam J. Richter
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=41890990.8080304@sun.com \
--to=michael.waychison@sun.com \
--cc=adam@yggdrasil.com \
--cc=linux-fsdevel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.