From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7DC0C12002 for ; Sat, 17 Jul 2021 01:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78BD8613F2 for ; Sat, 17 Jul 2021 01:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233029AbhGQB67 (ORCPT ); Fri, 16 Jul 2021 21:58:59 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:15031 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232319AbhGQB65 (ORCPT ); Fri, 16 Jul 2021 21:58:57 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GRWMX1H3SzZm1l; Sat, 17 Jul 2021 09:52:40 +0800 (CST) Received: from [10.174.178.125] (10.174.178.125) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 17 Jul 2021 09:55:59 +0800 Subject: Re: [PATCH] mtd: fix size in mtd_info_user to support 64-bit To: Rob Landley , Miquel Raynal CC: , , , , , , , References: <20210708131359.21591-1-linmiaohe@huawei.com> <20210716010224.44582046@xps13> <95e3d455-ccb1-0e22-ee83-78dc6ad8aab1@huawei.com> <20210716114808.246e92ba@xps13> From: Miaohe Lin Message-ID: <91b48a5d-3a33-2a8f-8b8d-9ebeb31a8ec6@huawei.com> Date: Sat, 17 Jul 2021 09:55:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/7/16 21:34, Rob Landley wrote: > On 7/16/21 4:48 AM, Miquel Raynal wrote: >> Hi Miaohe, >> >> Miaohe Lin wrote on Fri, 16 Jul 2021 09:42:19 >> +0800: >> >>> On 2021/7/16 7:02, Miquel Raynal wrote: >>>> Hi Miaohe, >>>> >>>> Miaohe Lin wrote on Thu, 8 Jul 2021 21:13:59 >>>> +0800: >>>> >>>>> From: Feilong Lin >>>>> >>>>> 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! :)