From patchwork Mon Jan 16 20:50:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13102998 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 CFB20C63797 for ; Mon, 16 Jan 2023 12:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjAPMz1 (ORCPT ); Mon, 16 Jan 2023 07:55:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjAPMy5 (ORCPT ); Mon, 16 Jan 2023 07:54:57 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5285D1EFE7; Mon, 16 Jan 2023 04:52:34 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NwX3v0y71z4f419B; Mon, 16 Jan 2023 20:52:27 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgBH7uuMSMVjYH02Bw--.361S2; Mon, 16 Jan 2023 20:52:29 +0800 (CST) From: Kemeng Shi To: jack@suse.cz, axboe@kernel.dk Cc: kbusch@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v3 0/5] A few bugfix and cleanup patches for sbitmap Date: Tue, 17 Jan 2023 04:50:54 +0800 Message-Id: <20230116205059.3821738-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CM-TRANSID: Syh0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Fpf9x0p RVc_3UUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi, this series contain a bugfix patch to correct wake_batch recalculation to avoid potential IO hung and a few cleanup patches to remove unnecessary check and repeat code in sbitmap. Thanks. --- v3: -Thank Jan for review. Collect Reviewed-by from Jan for all patches. -some cleanups according to recommends from Jan: 1)Add Fixes tag in patch 2/5 "sbitmap: remove redundant check in __sbitmap_queue_get_batch" 2)Avoid lines over 80 characters in patch 3/5 "sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code" 3)Remove pointless line in patch 4/5 "sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow" --- v2: -add patch "sbitmap: correct wake_batch recalculation to avoid potential IO hung" --- Kemeng Shi (5): sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow sbitmap: remove redundant check in __sbitmap_queue_get_batch sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow sbitmap: correct wake_batch recalculation to avoid potential IO hung lib/sbitmap.c | 102 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 57 deletions(-)