From: Juan Quintela <quintela@mandrakesoft.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org,
Jean-Marc Saffroy <saffroy@ri.silicomp.fr>,
linux-fsdevel@vger.kernel.org,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [RFD] readonly/read-write semantics
Date: 01 Sep 2001 15:08:18 +0200 [thread overview]
Message-ID: <m2y9nzjby5.fsf@mandrakesoft.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0108311558430.15931-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0108311558430.15931-100000@weyl.math.psu.edu>
>>>>> "alexander" == Alexander Viro <viro@math.psu.edu> writes:
Hi
viro> What we need is a "I want rw access to fs"/"I give up rw access"/"make
viro> it ro" set of primitives. Unfortunately, it's even more compilcated -
viro> e.g. fs may stomp its foot and set MS_RDONLY in ->s_flags (e.g. upon
viro> finding an error if it has such policy). That DOESN'T look for files
viro> opened for write (reasonable) and DOESN'T revoke write access to them.
I really will like that thing for supermount, supermount tries to do
that thing by hand, and it really fails because it is difficult,
supermount tries to have the underlying fs unmounted if nobody has
open files on it, and mounted rw only when somebody has a file opened
on it and if someone has a file opened for write of there is happening
any operation that needs write access. As we don't have an easy way
to check if we are able to write in one filesystem (we can only use
the IS_RDONLY() macro), it happens that I have to mount the filesystem
rw for being able to call permission in that filesystem. Notice that
permission don't need write access per se, but the IS_RDONLY() macro
needs to have the filesystem mounted rw to fail. Yes, I can hack the
macro to do the things that I need, but that means that everybody that
needs that functionality will have to also hack it :(
viro> Again, the main issue here is what do we want, not how to implement it.
viro> Flame away.
I will want a method is the inode/super_block (don't care which of
them) for:
- is_read_only_fs()?
Notice that this method told as if we are able to have the
fs rw, not necessarily that the fs is rw at the moment.
- get_write_access()
- put_write_access()
Notice that there exist the functions get_write_access() and
put_write_access() functions in the tree, and I will be really happy if
there where a way to hook fs specific information there, as it will
make a lot of the code in supermount really easy, and the same for
other fs that need similar semantics.
Later, Juan.
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
next prev parent reply other threads:[~2001-09-01 13:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-31 17:18 [Q] [VFS] NULL f_dentry for opened files ; possible race condition Jean-Marc Saffroy
2001-08-31 20:56 ` [RFD] readonly/read-write semantics Alexander Viro
2001-09-01 13:08 ` Juan Quintela [this message]
2001-09-04 1:16 ` Jean-Marc Saffroy
2001-09-04 4:00 ` [PATCH] " Alexander Viro
-- strict thread matches above, loose matches on Subject: below --
2001-08-31 23:35 Bryan Henderson
2001-09-01 4:23 ` Alexander Viro
2001-09-01 14:42 ` Ingo Oeser
2001-09-01 16:44 ` Alexander Viro
2001-09-01 17:13 ` Nicholas Knight
2001-09-04 2:07 ` Jean-Marc Saffroy
2001-09-04 4:09 ` Alexander Viro
2001-09-04 9:26 ` Xavier Bestel
2001-09-04 10:15 ` Alexander Viro
2001-09-04 10:20 ` Xavier Bestel
2001-09-04 10:28 ` Alexander Viro
2001-09-04 10:59 ` Xavier Bestel
2001-09-04 11:29 ` Alexander Viro
2001-09-04 17:03 ` Pavel Machek
2001-09-04 16:58 ` Pavel Machek
2001-09-01 0:38 Bryan Henderson
2001-09-04 18:39 Bryan Henderson
2001-09-04 19:50 Bryan Henderson
2001-09-05 2:15 ` Alexander Viro
2001-09-05 2:34 Bryan Henderson
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=m2y9nzjby5.fsf@mandrakesoft.com \
--to=quintela@mandrakesoft.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saffroy@ri.silicomp.fr \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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