From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kylie.crudebyte.com (kylie.crudebyte.com [5.189.157.229]) (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 8A80E18D658; Wed, 4 Mar 2026 12:54:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.189.157.229 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772628900; cv=none; b=HdwiX7MbO9+p52TJO7BoiqIMJ/XpkWk/TM3AeQVbXzTbscjAXiX9j14Z0A7YTYzv543e3msXpiJg98qWNpWcYAG1VGhnvL7qUnKZuGNSBk00oO4wHqylxfep9ONA8aZAEWlqcAyxX4/81Z5DjRVEA5dceYj26e21rn9GzPXCT2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772628900; c=relaxed/simple; bh=f4Rjaivtmb3+wzO9vUxbHKyV0yJ5P/xpKMxO+oCU/ho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TslDB78V5c5rhot3GbvpAFUvy6pAo37yBI4CihcNryveq4CxPJwAwrqofdJEQ7yHi03iKjZ7dEmGerP0nEj40kva4Q0HpfmaiWVek93PfbJJs8XET2yj5bk2QShw6PG92azMgNXjZlcVKQNPYyWVpYs5/j70D+Wa7XxE/dqmdIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=crudebyte.com; spf=pass smtp.mailfrom=crudebyte.com; dkim=pass (4096-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b=GD7rN9I/; arc=none smtp.client-ip=5.189.157.229 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=crudebyte.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crudebyte.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b="GD7rN9I/" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=kylie; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Content-ID:Content-Description; bh=n0FpsErEZt+zXR22oyxotDzQ8v/fhvPRZ3CgAovnctg=; b=GD7rN9I/H6kztAQ3+r29OLdzlB 2wp5jpgSAboJgom75taGQMek16gUDvz3xI7vdGjdkpNUllrDTHF98AWiP+OCnH+rOZ1fmy5VcaJFU VKsQ6X0/ZlhIxWns+OUOSrPYZumUmEIpIrX7CdBPYoYV4I28H3Mc09hzxyuMYS02nf08z/62Z/xbi o1m/AHciADED1VNUeJY8ncGAEmsjfmoxoNY5go/O2j5G08nElYTASCIXdLrkXyY4YDPEYHEBmARgM e/aWLxbdPItZilethgeTdmimnnNzkNy7FU0wpgJatFK9xS3e1c+1ib2jXv+kI3wFni1B8xrQxUwur lGAuab0dWMoGjmeHvd/MBN6yLukf+/HH1qFtTyg8lltEfcG3lFZv1rYSN1P8QJaq/8h7GyKjo+sds 9CFRMrYpSXsWvfhbsbfaBU9DGH7EEzwD7KLJjh3SGl3RXf9rTHBfyBltzYNJVT4bF75KE8tF91O8n b0v+WABLv71eHCuGNmp8y5vbDohoaKzkO6L/MjGGTa2Ulku/7V+j3+KjGuosg2U/NbESz7ogmGBeF eboARZxObG5i3ci4voEH4Lq7Xy/IUxhPjQpEa2MT9K8iFNIdR0b9Vsy0ALCB/E8/jIOeQYMPJGked 2nW3iFKQUtNa6G8IDGdoEUGmfK35WtwFAc5Kgsmbc=; From: Christian Schoenebeck To: v9fs@lists.linux.dev, Remi Pommarel Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Remi Pommarel Subject: Re: [PATCH v3 3/4] 9p: Set default negative dentry retention time for cache=loose Date: Wed, 04 Mar 2026 13:54:55 +0100 Message-ID: <13960849.dW097sEU6C@weasel> In-Reply-To: <59d4509e1015eb664bc2b5e59e1d5cf11ab95656.1772178819.git.repk@triplefau.lt> References: <59d4509e1015eb664bc2b5e59e1d5cf11ab95656.1772178819.git.repk@triplefau.lt> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" On Friday, 27 February 2026 08:56:54 CET Remi Pommarel wrote: > For cache=loose 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" > > +/* cache=loose default negative dentry retention time is 24hours */ > +#define CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT (24 * 60 * 60 * 1000) > + Come on, really worth to save 4 characters here as well? :) Whatever: Reviewed-by: Christian Schoenebeck > 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_info > *v9ses, v9ses->uid = ctx->session_opts.uid; > v9ses->session_lock_timeout = ctx->session_opts.session_lock_timeout; > v9ses->ndentry_timeout_ms = ctx->session_opts.ndentry_timeout_ms; > + > + /* If negative dentry timeout has not been overriden set default for > + * cache=loose > + */ > + if (!(v9ses->flags & V9FS_NDENTRY_TMOUT_SET) && > + (v9ses->cache & CACHE_LOOSE)) > + v9ses->ndentry_timeout_ms = CACHE_LOOSE_NDENTRY_TMOUT_DEFAULT; > } > > /**