linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Sabolish <sabolish@me.com>
To: Jan Kara <jack@suse.cz>
Cc: "Pali Rohár" <pali.rohar@gmail.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: Mon, 14 Jan 2019 19:07:35 -0800	[thread overview]
Message-ID: <E11914DA-D254-4198-A152-F9D6E61514BE@me.com> (raw)
In-Reply-To: <20190114123042.GH13316@quack2.suse.cz>

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))


> On Jan 14, 2019, at 4:30 AM, Jan Kara <jack@suse.cz> wrote:
> 
> On Mon 14-01-19 13:00:23, Pali Rohár wrote:
>> On Monday 14 January 2019 11:30:11 Jan Kara wrote:
>>>> As for the case of remounting as rw if the UDF is ro but the device is
>>>> rw, I am not sure what the best idea is to deal with this.  If this new
>>>> behavior doesn't count as a regression, is there any way to end up with a
>>>> UDF filesystem as specced by the command above (-m dvd -b 512, so with it
>>>> being read-only), but still allow for mounting it as rw if the device
>>>> supports it? Does udftools offer a way to manipulate the UDF partition
>>>> descriptor flag in a pre-existing filesystem after it had already been
>>>> created that I am missing?
>>> 
>>> So I would really prefer to keep the behavior of disallowing remounting
>>> read-only partition read write. After all ECMA-167 standard is pretty clear
>>> on this saying that for read-only partitions no sectors can be recorded. I
>>> understand it is inconvenient if you try to create e.g. a DVD image. So you
>>> want partition to be read-only in the end but initially you need it to be
>>> writeable so that you can fill-in the contents.
>>> 
>>> Generally I think a clean solution for this is to provide a way in udftools
>>> to switch partition read-only / read-write. Also this is how similar things
>>> are achieved for other filesystems. Pali, is there a way to switch
>>> accessType of a partition on existing media with udftools? If not, can you
>>> look into implementing that please? It should be rather straightforward,
>>> the biggest question really is which tool should do this...
>> 
>> You are not the first who asked for such functionality in udftools.
>> Michael (CCed) already experimented with such thing and "hacked"
>> udflabel to switch access type from overwritable to readonly.
>> 
>> I'm not against adding a new tool into udftools project which can
>> manipulate UDF access type. Question is design / API of such tool.
>> 
>> Currently udftools has udfinfo tool which prints lot of information
>> about UDF filesystem (including access type). But the only tool which
>> modifies UDF filesystem in udftools is udflabel. And udflabel is not
>> really the proper place for changing access type.
>> 
>> So some new tool for modifying UDF filesystem would be better. Which
>> other settings of UDF filesystem could be useful to be modifiable? I'm
>> thinking about "udftune" where new features for modification could be
>> implemented later too.
> 
> Yes, that sounds good to me and is in line with what tools for other
> filesystems have.
> 
> 								Honza
> -- 
> Jan Kara <jack@suse.com>
> SUSE Labs, CR


  reply	other threads:[~2019-01-15  3:14 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 ` udf: Prevent write-unsupported filesystem to be remounted read-write 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 [this message]
2019-01-15  8:31           ` Pali Rohár
2019-01-15  8:41             ` Jan Kara
2019-01-15  8:48               ` Pali Rohár
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=E11914DA-D254-4198-A152-F9D6E61514BE@me.com \
    --to=sabolish@me.com \
    --cc=jack@suse.cz \
    --cc=kwe-lnx@postn.eu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.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;
as well as URLs for NNTP newsgroup(s).