linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] ubifs: Correctly initialize c->min_log_bytes
Date: Wed, 31 Jul 2019 10:07:06 +0200 (CEST)	[thread overview]
Message-ID: <1015927082.55006.1564560426219.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20190731074244.2msdjvuokoci2lxx@pengutronix.de>

----- Ursprüngliche Mail -----
> Von: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
> An: "richard" <richard@nod.at>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>
> Gesendet: Mittwoch, 31. Juli 2019 09:42:44
> Betreff: Re: [PATCH] ubifs: Correctly initialize c->min_log_bytes

> Hello Richard,
> 
> On Thu, Jul 25, 2019 at 10:56:27PM +0200, Richard Weinberger wrote:
>> Currently on a freshly mounted UBIFS, c->min_log_bytes is 0.
>> This can lead to a log overrun and make commits fail.
>> 
>> Recent kernels will report the following assert:
>> UBIFS assert failed: c->lhead_lnum != c->ltail_lnum, in fs/ubifs/log.c:412
>> 
>> c->min_log_bytes can have two states, 0 and c->leb_size.
>> It controls how much bytes of the log area are reserved for non-bud
>> nodes such as commit nodes.
>> 
>> After a commit it has to be set to c->leb_size such that we have always
>> enought space for a commit. While a commit runs it can be 0 to make the
>> remaining bytes of the log available to writers.
>> 
>> Having it set to 0 right after mount is wrong since no space for commits
>> is reserved.
>> 
>> Reported-and-tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Signed-off-by: Richard Weinberger <richard@nod.at>
> 
> I assume you care for applying this to mainline? I wonder it isn't in
> next yet?!

Don't stress me. The issue is present in UBIFS since day 0, there is absolutely
no reason to hurry.
It will get merged when I'm back from traveling and my time permits it.

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-07-31  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 20:56 [PATCH] ubifs: Correctly initialize c->min_log_bytes Richard Weinberger
2019-07-25 21:03 ` Richard Weinberger
2019-07-25 21:04 ` Uwe Kleine-König
2019-07-31  7:42 ` Uwe Kleine-König
2019-07-31  8:07   ` Richard Weinberger [this message]
2019-07-31  8:22     ` Uwe Kleine-König

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=1015927082.55006.1564560426219.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).