From: Jan Kara <jack@suse.cz>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [WIP PATCH 1/4] udf: Do not access LVIDIU revision members when they are not filled
Date: Tue, 14 Jan 2020 13:01:38 +0100 [thread overview]
Message-ID: <20200114120138.GH6466@quack2.suse.cz> (raw)
In-Reply-To: <20200113183728.ucuidmverddt4nme@pali>
On Mon 13-01-20 19:37:28, Pali Rohár wrote:
> On Monday 13 January 2020 13:00:49 Jan Kara wrote:
> > On Sun 12-01-20 18:59:30, Pali Rohár wrote:
> > > minUDFReadRev, minUDFWriteRev and maxUDFWriteRev members were introduced in
> > > UDF 1.02. Previous UDF revisions used that area for implementation specific
> > > data. So in this case do not touch these members.
> > >
> > > To check if LVIDIU contain revisions members, first read UDF revision from
> > > LVD. If revision is at least 1.02 LVIDIU should contain revision members.
> > >
> > > This change should fix mounting UDF 1.01 images in R/W mode. Kernel would
> > > not touch, read overwrite implementation specific area of LVIDIU.
> > >
> > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> >
> > Maybe we could store the fs revision in the superblock as well to avoid
> > passing the udf_rev parameter?
>
> Unfortunately not. Function udf_verify_domain_identifier() is called
> also when parsing FSD. FSD is stored on partition map and e.g. Metadata
> partition map depends on UDF revision. So it is not a good idea to
> overwrite UDF revision from FSD. This is reason why I decided to use
> initial UDF revision number only from LVD.
>
> But whole stuff around UDF revision is a mess. UDF revision is stored on
> these locations:
>
> main LVD
> reserve LVD
> main IUVD
> reserve IUVD
> FSD
>
> And optionally (when specific UDF feature is used) also on:
>
> sparable partition map 1.50+
> virtual partition map 1.50+
> all sparing tables 1.50+
> VAT 1.50
>
> Plus tuple minimal read, minimal write, maximal write UDF revision is
> stored on:
>
> LVIDIU 1.02+
> VAT 2.00+
>
> VAT in 2.00+ format overrides information stored on LVIDIU.
Thanks for the summary. This is indeed a mess in the standard so let's not
overcomplicate it. I agree with just taking the revision from 'main LVD'
and storing it in the superblock like you do in this patch. I'd just
slightly change your code so that extracting a revision from 'struct regid'
is a separate function and not "hidden" inside
udf_verify_domain_identifier(). There's no strong reason for combining
these two.
WRT parsing of minUDFReadRev and friends, I'd handle them similarly to
numDirs and numFiles. I'd initialize them to the version we've got from
LVD, then possibly override them in udf_load_logicalvolint(), and finally
possibly override them in udf_load_vat().
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2020-01-14 12:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 17:59 [WIP PATCH 0/4] Support for UDF 1.01 and 2.60 revisions Pali Rohár
2020-01-12 17:59 ` [WIP PATCH 1/4] udf: Do not access LVIDIU revision members when they are not filled Pali Rohár
2020-01-13 12:00 ` Jan Kara
2020-01-13 18:37 ` Pali Rohár
2020-01-14 12:01 ` Jan Kara [this message]
2020-01-12 17:59 ` [WIP PATCH 2/4] udf: Fix reading numFiles and numDirs from UDF 2.00+ VAT discs Pali Rohár
2020-01-13 11:58 ` Jan Kara
2020-01-13 18:11 ` Pali Rohár
2020-01-14 11:18 ` Jan Kara
2020-01-14 11:37 ` Jan Kara
2020-01-12 17:59 ` [WIP PATCH 3/4] udf: Fix reading minUDFReadRev and minUDFWriteRev " Pali Rohár
2020-01-12 17:59 ` [WIP PATCH 4/4] udf: Allow to read UDF 2.60 discs Pali Rohár
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=20200114120138.GH6466@quack2.suse.cz \
--to=jack@suse.cz \
--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).