From patchwork Fri Jan 13 11:52:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 13100629 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 4DB25C54EBE for ; Fri, 13 Jan 2023 11:37:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241282AbjAMLhN (ORCPT ); Fri, 13 Jan 2023 06:37:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233109AbjAMLgr (ORCPT ); Fri, 13 Jan 2023 06:36:47 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1347081C25; Fri, 13 Jan 2023 03:23:47 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NtfDq0TWrz4f4bmv; Fri, 13 Jan 2023 19:23:39 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgBXwLM6P8Fj7hGXBg--.28092S4; Fri, 13 Jan 2023 19:23:40 +0800 (CST) From: Hou Tao To: linux-cachefs@redhat.com Cc: David Howells , Jeff Layton , linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jingbo Xu , houtao1@huawei.com Subject: [PATCH v3 0/2] Fixes for fscache volume operations Date: Fri, 13 Jan 2023 19:52:09 +0800 Message-Id: <20230113115211.2895845-1-houtao@huaweicloud.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-C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pzhluzxrxghudrp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Hou Tao Hi, The patchset includes two fixes for fscache volume operations: patch 1 fixes the hang problem during volume acquisition when the volume acquisition process waits for the freeing of relinquished volume, patch 2 adds the missing memory barrier in fscache_create_volume_work() and it is spotted through code review when checking whether or not these is missing smp_mb() before invoking wake_up_bit(). Comments are always welcome. Chang Log: v3: * Use clear_and_wake_up_bit() helper (Suggested by Jingbo Xu) * Tidy up commit message and add Reviewed-by tag v2: https://listman.redhat.com/archives/linux-cachefs/2022-December/007402.html * rebased on v6.1-rc1 * Patch 1: use wait_on_bit() instead (Suggested by David) * Patch 2: add the missing smp_mb() in fscache_create_volume_work() v1: https://listman.redhat.com/archives/linux-cachefs/2022-December/007384.html Hou Tao (2): fscache: Use wait_on_bit() to wait for the freeing of relinquished volume fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() fs/fscache/volume.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)