From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13AC8C43387 for ; Tue, 15 Jan 2019 08:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0FAF20645 for ; Tue, 15 Jan 2019 08:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbfAOIlV (ORCPT ); Tue, 15 Jan 2019 03:41:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:51672 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725869AbfAOIlV (ORCPT ); Tue, 15 Jan 2019 03:41:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1293DAFBE; Tue, 15 Jan 2019 08:41:20 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 48F3F1E13D8; Tue, 15 Jan 2019 09:41:19 +0100 (CET) Date: Tue, 15 Jan 2019 09:41:19 +0100 From: Jan Kara To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Michael Sabolish , Jan Kara , Kevin Weidemann , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: udf: Prevent write-unsupported filesystem to be remounted read-write Message-ID: <20190115084119.GE29524@quack2.suse.cz> References: <124cc6ea-ca79-20f2-651e-c2f909729ac0@gmx.de> <8cf39b7c-505b-91e6-849d-e66ba980042f@postn.eu> <20190114103011.GD13316@quack2.suse.cz> <20190114120023.wkftfz6pwatehpfe@pali> <20190114123042.GH13316@quack2.suse.cz> <20190115083111.qq2mt2p2kn4opwx7@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190115083111.qq2mt2p2kn4opwx7@pali> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Message-ID: <20190115084119.GbFAzmp4X8yymptp5Y8vMXNGNMNDMkQ7hQOKxMMtkBc@z> 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= > > or > > udftune --change-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.: udftune -E access-type= 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 has to actually be something like ,. Honza -- Jan Kara SUSE Labs, CR