public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "Jörg Krause" <joerg.krause@embedded.rocks>,
	linux-mtd@lists.infradead.org
Subject: Re: ubi_wl_get_peb: Unable to get a free PEB from user WL pool
Date: Thu, 6 Aug 2015 00:01:13 +0200	[thread overview]
Message-ID: <55C287A9.8000006@nod.at> (raw)
In-Reply-To: <1438811611.6328.32.camel@embedded.rocks>

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

Am 05.08.2015 um 23:53 schrieb Jörg Krause:
> On Mi, 2015-08-05 at 23:45 +0200, Richard Weinberger wrote:
>> Jörg,
>>
>> Am 05.08.2015 um 23:38 schrieb Jörg Krause:
>>> On Mi, 2015-08-05 at 23:30 +0200, Richard Weinberger wrote:
> 
> [snip]
> 
>>>
>>> I attached the kernel boot log.
>>
>> Thanks.
>> That's a really small UBI setup.
>> [    3.202421] ubi1: default fastmap pool size: 10
>> [    3.207174] ubi1: default fastmap WL pool size: 5
> 
> What do you exactly mean by small UBI setup? The fastmap pool size? The
> UBI layout?

The UBI image it self. Your MTD is very small.
But it should not matter.

> [snip]
> 
>>>
>>> It is enabled in the kernel config. Not sure how to use it.
>>
>> Then just disable it. :)
> 
> I did :) I thought fastmap is used automatically by the UBI driver?

It will *use* fastmap automatically but not convert non-fastmap UBI images
to fastmap.
You can enable ubi.fm_autoconvert to do so.

>> Meanwhile I'll find out what exactly is going on.
> 
> Many thanks!

Can you please apply the attached debug patch?
I wonder why exactly the auto resize function is failing.

Thanks,
//richard

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: debug.diff --]
[-- Type: text/x-patch; name="debug.diff", Size: 1012 bytes --]

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 22fd19c..89aa7ac9 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -820,8 +820,8 @@ static int autoresize(struct ubi_device *ubi, int vol_id)
 		err = ubi_resize_volume(&desc,
 					old_reserved_pebs + ubi->avail_pebs);
 		if (err)
-			ubi_err(ubi, "cannot auto-resize volume %d",
-				vol_id);
+			ubi_err(ubi, "cannot auto-resize volume %d: %d",
+				vol_id, err);
 	}
 
 	if (err)
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 1ae17bb..7be6fa3 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -498,8 +498,10 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
 	if (pebs < 0) {
 		for (i = 0; i < -pebs; i++) {
 			err = ubi_eba_unmap_leb(ubi, vol, reserved_pebs + i);
-			if (err)
+			if (err) {
+				ubi_err(ubi, "unable to unmap LEB");
 				goto out_acc;
+			}
 		}
 		spin_lock(&ubi->volumes_lock);
 		ubi->rsvd_pebs += pebs;

  reply	other threads:[~2015-08-05 22:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 21:22 ubi_wl_get_peb: Unable to get a free PEB from user WL pool Jörg Krause
2015-08-05 21:30 ` Richard Weinberger
2015-08-05 21:38   ` Jörg Krause
2015-08-05 21:45     ` Richard Weinberger
2015-08-05 21:53       ` Jörg Krause
2015-08-05 22:01         ` Richard Weinberger [this message]
2015-08-05 22:17           ` Jörg Krause
2015-08-06  7:30             ` Richard Weinberger
2015-08-06  8:10               ` Jörg Krause
2015-08-06  8:12                 ` Richard Weinberger
2015-08-06 18:16                 ` Richard Weinberger
2015-08-06 18:43                   ` Jörg Krause

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=55C287A9.8000006@nod.at \
    --to=richard@nod.at \
    --cc=joerg.krause@embedded.rocks \
    --cc=linux-mtd@lists.infradead.org \
    /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