From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f175.google.com ([209.85.128.175]:39063 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbeB0TkJ (ORCPT ); Tue, 27 Feb 2018 14:40:09 -0500 Received: by mail-wr0-f175.google.com with SMTP id w77so26058142wrc.6 for ; Tue, 27 Feb 2018 11:40:09 -0800 (PST) Date: Tue, 27 Feb 2018 20:40:05 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Jan Kara Cc: Steve Kenton , =?utf-8?Q?Vojt=C4=9Bch?= Vladyka , linux-fsdevel@vger.kernel.org Subject: Re: UDF & open integrity type Message-ID: <20180227194005.lwmqjjdfglkqulve@pali> References: <20180226193225.k2og3lu6dw46h74w@pali> <20180227180114.yyezafu5bqvylg2o@quack2.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="62wo67jvdgn3lujf" Content-Disposition: inline In-Reply-To: <20180227180114.yyezafu5bqvylg2o@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --62wo67jvdgn3lujf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 probab= ly > 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] =3D UDF_OS_ID_LINUX; > ktime_get_real_ts(&ts); > udf_time_to_disk_stamp(&lvid->recordingDateAndTime, ts); > - lvid->integrityType =3D cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN); > + if (le32_to_cpu(lvid->integrityType) =3D=3D LVID_INTEGRITY_TYPE_CLOSE) { > + lvid->integrityType =3D 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. --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --62wo67jvdgn3lujf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCWpW0DgAKCRCL8Mk9A+RD UrmkAKDOEap3F29WmafzfmlUjzHk8y6xXQCgqSt+GJ84y9O2Izk3xwUMvWbn8pA= =aBOB -----END PGP SIGNATURE----- --62wo67jvdgn3lujf--