From patchwork Mon May 15 13:48:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Nan X-Patchwork-Id: 9358 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6936862vqo; Mon, 15 May 2023 06:53:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6f/xI/wk3ZkMjeF/SShi5gV7w4+Aso7wP3XhPOZg+bm677EoXglL4Rg+ubuuoJJ6jzj6ND X-Received: by 2002:a17:902:c40a:b0:1ab:1624:38cf with SMTP id k10-20020a170902c40a00b001ab162438cfmr52081500plk.60.1684158789498; Mon, 15 May 2023 06:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684158789; cv=none; d=google.com; s=arc-20160816; b=YTCJsAKLvdD6IIKsQQhl1wlpUZGIrrOY4x38gBCGM/xYyqln0bX6p5JMH1tp80dZ0L s9tRa/00AbSjj9MnKX8R8Mo7TU+Wv1Ozn9fD38QLFwhCbxh4ZsF2kjYc3KEwZIPMwlTu nFeQ9BUTkTzmisfmlxuLxCFnq+e0Es5Q6bNe9Qw6IXaY1whKcnR3aGrJS7pOP7AZjf9P ev7aEh+Xw3Vpl+14DcFvk12kHNQaSp2jX5bwsMB1SKuHF/F3pW9/pedqQQ/wYrcT4sMk Z68kn+tfwf7aQbT20lOH4NrZ5rsFxGlXGcdGUWQ2UP/bDpH5nyMLHUDGTQynxn+2qTrl cNsw== 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=mk6cksjbTBUailjOYpgwiKaSKWUjDZtBJsyfHnMzTWw=; b=X5GZeiAFzIS5cwzgEkkvy7uG8PjNiSnD05hHkECilq4pcuQ+xFYBvbh1RriEW7qBUN iOyPsnx6IHceyqgXhR1JVszexbYBDp9cSh1/bi67H4Cu0I1t86g4Y8rzQxfZjVgnObn0 sUNLHTFJPeNONiinLAlvKHrZOnsp0b1FRi8rcWhgGNKDqwaXV8DMLDWA70xEL0pfPf+V kx22lIk68tdR+mmITAQQNXJ7vJRVPUU4gnEQkkJR+pdUncacxJJz3paE9Q+LBJLtFkYb aQtTo7yW3yX1UkynXs7JOQz0mMY/COXFsPeSNfdICUdoGPuCkz1GyQYvJOnpRrz+z9L4 7mdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz11-20020a170902ef8b00b001aadb0b0359si15624048plb.290.2023.05.15.06.52.56; Mon, 15 May 2023 06:53:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbjEONtj (ORCPT + 99 others); Mon, 15 May 2023 09:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232128AbjEONtg (ORCPT ); Mon, 15 May 2023 09:49:36 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF8A10F1; Mon, 15 May 2023 06:49:34 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4QKghn13qDz4f3nTp; Mon, 15 May 2023 21:49:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgCnD7NoOGJkNcUBJg--.7104S4; Mon, 15 May 2023 21:49:30 +0800 (CST) From: linan666@huaweicloud.com To: song@kernel.org, neilb@suse.de, Rob.Becker@riverbed.com Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linan122@huawei.com, yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com Subject: [PATCH OLK-5.10 v3 0/4] md: bugfix of writing raid sysfs Date: Mon, 15 May 2023 21:48:04 +0800 Message-Id: <20230515134808.3936750-1-linan666@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: gCh0CgCnD7NoOGJkNcUBJg--.7104S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr4kZF17WF4ktr1ktFWrKrg_yoWDXrcEqF W0qa45tr1xXFW3JasrurnxArWUCa1jg3ZrJa1DtF4avw17Zry0qr40yrs5XF4rXrZ2vF15 AryxCr18ArnayjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb3xYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxV AFwI0_GcCE3s1lnxkEFVAIw20F6cxK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAq x4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14 v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02 628vn2kIc2xKxwAKzVCY07xG64k0F24l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7 v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF 1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIx AIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0D MIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvf C2KfnxnUUI43ZEXa7IU1kpnJUUUUU== X-CM-SenderInfo: polqt0awwwqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, MAY_BE_FORGED,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765968486858881938?= X-GMAIL-MSGID: =?utf-8?q?1765968486858881938?= From: Li Nan The patch series fix the bug of writing raid sysfs. Changes in v2: - in patch 1, move check out of md_bitmap_checkpage(). - in patch 2, use div64_u64() and DIV64_U64_ROUND_UP() instead of directly '/', and chang old_delay/old_delay to unsigned int. - in patch 4, use 'goto' to make changes more readable. Changes in v2: - add patch "md/raid10: optimize check_decay_read_errors()". - in patch 2, return ret-value of strict_strtoul_scaled if error occurs. - in patch 3, optimize format. Li Nan (4): md/raid10: fix slab-out-of-bounds in md_bitmap_get_counter md/raid10: fix overflow in safe_delay_store md/raid10: fix wrong setting of max_corr_read_errors md/raid10: optimize check_decay_read_errors() drivers/md/md-bitmap.c | 17 ++++----- drivers/md/md.c | 78 ++++++++++++++++++++++++++---------------- drivers/md/raid10.c | 41 +++++++++++++--------- 3 files changed, 82 insertions(+), 54 deletions(-)