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: 13241532 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDF60C7EE22 for ; Mon, 15 May 2023 13:49:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233374AbjEONti (ORCPT ); Mon, 15 May 2023 09:49:38 -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: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IEc7CjxVAFwI0_Jr0_GrUvcSsGvf C2KfnxnUUI43ZEXa7IU1kpnJUUUUU== X-CM-SenderInfo: polqt0awwwqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org 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(-)