From: Karel Zak <kzak@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Phillip Susi <psusi@ubuntu.com>,
util-linux@vger.kernel.org,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: read only bind mount ignores ready only
Date: Fri, 13 Dec 2013 11:45:16 +0100 [thread overview]
Message-ID: <20131213104516.GN16572@x2.net.home> (raw)
In-Reply-To: <20131212215325.GE10323@ZenIV.linux.org.uk>
On Thu, Dec 12, 2013 at 09:53:25PM +0000, Al Viro wrote:
> Frankly, I wonder if we are trying to pack too much into one
> syscall - not just in terms of overloading it (that much is obvious),
> but in terms of trying to cram a sequence of syscalls into one. If
> we end up introducing new API(s) for mount(), it's probably worth
> considering something like this:
> * open a connection to fs type driver, get a descriptor
> * use normal IO syscalls (usually just write(2)) on that
> descriptor to tell fs type driver what do we want. If any kind of
> authentication is needed, that's the time for doing it
> * attach the thing identified by that descriptor to mountpoint
Yes, exactly. This is my wish for years.
I don't think we need more *independent* syscalls to replace mount(2)
(for example a special syscall to change propagation flags, or so).
I strongly believe that APIs for complex tasks have to be based on
handlers (file descriptors). These APIs are extendible.
It would be also nice to provide some information about the mount
operation to userspace by the file descriptor -- it means to support
read(2) and at least to return mount Id. The current situation when
we have only errno in userspace is insufficient. If you want to know
more information then you have parse /proc/self/mountinfo, but which
entry in the right entry for the last mount(2) call?
> I have an old writeup somewhere (several variants of it, actually) on possible
> replacement APIs; I'll try to dig it out and post it.
Please, share it :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2013-12-13 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <52A878C5.6050505@ubuntu.com>
[not found] ` <20131212120544.GJ16572@x2.net.home>
2013-12-12 19:42 ` read only bind mount ignores ready only Miklos Szeredi
[not found] ` <CAJfpegvWeEb7Dtk8CMxLO4DB-xSLQMxLxccUPReU0GeQ=9d5MA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-12 21:53 ` Al Viro
2013-12-13 10:45 ` Karel Zak [this message]
2013-12-13 8:18 ` Karel Zak
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=20131213104516.GN16572@x2.net.home \
--to=kzak@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=psusi@ubuntu.com \
--cc=util-linux@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).