Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp263056lqt; Thu, 6 Jun 2024 02:54:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7l60PjOyXL7DLQX3+Q5iJ39Gi3jCRmN/S5d+75dx/Bhc5OCHkaC3Yf5JjBpfZZvfQjOAzDgBk4dCb+TqrccnUJCVCJaSggLG/4mcwjw== X-Google-Smtp-Source: AGHT+IEYkTFd8ORmuzG3EmyYaH15jGVy+wkilctPAyIISWBWyEq8VRu3muWvDN5N7e2BuW7JYwJN X-Received: by 2002:ac5:cb54:0:b0:4eb:12da:14c7 with SMTP id 71dfb90a1353d-4eb3a3f3692mr5534683e0c.6.1717667642483; Thu, 06 Jun 2024 02:54:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717667642; cv=pass; d=google.com; s=arc-20160816; b=a8Gls1cQ4sVgOg4aAwnv+JBBQGxmjWAw3sUX3wnRT0fj0jd7sghLUdQIOmyuNqN9S9 M72zYDR10qCWI7IqpapudgTqvDd8Me8WNaCorgamcdrOdxbqosr1PLV37wFL7KjfqWTV iJ8e0pZ0btpDBprPNAlJe2UXRHGR+CrYWG09M0sE78j0FxZj5z6zbsxebXGpWueA5TzG 9qwUkDuTWiNGjEL/THPIBffaEGmkmqktpuTV2b8VePWc3xzp2jCeGUKhgfSSodtiRr5M N5HBYE8l57UHqonC7j4+0oZhV8eRN/rspYrOiecGQyz+r+cHMAeZgXaEqWpnUlaXALFp jHbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0Qtit0s+ubEdwb2l1dDcIyvlNhAk3ps4t2tuYcweImE=; fh=X1/oBJvTGJUQ0YtRp03u+3tPfRw/dXXALWynfOSlfQQ=; b=L9AlzLYbEfaaKT9Ua+sOGInKmd9yb6o1xtHe6Or7rKjvZFCln1XX9m3tsr+3ra819g yCaLXIYOF3EzipKKOMr0GBj/xPo+4xG4lcHVUICsvFMCSprV32L35JzLsMOs9bhQ84+r ZVoXq+x9R91/P4EGSmaplapwUH+WR3/2OE9sXfS6FuiaIj2FfoxVqAJvCHuZN9ftcZEY AoOEnHHWs9KDS5yBupiFUzbLY8VjOKmI8UB5lDKloRjDJrcIqCakkrU8wSiP34tIUR6F WBfd19n3sXP39CnJaEMEp/BJi3VJqPaELld00Ssg7umte7W5z+OC61ble7B+NNk7jFD6 KH3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oV1szKEX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-79532854613si104467885a.22.2024.06.06.02.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oV1szKEX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D2FB91C24D82 for ; Thu, 6 Jun 2024 09:53:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E748B17F38C; Thu, 6 Jun 2024 09:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oV1szKEX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2343717E91B for ; Thu, 6 Jun 2024 09:52:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667547; cv=none; b=QKN9bPxMbYGSa66aAyY+ISxiEO/8sPD4HRU35FtegOY4aDb2kqPV/0AoV4Z4s4KBJzj410N9BwuWQBwZk8EoQ7RQcT3glM++RCoPfd7oDIg8/mKZAl9V8+5Vo1pCi+gpHo3KKrPJ8v6YrWfU/BXjtLPcuO777rqz8quLIcrEU0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667547; c=relaxed/simple; bh=1A4x52edkxk15o++tyYBiiibRgkm7p/CeiPX3AK72eo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ejhzJVyn61iJ8vDw/y5VyNJdzpc/CSDTilEaK4KgZFOH35iNkiE9T1TnrHmiv3lhG7elsLzKimAJ8nX5siISQJVOF30C23vSlT6khbdgH43HbhK/8SnaO3WP8IbqCK3kZQnhInpIzr0mLa/Wd8vS+qEn/PiQgCmDafhdmw2RNjA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oV1szKEX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92FD0C4AF0D; Thu, 6 Jun 2024 09:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717667546; bh=1A4x52edkxk15o++tyYBiiibRgkm7p/CeiPX3AK72eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oV1szKEXx6PIDhSbDwjHlwMXPTlD3x5MY2IXcNWWkyCBSwTAi4TTEqjoO82yl/M3V wexutYQvf6Us0ZnAb3IVk5F0DOHvq/HHBJc3K0nqvJ8R4Ls3xScHAUNMQEt00vBuTO qJ8zEjiMTFZVKYGKoFBPDM7j19NjNhiCuXhjhLhOctvqM/mVCxdHgNkgi4rV8B/dV1 wpQ+PC1TYhkRcOFGap0X9agTgBsi7kcRlDcGw1vRCmssuziSfF06JYLnwrHny7C1aM 6cIF2Ta+qHN05PRw+eXQvw+ZrzNCmalA1PDUvlbwc1Qt0Wu7h5yRQSw43g21/b7rOK 73qjGvTanl74w== From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH 2/2] f2fs: fix to use sb_{start,end}_intwrite{_trylock,}() in gc_thread_func() Date: Thu, 6 Jun 2024 17:52:13 +0800 Message-Id: <20240606095213.4087668-2-chao@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240606095213.4087668-1-chao@kernel.org> References: <20240606095213.4087668-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since background GC is f2fs inner operation, so, let's use sb_{start,end}_intwrite{_trylock,}() instead of sb_{start,end}_write{_trylock,}() in gc_thread_func(). Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index ef667fec9a12..004587ac5530 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -76,7 +76,7 @@ static int gc_thread_func(void *data) f2fs_stop_checkpoint(sbi, false, STOP_CP_REASON_FAULT_INJECT); - if (!sb_start_write_trylock(sbi->sb)) { + if (!sb_start_intwrite_trylock(sbi->sb)) { stat_other_skip_bggc_count(sbi); continue; } @@ -163,7 +163,7 @@ static int gc_thread_func(void *data) } spin_unlock(&sbi->gc_remaining_trials_lock); } - sb_end_write(sbi->sb); + sb_end_intwrite(sbi->sb); } while (!kthread_should_stop()); return 0; -- 2.40.1