From: "Pali Rohár" <pali.rohar@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Michael Sabolish <sabolish@me.com>,
Kevin Weidemann <kwe-lnx@postn.eu>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: udf: Prevent write-unsupported filesystem to be remounted read-write
Date: Tue, 15 Jan 2019 09:48:32 +0100 [thread overview]
Message-ID: <20190115084832.fypbuhyvgfizh3am@pali> (raw)
In-Reply-To: <20190115084119.GE29524@quack2.suse.cz>
On Tuesday 15 January 2019 09:41:19 Jan Kara wrote:
> On Tue 15-01-19 09:31:11, Pali Rohár wrote:
> > On Monday 14 January 2019 19:07:35 Michael Sabolish wrote:
> > > I can try and make a pull-request for udftune, and I can just copy the API for tune2fs. It would work something like:
> > >
> > > udftune -O read-only device (to set read-only access type)
> > >
> > > or:
> > >
> > > udftune -O ^read-only device (to clear read-only access type (aka set rw))
> >
> > This API is ambiguous. What does it mean for ^read-only? In UDF you have
> > following access types: overwritable, rewritable, writeonce, readonly,
> > pseudo-overwritable, unknown.
> >
> > So you would need to know to which R/W access type to switch
> > (overwritable, rewritable, writeonce or pseudo-overwritable).
> >
> > With information of media type, you could be able to guess correct
> > access type. But for UDF images stored in VFS there is no media
> > information. Also you can have uncommon setup, e.g. usage of CD-R
> > writeonce setup on CD-R/W disc. So "autodetection" of media type would
> > not work always correctly.
> >
> > So I think that it would be better to have following API:
> >
> > udftune --access-type=<new_access_type>
> >
> > or
> >
> > udftune --change-access-type=<new_access_type>
> >
> > I understand that you would like to have similar API as tune2fs, but UDF
> > settings are too different from ext*.
>
> If you wanted to follow tune2fs interface, you can have e.g.:
Question is if it is a good idea to follow this interface.
> udftune -E access-type=<foo>
>
> Another question about the feature is - the access type is actually per
> partition and there can be multiple partitions on UDF media. So I think we
> need to specify the partition number in the command and <foo> has to
> actually be something like <partition number>,<access_type>.
Access type is stored in partition descriptor and in UDF (as opposite of
ECMA-167) you can have only one partition descriptor. IIRC there is some
exception when you have two partition descriptors, but then one have to be
readonly and second virtual.
--
Pali Rohár
pali.rohar@gmail.com
next prev parent reply other threads:[~2019-01-15 8:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <124cc6ea-ca79-20f2-651e-c2f909729ac0@gmx.de>
2019-01-14 0:33 ` Kevin Weidemann
2019-01-14 10:30 ` Jan Kara
2019-01-14 12:00 ` Pali Rohár
2019-01-14 12:30 ` Jan Kara
2019-01-15 3:07 ` Michael Sabolish
2019-01-15 8:31 ` Pali Rohár
2019-01-15 8:41 ` Jan Kara
2019-01-15 8:48 ` Pali Rohár [this message]
2019-01-15 9:45 ` Jan Kara
2019-01-15 10:50 ` Pali Rohár
2019-01-15 11:15 ` Jan Kara
2019-01-14 15:12 ` Pali Rohár
2019-01-14 16:26 ` Kevin Weidemann
2019-01-22 13:22 ` Jan Kara
2019-01-23 20:29 ` Kevin Weidemann
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=20190115084832.fypbuhyvgfizh3am@pali \
--to=pali.rohar@gmail.com \
--cc=jack@suse.cz \
--cc=kwe-lnx@postn.eu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sabolish@me.com \
/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
all inboxes | Powered by JetHome®