Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp21057pxb; Tue, 12 Apr 2022 15:38:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ7OX0zmon9/MAbbKCL2vWqiP9+ttqGfc/KYZyNRr4RlsnSiMmVGh3ed7VdRAd+1Gn/nbV X-Received: by 2002:a17:90b:4a47:b0:1cb:a359:6a39 with SMTP id lb7-20020a17090b4a4700b001cba3596a39mr7407673pjb.163.1649803122989; Tue, 12 Apr 2022 15:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649803122; cv=none; d=google.com; s=arc-20160816; b=NkcCtqnxeoJMDAm3uuZ8mFV5OdAKxFHZApsZK8coDqpJH/kOCf7KB5PJlsiH2iixcK aPZhK82qBRLuM4Phnnr+V3vgB1/C1V9WyHfTtBWyZIFh2xoobse6XY9+0g3JMqlmVQHi KWPnsK2/yWEGRpenI4f6535q7yIRezkZzxeSjwcTVO/uf0xihiwhX4rt32HBnxNsWu01 rocwDmG7AEIl6h3jAnYkoXVxrDo8JPSwKYyZLOMatwt4VkpMvnCc8DK+jYGzePCnDItY qJC2eJxKiK9KWavjZMVdYZpa30EcO02D5u2mROPg0jT9SzbQ8peTXENWzkPgesRbUamN TMZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=s/Bwip0EbgIHLBZtJM96nXGyW0WOvATodmBqZPPM7cY=; b=vNLEEQC0TN0IaMgcCn+/gZ6cXLZtwhJ2supiA0m6VB+/SQyQeVUNLevbJcTNFTsMGd cHd53zQVtUFNmFWnDMWrl4o8BR5VIYKJdtQr7xdiPK3W5d3+kecgYYfV/D1u9ipwkYwp bvw/Fah2NZyGEXkDmekT8R9S52uUcLQYoHHpxSfzkp2l/WUE9AF5E/abv2MWNxAI1Rqd PhCK9N86U7vl1BwDHqtuSwFkRpKQyXvoThnyNIS6LMaCoaVEiWYUR6AFaJOUG/W8Ci7I 6g686tRQv7+mFsf4zKVl/VO2VNo0BgZ/4XpxiuB0S15vpyIk4Oq/B009ud8JZoKzRFu1 6CFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=QbvslhXI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y1-20020a655a01000000b003816043ef5esi2811841pgs.339.2022.04.12.15.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:38:42 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=QbvslhXI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 658941A48AD; Tue, 12 Apr 2022 14:16:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348335AbiDLFuX (ORCPT + 99 others); Tue, 12 Apr 2022 01:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347031AbiDLFuU (ORCPT ); Tue, 12 Apr 2022 01:50:20 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 566F629804 for ; Mon, 11 Apr 2022 22:48:04 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id h14so25196726lfl.2 for ; Mon, 11 Apr 2022 22:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s/Bwip0EbgIHLBZtJM96nXGyW0WOvATodmBqZPPM7cY=; b=QbvslhXIWcVihs2/1cCG1xx91Oc5mnEJqi86MopVrkAZNGNZAV9AgY1MXfnCYHJDG/ m/oq0mrkRpKWu2ycwX9aa+9AJjShS/4Ez4O9Wv4Q/O8K91h7u937nLuWkcKGEHGkUc4h cYswC1OGPs3bbvwOqWxjKjF+4YQhZjsaSlPoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s/Bwip0EbgIHLBZtJM96nXGyW0WOvATodmBqZPPM7cY=; b=GeGHhk4aN2R9swiA8acaALv2DJvQ+ByhPae0kPKDc586uIt183uV6Q9fVJDIgsMoxS H4ohorIJS5mHJ04+snxVFpN0KQsLR9I+Au7PizdH4gPKrIxAKbXPQLbjQFb5g065JejT 5kbHOvOjhA9EIUADE1V2ShIb5TJlnEdHPP5rJJFlAXjcjjE9baI1IfQXc2PY4jJoU1d0 Lq/fu/x5oceq70pdvn4V7CwAl1693PIuDJTLT0ykERNEY2Iuzsi2J/QTNH0N8GvsBu9M eGxGA3rU7WRcs4SGjSqzL6Ep15zvPUJiTtaOw2ePZPzrsiR678Md2pj1y25pl+L1NgAu QxVw== X-Gm-Message-State: AOAM532MleZerilqZWu8KZx+rL2XrNu5av2MrMfmnI/67GZSbAtii/8J iUywen7yoz24G4O/s6/SkDSX5FmCw2XNszre X-Received: by 2002:a05:6512:401e:b0:46b:a876:3023 with SMTP id br30-20020a056512401e00b0046ba8763023mr5355480lfb.386.1649742482323; Mon, 11 Apr 2022 22:48:02 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id p12-20020a056512138c00b0044833f1cd85sm3534833lfa.62.2022.04.11.22.48.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Apr 2022 22:48:01 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id 17so22740273lji.1 for ; Mon, 11 Apr 2022 22:48:00 -0700 (PDT) X-Received: by 2002:a2e:94c5:0:b0:24b:7029:75eb with SMTP id r5-20020a2e94c5000000b0024b702975ebmr1364165ljh.506.1649742480179; Mon, 11 Apr 2022 22:48:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 11 Apr 2022 19:47:44 -1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] stat: don't fail if the major number is >= 256 To: Christoph Hellwig Cc: Mikulas Patocka , Alexander Viro , linux-fsdevel , Linux Kernel Mailing List , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 11, 2022 at 7:41 PM Christoph Hellwig wrote: > > And that is easily fixed by using a lower major for the block dynamic > dev_t. In theory userspace should be able to copy with any major for > it, but I fear something might break so we could make it configurable. We actually have a ton of major numbers free, although it's not obvious because of the whole "they are used by character devices, not block devices" issue. Ie 4-6, 12, 14, 19 are all free, afaik. But yeah, somebody might have a static /dev for some odd embedded case, I guess. That said, it really does look like we just return -EOVERFLOW much too eagerly, for stupid and bad reasons. Considering that BLOCK_EXT_MAJOR has been 259 since 2008, and this is the first time anybody has hit this, I don't think there's much reason to change that major number when the whole error case seems to have been largely a mistake to begin with. Linus