From nobody Thu Apr 9 13:38:31 2026 Received: from e3i670.smtp2go.com (e3i670.smtp2go.com [158.120.86.158]) (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 605FC37106D for ; Fri, 27 Feb 2026 08:16:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=158.120.86.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772180165; cv=none; b=fnZ9fzDo1dT0xRQ41qj46LDEtOUerkMoDx8J/cyK+PNwZhcNpvBlTIrYaoGN19zXRuQxrGL4s5itMZSmVXnQpk7esdCjzh9ShHmg3t0s/scuEQWPY09x6HpQJ8UEQ9NqwQqRheHdvaGVi1lbw/MhK8SusUx5Zuy0A8kX6FloDYs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772180165; c=relaxed/simple; bh=H9jWy2UoCy52M+2klxirjo2B6xc5s5xL6iuP+p5vM3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mL2raA1b5d0Zq5tv5YCjgbkp9AsEyhMhhFRvYe9fNf+G9iuBgrsHi3qz7CRvq6gCExz7lGVzsVCA2M8ZBOskSPjQHs+FmluEmrNf0S4ajw02HXr64i9Sr/nlh85HpiqDpjWlkpTMRjBfqCVbpOYeEtiGfOWHv/R+LOgi0N57hpg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt; spf=pass smtp.mailfrom=em510616.triplefau.lt; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b=JG40zhdQ; arc=none smtp.client-ip=158.120.86.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=em510616.triplefau.lt Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b="JG40zhdQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triplefau.lt; i=@triplefau.lt; q=dns/txt; s=s510616; t=1772180160; h=from : subject : to : message-id : date; bh=in1ruy0aNQuVl5px1Sa8iq4z9THvURtLD4XCmSiWq0s=; b=JG40zhdQjyhbjZyqLjnXQG3uDjUJf4NtHOon4V7lPswmxZWlbHxdhPBLRpuws/Vte9B1T S6QZJ3QSkkaHo4vckphPbL34Z/tZROU6YzHQBMWraeoSzkXu6vwrgo2LjStHmFN07/nL/cU 1NWNlnykIG+psp0cFIEHT5oTM2gxzZH3HkEocW0twTfK7MFonN8okUpoe0+svFCJhMALdrf ZQz8MYXE9/UEAYwW+QSDPr0vZmWYO4nsRZmfwLCqbmWBeshcT/KtwEHw8zk+wkpcTFLcarO vCfHgZZORtJ+dvaX0kyIzRI663E+p4ESRC6Qdwtm1sC2Ni9V/7ybRBjwWszQ== Received: from [10.12.239.196] (helo=localhost) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.99.1-S2G) (envelope-from ) id 1vvt0x-4o5NDgro4p9-pNDb; Fri, 27 Feb 2026 08:15:59 +0000 From: Remi Pommarel To: v9fs@lists.linux.dev Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , Remi Pommarel Subject: [PATCH v3 3/4] 9p: Set default negative dentry retention time for cache=loose Date: Fri, 27 Feb 2026 08:56:54 +0100 Message-ID: <59d4509e1015eb664bc2b5e59e1d5cf11ab95656.1772178819.git.repk@triplefau.lt> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please forward a copy of this message, including all headers, to Feedback-ID: 510616m:510616apGKSTK:510616sBtzXdwV7- X-smtpcorp-track: e_uMidvl8rcZ.ZnrlDfB-4Hjz.Vf41EwCIDlM Content-Type: text/plain; charset="utf-8" For cache=3Dloose mounts, set the default negative dentry cache retention time to 24 hours. Signed-off-by: Remi Pommarel --- fs/9p/v9fs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index a26bd9070786..d14f6eda94d6 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -24,6 +24,9 @@ #include "v9fs_vfs.h" #include "cache.h" =20 +/* cache=3Dloose default negative dentry retention time is 24hours */ +#define CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT (24 * 60 * 60 * 1000) + static DEFINE_SPINLOCK(v9fs_sessionlist_lock); static LIST_HEAD(v9fs_sessionlist); struct kmem_cache *v9fs_inode_cache; @@ -440,6 +443,13 @@ static void v9fs_apply_options(struct v9fs_session_inf= o *v9ses, v9ses->uid =3D ctx->session_opts.uid; v9ses->session_lock_timeout =3D ctx->session_opts.session_lock_timeout; v9ses->ndentry_timeout_ms =3D ctx->session_opts.ndentry_timeout_ms; + + /* If negative dentry timeout has not been overriden set default for + * cache=3Dloose + */ + if (!(v9ses->flags & V9FS_NDENTRY_TMOUT_SET) && + (v9ses->cache & CACHE_LOOSE)) + v9ses->ndentry_timeout_ms =3D CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT; } =20 /** --=20 2.52.0