From mboxrd@z Thu Jan 1 00:00:00 1970 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 pdx1-mailman-customer002.dreamhost.com (listserver-buz.dreamhost.com [69.163.136.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 188E1C05027 for ; Mon, 23 Jan 2023 23:08:30 +0000 (UTC) Received: from pdx1-mailman-customer002.dreamhost.com (localhost [127.0.0.1]) by pdx1-mailman-customer002.dreamhost.com (Postfix) with ESMTP id 4P15JB3Dljz215Q; Mon, 23 Jan 2023 15:03:54 -0800 (PST) Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pdx1-mailman-customer002.dreamhost.com (Postfix) with ESMTPS id 4P15F66xHGz1y56 for ; Mon, 23 Jan 2023 15:01:14 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 3203C6CA; Mon, 23 Jan 2023 18:00:58 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 2DFE658991; Mon, 23 Jan 2023 18:00:58 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Mon, 23 Jan 2023 18:00:20 -0500 Message-Id: <1674514855-15399-8-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1674514855-15399-1-git-send-email-jsimmons@infradead.org> References: <1674514855-15399-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 07/42] lustre: llite: wake_up after cl_object_kill X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lai Siyao , Lustre Development List MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Lai Siyao cl_inode_fini() calls cl_object_kill() to set LU_OBJECT_HEARD_BANSHEE, and then calls cl_object_put_last() to wait for object refcount to become one, It should wake_up() in the middle in case someone is waiting on the flag. WC-bug-id: https://jira.whamcloud.com/browse/LU-16308 Lustre-commit: 77107d8e78ffd952a ("LU-16308 llite: wake_up after cl_object_kill") Signed-off-by: Lai Siyao Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130 Reviewed-by: Neil Brown Reviewed-by: Zhenyu Xu Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/llite/lcommon_cl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/lustre/llite/lcommon_cl.c b/fs/lustre/llite/lcommon_cl.c index f0d8f78fc82b..2735d5c164f8 100644 --- a/fs/lustre/llite/lcommon_cl.c +++ b/fs/lustre/llite/lcommon_cl.c @@ -229,6 +229,11 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj) wq = lu_site_wq_from_fid(site, &header->loh_fid); + /* LU_OBJECT_HEARD_BANSHEE is set in cl_object_kill(), in case + * someone is waiting on this, wake up and then wait for object + * refcount becomes one. + */ + wake_up(wq); wait_event(*wq, atomic_read(&header->loh_ref) == 1); } -- 2.27.0 _______________________________________________ lustre-devel mailing list lustre-devel@lists.lustre.org http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org