[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR02MB57272E3343CA62ADBA0F97E5AF420@MN2PR02MB5727.namprd02.prod.outlook.com>
Date: Tue, 3 Dec 2019 09:00:11 +0000
From: Naga Sureshkumar Relli <nagasure@...inx.com>
To: Sascha Hauer <s.hauer@...gutronix.de>
CC: Richard Weinberger <richard@....at>,
Miquel Raynal <miquel.raynal@...tlin.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
Michal Simek <michals@...inx.com>,
"siva.durga.paladugu@...ilnx.com" <siva.durga.paladugu@...ilnx.com>
Subject: RE: ubifs mount failure
Hi Sascha,
> -----Original Message-----
> From: Sascha Hauer <s.hauer@...gutronix.de>
> Sent: Tuesday, December 3, 2019 2:12 PM
> To: Naga Sureshkumar Relli <nagasure@...inx.com>
> Cc: Richard Weinberger <richard@....at>; Miquel Raynal <miquel.raynal@...tlin.com>;
> linux-kernel@...r.kernel.org; linux-mtd@...ts.infradead.org; Michal Simek
> <michals@...inx.com>; siva.durga.paladugu@...ilnx.com
> Subject: Re: ubifs mount failure
>
> Hi,
>
> On Tue, Dec 03, 2019 at 04:52:32AM +0000, Naga Sureshkumar Relli wrote:
> > Hi,
> >
> >
> >
> > We have upgraded our Linux kernel to 5.4 from 4.19.
> >
> > And I tried mounting ubifs using this kernel on NAND partition with below
> > command and saw that
> >
> > There is an issue with memory allocation.
> >
> > #mount -t ubifs ubi0:data /mnt/
> >
> > mount: mounting ubi0:data on /mnt/ failed: Cannot allocate memory
> >
> >
> >
> > I saw that there is a commit on fs/ubifs/sb.c, where it is allocating all
> > the required memories at one shot.
> >
> > [1]https://lkml.org/lkml/2018/9/7/724
> >
> > By reverting the above patch, I am able to mount successfully the ubifs.
> >
> > By reverting this patch, we are allocating, writing and freeing in a
> > manner such that, we don’t see memory allocation issues.
>
> Sorry, I can't see how this patch causes failing memory allocations. And no, this is not
> expected. Could you sprinkle some printks and track down where it fails? Is it the obvious
> place here:
Yes, it is failing in this place only.
>
> if (!sup || !mst || !idx || !ino || !cs) {
> err = -ENOMEM;
> goto out;
> }
>
> If yes, which allocation fails and how much memory did we try to allocate?
Failing at indexing node(idx) allocation
https://elixir.bootlin.com/linux/v5.4/source/fs/ubifs/sb.c#L164
we are trying to allocate 4325376 (~4MB)
> If no, where does it fail? Also, where are you using UBIFS. Is it NAND flash or NOR flash?
It is on NAND flash.
Thanks,
Naga Sureshkumar Relli
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists