[PATCH] mtd: fix size in mtd_info_user to support 64-bit

Miquel Raynal miquel.raynal at bootlin.com
Fri Jul 16 02:48:08 PDT 2021


Hi Miaohe,

Miaohe Lin <linmiaohe at huawei.com> wrote on Fri, 16 Jul 2021 09:42:19
+0800:

> On 2021/7/16 7:02, Miquel Raynal wrote:
> > Hi Miaohe,
> > 
> > Miaohe Lin <linmiaohe at huawei.com> wrote on Thu, 8 Jul 2021 21:13:59
> > +0800:
> >   
> >> From: Feilong Lin <linfeilong at huawei.com>
> >>
> >> The size in struct mtd_info_user is 32-bit, which will cause errors
> >> when obtaining the size of large-capacity MTD devices, such as TLC
> >> NAND FLASH-2048Gb.  
> > 
> > Besides the fact that such devices are far from being supported by the
> > Linux kernel, this change would basically break userspace, it cannot
> > enter as-is...
> >   
> 
> I see. Many thanks for your reply! We're working with these large-capacity
> MTD devices now, any suggestion to work around this?

The only way is to create a second UAPI.

Thanks,
Miquèl



More information about the linux-mtd mailing list