linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: "Steve Kenton" <skenton@ou.edu>,
	"Vojtěch Vladyka" <rain@vojtechvladyka.cz>,
	linux-fsdevel@vger.kernel.org
Subject: Re: UDF & open integrity type
Date: Tue, 27 Feb 2018 20:40:05 +0100	[thread overview]
Message-ID: <20180227194005.lwmqjjdfglkqulve@pali> (raw)
In-Reply-To: <20180227180114.yyezafu5bqvylg2o@quack2.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Tuesday 27 February 2018 19:01:14 Jan Kara wrote:
> Yeah, it makes sense to keep LVID in open state if it was like that when we
> first saw it. Attached patch should do what you ask for. I'll just probably
> silence the warning until fsck.udf actually works...

> @@ -1988,7 +1988,13 @@ static void udf_open_lvid(struct super_block *sb)
>  	lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX;
>  	ktime_get_real_ts(&ts);
>  	udf_time_to_disk_stamp(&lvid->recordingDateAndTime, ts);
> -	lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN);
> +	if (le32_to_cpu(lvid->integrityType) == LVID_INTEGRITY_TYPE_CLOSE) {
> +		lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN);
> +	} else {
> +		UDF_SET_FLAG(sb, UDF_FLAG_NEEDCHECK);
> +		udf_warn(sb, "volume need not be in consistent state. Running "
> +				"fsck is recommended.\n");

Maybe just?

		udf_warn(sb, "volume need not be in consistent state.\n");

And instead of UDF_FLAG_NEEDCHECK probably UDF_FLAG_INCONSISTENT?

But patch looks good.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2018-02-27 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 19:32 UDF & open integrity type Pali Rohár
2018-02-27 18:01 ` Jan Kara
2018-02-27 19:40   ` Pali Rohár [this message]
2018-02-28  9:54     ` Jan Kara

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=20180227194005.lwmqjjdfglkqulve@pali \
    --to=pali.rohar@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rain@vojtechvladyka.cz \
    --cc=skenton@ou.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;
as well as URLs for NNTP newsgroup(s).