lkml.org 
[lkml]   [2021]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mtd: fix size in mtd_info_user to support 64-bit
From
Date
On 2021/7/16 21:34, Rob Landley wrote:
> On 7/16/21 4:48 AM, Miquel Raynal wrote:
>> Hi Miaohe,
>>
>> Miaohe Lin <linmiaohe@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@huawei.com> wrote on Thu, 8 Jul 2021 21:13:59
>>>> +0800:
>>>>
>>>>> From: Feilong Lin <linfeilong@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.
>
> Twelve years ago a patch was submitted to add a 64 bit MTD api:
>
> https://lwn.net/Articles/326418/
>
> But for some reason they only merged 64 bit erase:
>
> https://github.com/torvalds/linux/commit/0dc54e9f33e2
>
> But NOT the rest of the 64 bit mtd API in the same patch. I've never understood why.
>
> Rob
> .
>

Many thanks for both of you! This really helps! :)

\
 
 \ /
  Last update: 2021-07-17 03:57    [W:0.107 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site