Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1808415pxv; Fri, 16 Jul 2021 18:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgcCp70LwAi6dYgwJ+LNs2MDu+goEmv+ZBptfMar3L9cpuQmiJ47GBtw/R18ObGWWQ4VlU X-Received: by 2002:a05:6402:312d:: with SMTP id dd13mr18472428edb.348.1626487054517; Fri, 16 Jul 2021 18:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626487054; cv=none; d=google.com; s=arc-20160816; b=ci86iSeq5M+ly/fK3gIjXCc2lS1/EJoXy+3EDRZMBDwDfOPJcfBrspLSLe1qvpDxcd JJwEw1Av+jCcbjI/u5F/i9jOhi20jH3TALKoj/uH+awC1DoKKUnbJAOhh6E8197bncWT UKyTv5nxUd4Obes4f76l0uWR3MzVFDBlW/zsNN69xb9MVjYAkxVr96zqbTR/VshqlnVW DBMgegdBRNncxWi1f+qanLJq2uxH+eUpJtMfCjS20cAsgnUNMk2kIYYkqkoeKnTeimG1 Ghap3N8yOE7x71cLaDTp/EnJFHyXgXyL+Oliy0sOecg3IvyJpKvt0aPxYA+kvCGc9Llr Ll4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Bb4gypPnn7ZlSvggbipClwVxiD5AtP0+qjn/kdT4wCM=; b=wYiu0YXxC6Yv7SiwL6azkCGvDoSaAq3PWd9B7tdCFYK6vQGyU2DcrpuulzjMtYYJq5 93e7CB8+ehLxElEwY7w4z6KV0/uQW01x2czsGOhSQcDN73qD2FjNZuv4Zp+Xnm0yI7P6 AkiDd3IkKoFsqfpSd7e1WiOQt4AEDgxo0kZ7s7PoWRIq67T3akBK0SFXgvN+dPNBUhWY Sz0Hm9cO4kXo/1aSg9rSA5zmsAkaHgglIxIADzbeXh81I7HYefBIiIfMzYLLfAhJTYvV DqftBQ0turd6NkDRXAGOJSt2MmBAeEhX4CKKGQIPYYTJxDL6hUqi2kP1wO1cRbGs2OL4 DrbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si13011240ejx.283.2021.07.16.18.57.11; Fri, 16 Jul 2021 18:57:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232798AbhGQB66 (ORCPT + 99 others); Fri, 16 Jul 2021 21:58:58 -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! :)