[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180830134103.qftgy2hdlopfup5s@pengutronix.de>
Date: Thu, 30 Aug 2018 15:41:03 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Richard Weinberger <richard@....at>
Cc: linux-mtd@...ts.infradead.org, David Gstir <david@...ma-star.at>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/25] ubifs: Add authentication nodes to journal
On Wed, Aug 29, 2018 at 04:54:30PM +0200, Richard Weinberger wrote:
> Am Mittwoch, 29. August 2018, 16:38:34 CEST schrieb Sascha Hauer:
> > On Mon, Aug 27, 2018 at 10:48:26PM +0200, Richard Weinberger wrote:
> > > > release_head(c, BASEHD);
> > > > kfree(dent);
> > > > + ubifs_add_dirt(c, lnum, ubifs_auth_node_sz(c));
> > >
> > > You have to account it immediately because while a commit you have no longer
> > > a reference to them?
> > > Upon replay you should have since you scan LEBs anyway.
> >
> > What do you mean here? Is that a suggestion to change something?
>
> I don't fully understand how you keep the lprops dirty counter correct for
> auth nodes. Hence the question.
>
> Auth nodes are not referenced by the index, so you have to keep track of
> them manually.
Yes. That's why I call ubifs_add_dirt(c, lnum, ubifs_auth_node_sz(c))
each time I create an auth node.
> Is your current approach "mark them dirty immediately and rely on LPT commit"
> to not get lost of an auth node?
Yes, I mark the auth nodes dirty in the assumption that the correct
values are written on a LPT commit.
>
> I expected auth nodes getting dirtied also during journal reply.
Yes, this happens in replay.c replay_bud(). "used" gets increased with
every node found except when it's an auth node. Here "used" is not
increased, the result is that the auth node adds to the dirty space.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists