Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp352077pxv; Thu, 22 Jul 2021 01:31:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF3arTDJc6jJn57fkDdkOwMU33TMCZ4ypH2eRJxe/YbmaQTdwQl4FL/W154CVx68njdcn2 X-Received: by 2002:a02:c95a:: with SMTP id u26mr35262260jao.49.1626942705487; Thu, 22 Jul 2021 01:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626942705; cv=none; d=google.com; s=arc-20160816; b=EpvBEeIz4We2UFFJMKViJ5J9YxoPNlu4dGMoIQyJDrHCKFuhxdRhTBoykKE5a3hcfu Xk45mqHtdTuvRQSoHMByUDFjMbzBwqJf6lt6riTS/zcBVwR2mLE468+H1MX9UI5g/YX4 ROTMmq7FEf29GEtIJQg8ccMdaUphVLu/8RtycdB7J6MNFSFKl8r2DwWjMT/29TXw8gVN yNvjaCuaJs92h96Hm2RPlUk+8wEIts2rqFh8B9cU2L+CErXIhW0NGggBaT9JCc0Lo55x /XdKjWQT/mdHmGbhL2XoWG8Q+FiLuA5m9Pd8CiE0YkIh2WK1yOc5ylmSNOt3caWRP7Wh 2VIg== 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:references:cc :to:from:subject:dkim-signature; bh=fYbztYoVjZgOeHTU+hwjUgQL+Xi95TvcDcwtmr8It80=; b=Gkp0XY92w5B8dtesSSzGEeY6LhztD9OSe2Py8klCVtg7LicfLoTiadYPsGWQiRUvoq /m0brvkVvaglvS8oK3eCEvJJsU6lbBYJVvdE2K5oAOZN5KOFDhtU1og+JWZdCjDyznZ9 Xo+hRm/rwHCPyxNkN4Kb5nWOAEkL7BFAMCkqGSAdf4S/6djI3V6Gc6XU4DWMihLchFSd fgjrtHGg6RcnZGTzYVnznx+Ga/KS6jxMUoj8u4MaPFB62ZUajiIILoGyTMmddi/Ul6iJ CIUgY44X+MQiTetmZkVE7a03kukj4htNhC2dH4E6oRw6oHkHu32WHkrxN1EroBQw4gHd 31ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=1iLSGKTo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si30290018ils.86.2021.07.22.01.31.34; Thu, 22 Jul 2021 01:31:45 -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; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=1iLSGKTo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbhGVHtY (ORCPT + 99 others); Thu, 22 Jul 2021 03:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbhGVHtX (ORCPT ); Thu, 22 Jul 2021 03:49:23 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549F0C061575 for ; Thu, 22 Jul 2021 01:29:58 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id h24-20020a9d64180000b029036edcf8f9a6so4585589otl.3 for ; Thu, 22 Jul 2021 01:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fYbztYoVjZgOeHTU+hwjUgQL+Xi95TvcDcwtmr8It80=; b=1iLSGKTozk/lPo6Q8/ym67DuarP0UWIPLn8w8u5O/Nd4M2rSwvKkQzFdU68NaADPe+ DLHUwWPXh7gvZFJvKvOgDernTfxnVnbXOse2kdtdAIXQv8DhDxDmgsUXfkzawmjC0YVy UnTnyxoc5te76Z0gvMZivgHJgQZztljfOwrM0H2WhBJ6zwharnDf10lkvetDdxyq16U8 2iM5Tm3RzXlk8z8l+5uUUQkHL9KpWwSB2iuUbrg7ur3rlytlirZ9jz2DZvP28dX6cStV VN7uHKfcCGz7RSIoVMQ85nKF9xKjUV2SoYnlN7BUeeY+7BGG0kiVdrNlTJkrLvX6JSVm wu5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fYbztYoVjZgOeHTU+hwjUgQL+Xi95TvcDcwtmr8It80=; b=KVfayTP29N7HXPNxcAxVO9J9F0QrzUuGyh2uTtsDY9d/IXkmTn4g3tme10KcaOLW9x JcglsLmtfTVALQzI8UugsVRf8+viq3IzHHxoQvLv/rROmH8pm6gxdMcg4/EgVRjYqvzw 2JzMAKIeME3lHkff/YuDOoHGUYIt4xbPbYWaibm7p1CL2qwkuGG2qnuKoldx2MFgyw4s 3w8oQkVzTJFELCbr222OY90fymey6YQO8cpH9m11deRTjDiSHFPQhAKvfh8SNa2hEPIw 8Yz8+sEgSyYKH5g//7tW3nQKhV29Em3ysTEqf8m8DHGwom5kadAEYIATV4202AwCQzJU Ebow== X-Gm-Message-State: AOAM5325yPByWkEBj0LCbJ6RuUuOqpB6fSJNyroVPzOReFG77E3hFDkH /GvbF3WSJkcEEGF4ZZ0A395kyA== X-Received: by 2002:a9d:404b:: with SMTP id o11mr11155386oti.41.1626942597788; Thu, 22 Jul 2021 01:29:57 -0700 (PDT) Received: from ?IPv6:2607:fb90:c28f:4e7b:6680:99ff:fe6f:cb54? ([2607:fb90:c28f:4e7b:6680:99ff:fe6f:cb54]) by smtp.gmail.com with ESMTPSA id k13sm5030391otl.50.2021.07.22.01.29.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jul 2021 01:29:56 -0700 (PDT) Subject: Re: [PATCH] mtd: fix size in mtd_info_user to support 64-bit From: Rob Landley To: Miquel Raynal , Miaohe Lin Cc: richard@nod.at, vigneshr@ti.com, David.Woodhouse@intel.com, Artem.Bityutskiy@nokia.com, ext-adrian.hunter@nokia.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linfeilong@huawei.com References: <20210708131359.21591-1-linmiaohe@huawei.com> <20210716010224.44582046@xps13> <95e3d455-ccb1-0e22-ee83-78dc6ad8aab1@huawei.com> <20210716114808.246e92ba@xps13> Message-ID: Date: Thu, 22 Jul 2021 03:47:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/16/21 8:34 AM, Rob Landley wrote: >> 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. That said, the workaround is to use the info api for erase size and use lseek(SEEK_END) on the device to get the length. Rob