AW: UBI/UBIFS on NAND with PEB 4MB

Markus Macsek markus.macsek at artech.at
Tue Apr 11 04:25:48 PDT 2017


Hi,

we updated now to Linux kernel 4.9 and use mtd-utils 2.0. Unfortunately the
UBIFS problems remain the same.

Thus, I did comprehensive tests concerning our NAND and UBIFS (cp. attached
log files).

After all, I conclude that there is most probable an issue with the arasan nand
driver ([linux-xlnx.git]/drivers/mtd/nand/arasan_nand.c) regarding ECC. When
mounting the filesystem a corruption in the empty space at LEB 1:16384 is found
(cp. mount.log). I guess the problem is due to ECC changing a couple of "ff"
into "ef" (cp. nanddump2.log vs. nanddump3.log):

http://linux-mtd.infradead.narkive.com/Uvx5vHZc/ubifs-and-hardware-ecc-of-all-ff-pages-of-mlc-nand

Do you agree or are there other reasons for this behavior?

Note: In order to make mkfs.ubifs support the NANDs erase block size of 4M we
simply increased UBIFS_MAX_PEB_SZ and UBIFS_MAX_LEB_SZ from (2*1024*1024) to
(4*1024*1024), respectively (cp. increase-LEB-PEB-max-size-to-4M).

Best regards,
Markus

-----Ursprüngliche Nachricht-----
Von: Matthias Auchmann 
Gesendet: Dienstag, 11. April 2017 11:27
An: linux-mtd at lists.infradead.org
Cc: Markus Macsek
Betreff: RE: UBI/UBIFS on NAND with PEB 4MB

Hi guys!

Sorry that not much happened for such a long time. My colleague Markus has now picked up the investigation!

BR,

Matthias


-----Original Message-----
From: linux-mtd [mailto:linux-mtd-bounces at lists.infradead.org] On Behalf Of Matthias Auchmann
Sent: Wednesday, December 14, 2016 9:59 AM
To: Boris Brezillon
Cc: linux-mtd at lists.infradead.org
Subject: RE: UBI/UBIFS on NAND with PEB 4MB

Hi Boris!

Thanks for your reply. Just now I found out that when I disable the DMA of my NAND driver, ubiattach/detach works. So it must be a problem with the DMA and/or cache coherency on this brand-new cache coherent interconnect or whatever. I will investigate it later! Sorry for having bothered you guys with that, but as I said yesterday night it was kind of preliminary ;-)

On the patches for the UBIFS_MAX_LEB_SZ, can you tell me where I can find those patches? That would be great ;-)

BR,

Matthias


-----Original Message-----
From: Boris Brezillon [mailto:boris.brezillon at free-electrons.com]
Sent: Wednesday, December 14, 2016 8:43 AM
To: Matthias Auchmann
Cc: linux-mtd at lists.infradead.org
Subject: Re: UBI/UBIFS on NAND with PEB 4MB

Hi Matthias,

On Tue, 13 Dec 2016 20:40:59 +0100
Matthias Auchmann <m.auchmann at artech.at> wrote:

> Hi guys!
> 
> I'm trying to use UBI and UBIFS on a Micron MT29F32G08ABCDBJ4 SLC NAND with an erase block size 4MB.

Woh! an SLC NAND with 4MB eraseblocks, that's surprizing.

> 
> First of all, mkfs.ubifs wouldn't support a LEB larger than UBIFS_MAX_LEB_SZ being (2*1024*1024).

This is the easy part ;). We already have patches to increase the limit in different ubi utils (IIRC, it's also needed in ubinize).

> 
> When I use ubiattach though, it seems to be quite happy, giving me that on a 128MB partition:
> 
> UBI device number 0, total 32 LEBs (133169152 bytes, 127.0 MiB), 
> available 8 LEBs (33292288 bytes, 31.8 MiB), LEB size 4161536 bytes
> (4.0 MiB)
> 
> Anyway, when I detach and reattach, it won't work. Details are in the bottom of that mail, but since I haven't thoroughly looked into it myself yet, this is only for those who care... I don't want to ask preliminary questions.
> 
> Anyway, my questions I guess then are:
> -) Are there any patches/branches that enable UBIFS to be run with a LEB of 4161536?
> -) Are there any known limitations with using a 4MiB PEB with UBI itself, or shall I assume for now that the problem is on my board/NAND driver regarding the above ubiattach errors upon the second attach?

I don't think so. We did several tests on different MLC NANDs exposing 4MB blocks, and the UBI/UBIFS layers were not complaining about that (we had other problems related to the MLC constraints).
What's your controller?

Regards,

Boris

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nandubi.tar.gz
Type: application/x-gzip
Size: 26110 bytes
Desc: nandubi.tar.gz
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20170411/9295d08b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: increase-LEB-PEB-max-size-to-4M.PATCH
Type: application/octet-stream
Size: 826 bytes
Desc: increase-LEB-PEB-max-size-to-4M.PATCH
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20170411/9295d08b/attachment-0001.obj>


More information about the linux-mtd mailing list