Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp127227rdf; Mon, 20 Nov 2023 19:25:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkxGXsV16wAZ8leaVsnMqBQ4+VdSwJotDglWvH0lpBtTdQSkYhonzT2EiMQJFpXQfqZS82 X-Received: by 2002:a05:6a00:f07:b0:6cb:b818:c7fc with SMTP id cr7-20020a056a000f0700b006cbb818c7fcmr2739602pfb.23.1700537145766; Mon, 20 Nov 2023 19:25:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700537145; cv=none; d=google.com; s=arc-20160816; b=cYMpC7nVa3B8d4RgoBYDY4QqUGL9XRFsIko3ixRz9KAMDdO1KGfT2+i+HFdflYNtPt E0mQTW9KOfL1Yt7KdIfDJk0rHpOUjgy7vjprH/fz8X00SyCxfF6oenvDO1YSgbpSSjhD f3FhoinBb3C7xcyTh9zpgQndr3LO8iVKqhrur51jCNlzf73VC7+/iYD4L5Q58pqLqJoZ Of91J79USafD10V6O/bA1kzFVGqEyDJjVzB5IzTxRZKTAaDzVCC0JUSccbrg448wPxeW mgcjZt65k2fiuTh8pVmbMp1rHZ1TPU+PwpyBX5jrU53m5rOk4ev1y0Ppd5LPv7HK+u5s n3QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tgzHmIGpICn40H/u1/4FCgIyFTq1k2ITOFrPwfuXPRY=; fh=+aPRztbKCBcYYBe1z1e9lnAT8RWJ2WYlO7mGAj5wSt0=; b=Ptwni7RwS2Z4bxo2dnZRCiwwWcNRMagfrjeFqf0OwtOoljEmAUoMuWXpR+Bp4rbL1U KnRzpg8KJBI2yhMcSAc0lmEodVFhjFiuDsMPyHafYv+0aLrpf91KUThRlp+MqScXj/8s wjNKS2Mpqe8x/swzLETeVSxOyhEziODXJN3BE5HhG/IAD3NHjKoVT99jwRYZzy6QIx80 REOObSWAixLb77ahtnf5uDrg4URDLG0bkN2zutNXeN8VM0dr8m9qQmz/aKrsoMVVB5E+ UgqhXotZJEarRpQAM4h1V7CtA5EMetfVF+XlHzuZx7WHb90prV6CbZ1cSGkslX1LDcxa 5Lsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s1-20020a056a0008c100b006be0f482c0fsi10191468pfu.63.2023.11.20.19.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 19:25:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7B672801E876; Mon, 20 Nov 2023 19:25:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233116AbjKUDZg (ORCPT + 99 others); Mon, 20 Nov 2023 22:25:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjKUDZf (ORCPT ); Mon, 20 Nov 2023 22:25:35 -0500 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CE7DC; Mon, 20 Nov 2023 19:25:31 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4SZ8s26KBsz4f3jrm; Tue, 21 Nov 2023 11:25:26 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 78BEB1A05D0; Tue, 21 Nov 2023 11:25:28 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgDX2xEmI1xlv3EABg--.26174S4; Tue, 21 Nov 2023 11:25:28 +0800 (CST) From: Yu Kuai To: ming.lei@redhat.com, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH v2 0/2] block: warn once for each partition in bio_check_ro() Date: Tue, 21 Nov 2023 19:19:25 +0800 Message-Id: <20231121111927.2021846-1-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgDX2xEmI1xlv3EABg--.26174S4 X-Coremail-Antispam: 1UD129KBjvdXoWrKryxZFy3JF1fKFyxKw1UGFg_yoWxtrg_JF y0kFWrJr4fXayrCFWIyF1qyrW2kr4Iyw1UJFyqyr4DXr17XF1Utw47t3yUCFsxWFsrCwn8 JF18Wry8Xr1xGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbxkFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28lY4IEw2IIxx k0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK 6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7 xvwVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40E FcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr 0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8v x2IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F4 0E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFyl IxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxV AFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_ Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7sRi Pl1DUUUUU== X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 19:25:44 -0800 (PST) From: Yu Kuai Changes in v2: - don't use test/set_bit() for new field, because unsigned long will cause that some field can't be placed in the first cacheline(64 bytes), use unsigned int for new field and test/set/clear it like 'bio->bi_flags'. Yu Kuai (2): block: introduce new field flags in block_device block: warn once for each partition in bio_check_ro() block/bdev.c | 15 ++++++++------- block/blk-core.c | 21 +++++++++++++++------ block/genhd.c | 15 +++++++++++---- block/ioctl.c | 6 +++++- include/linux/blk_types.h | 28 ++++++++++++++++++++++------ include/linux/blkdev.h | 5 +++-- 6 files changed, 64 insertions(+), 26 deletions(-) -- 2.39.2