From patchwork Mon Jun 26 08:09:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Nan X-Patchwork-Id: 11281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7326307vqr; Mon, 26 Jun 2023 01:28:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jns4D3SivhbTjCeyQODjmzXRLj0LOkEHJm40qQBee6JlayhxKbTdT9+Xm1h6K6jkyqwVh X-Received: by 2002:a17:907:6292:b0:983:ba44:48af with SMTP id nd18-20020a170907629200b00983ba4448afmr26088358ejc.53.1687768133404; Mon, 26 Jun 2023 01:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687768133; cv=none; d=google.com; s=arc-20160816; b=tDr8FYNrOM7t9fLJnnK/uRqqzwcDGPklwTFiXAfACedYjhM4JXhMLPvAsPE9etKz2i xiW7rC76bJs8QIs24N2ZTjkUIP6C7Au302fZhrn8GisDWxjaURtYeGbsIx4p7K8CMIFH YZoRhRyfqhne78WbgWiytou/NBh5d7G44uQQ+nNCKw/wwCYlaFmyE9rzo7yigoK+bMFG R8VPszFcYEHaT43dJklzh2Npkd0cXYWhLqILiUN5401CKFuYN+1qQHcUoD1Hgey3GpGy mIOcOZ2LHplfoE9JctJL6a1VJiVOdujDGmj6hQ3p6imFzJlzsAZJbFzrA740sR76SOn2 m2YQ== 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=TKpphoT3tjYOOGTV+YcB8G+fJeDfOYVM8r6vSuuSUS4=; fh=3eCKTJ3QhUFKE6vQUOdHlzlShegRylJTJnUErNRn6Gg=; b=W51CeTUW6FRSCWBTy5irLGB7sZel9VZtA1SbPVzUF/gD09qV5+PVAxIzpx6Et+XlwI dFYjh3elR9uz6M42UGge8/bNPBmOIKSlZB8UlJ1NarmGCEaOWHkFScllbM2zzB112pFp MJZo4BAIqRl5VFosXV25e2M82THtXztuntwgtQbRifMYM7qAA+T/tLE8SOODUsITDDqn Jjx++9dzHFOWf2pPvxUHlkSIrezC5J1c9c8aq8ib+ZiEmI7YH8nUA+uBMSFGoHjgDSzr KJtojd9vMKbevOf0uspM5v6PihEE6DqKZX6JZ4K9/GI/jSh093YDGumqtraTz+EqxRE6 8ubQ== 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 j21-20020a170906475500b00991ece4c960si125806ejs.480.2023.06.26.01.28.28; Mon, 26 Jun 2023 01:28:53 -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 S229763AbjFZIKS (ORCPT + 99 others); Mon, 26 Jun 2023 04:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjFZIKK (ORCPT ); Mon, 26 Jun 2023 04:10:10 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1CCA10D3; Mon, 26 Jun 2023 01:10:05 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4QqL9g4shsz4f3lKL; Mon, 26 Jun 2023 16:09:59 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgAHcLPWR5lkQbNDMg--.19922S4; Mon, 26 Jun 2023 16:10:00 +0800 (CST) From: linan666@huaweicloud.com To: axboe@kernel.dk, linan122@huawei.com, vishal.l.verma@intel.com, dan.j.williams@intel.com, ashok_raj@linux.intel.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com Subject: [PATCH v4 0/4] block/badblocks: fix badblocks setting error Date: Mon, 26 Jun 2023 16:09:09 +0800 Message-Id: <20230626080913.3493135-1-linan666@huaweicloud.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CM-TRANSID: gCh0CgAHcLPWR5lkQbNDMg--.19922S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw1UAr15JFy3ur1fAw4kCrg_yoWDKrg_ua y0yFyrGrs5XFW5Aay3tF15JrWIyF4UCr1rKFyUtrs3Xr17tF4Utan8JrZrXwnxWF4xGws8 Z3s5XrWfZr1IqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb3AYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2vYz4IE04k24VAvwVAKI4IrM2AIxVAIcxkEcVAq07x20xvEncxIr21l 5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67 AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7Cj xVA2Y2ka0xkIwI1lw4CEc2x0rVAKj4xxMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMI IF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq 3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCT nIWIevJa73UjIFyTuYvjxUwc_TUUUUU X-CM-SenderInfo: polqt0awwwqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, MAY_BE_FORGED,SPF_HELO_NONE,SPF_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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769753158364172709?= X-GMAIL-MSGID: =?utf-8?q?1769753158364172709?= From: Li Nan This patch series fixes some simple bugs of setting badblocks and optimizing struct badblocks. Coly Li has been trying to refactor badblocks in patch series "badblocks improvement for multiple bad block ranges" (https://lore.kernel.org/all/20220721121152.4180-1-colyli@suse.de). but the workload is significant. Before that, I will fix some easily triggered issues and optimize some code that does not conflict with Coly's changes. Changes in v4: - patch 1, remove the part of reorder fields - patch 3/4, improve commit log. Changes in v3: - delete patchs with significant changes. Li Nan (4): block/badblocks: change some members of badblocks to bool block/badblocks: only set bb->changed/unacked_exist when badblocks changes block/badblocks: fix badblocks loss when badblocks combine block/badblocks: fix the bug of reverse order include/linux/badblocks.h | 9 +++++---- block/badblocks.c | 38 ++++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 20 deletions(-)