From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp01-ext2.udag.de (smtp01-ext2.udag.de [62.146.106.18]) (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 1B7B8389115; Wed, 4 Mar 2026 09:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.146.106.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772615528; cv=none; b=XVCXbG6y6wm5INSwd9LfazVL3oSjAtcyGvUzBh+CYEauRdB/mf1xXx4HocvzGatY1/T20mBhltzAl4A75QEEwjlFBeG3RDnTzEG74y9e5N6EDIZ0j/uq/o7kusJFo/yruaybsNT5fy7SchYnAH1sCK5qMtIEi8TbNC/zJpUWwjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772615528; c=relaxed/simple; bh=PeLbgETD8VZ36DV6hCrBG9NIe09gUvSX0ySCUczzQaM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=drCoU+285dSPbhwUBm7lBcHcDh52WnjnvgolilQ8MZWF84m+XNQBDlYyMHQ5oyX3Twqyenfxll75TVvkZ2CKxcNtwOGthcx1vtRcdM9dWOynXhNsDt3hwOlXpd8Wax/3Ds94NUdUV7muYhgmX/GNZt6LEM4Iwv9SvZzZCYz1LFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=birthelmer.de; spf=pass smtp.mailfrom=birthelmer.de; arc=none smtp.client-ip=62.146.106.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=birthelmer.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=birthelmer.de Received: from localhost (200-143-067-156.ip-addr.inexio.net [156.67.143.200]) by smtp01-ext2.udag.de (Postfix) with ESMTPA id A2BDCE0270; Wed, 4 Mar 2026 10:11:57 +0100 (CET) Authentication-Results: smtp01-ext2.udag.de; auth=pass smtp.auth=birthelmercom-0001 smtp.mailfrom=horst@birthelmer.de Date: Wed, 4 Mar 2026 10:11:56 +0100 From: Horst Birthelmer To: Joanne Koong Cc: Miklos Szeredi , "Darrick J. Wong" , Bernd Schubert , Horst Birthelmer , Luis Henriques , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Horst Birthelmer Subject: Re: Re: Re: [PATCH v6 3/3] fuse: add an implementation of open+getattr Message-ID: References: <62edc506-2b0c-4470-8bdd-ee2d7fcc1cf1@ddn.com> <20260303050614.GO13829@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Mar 03, 2026 at 01:19:43PM -0800, Joanne Koong wrote: > On Tue, Mar 3, 2026 at 2:39 AM Horst Birthelmer wrote: > > > > On Tue, Mar 03, 2026 at 11:03:14AM +0100, Miklos Szeredi wrote: > > > On Tue, 3 Mar 2026 at 06:06, Darrick J. Wong wrote: > > > > > > > > On Mon, Mar 02, 2026 at 09:03:26PM +0100, Bernd Schubert wrote: > > > > > > > > > > On 3/2/26 19:56, Joanne Koong wrote: > > > > > > > > > The overhead for the server to fetch the attributes may be nontrivial > > > > > > (eg may require stat()). I really don't think we can assume the data > > > > > > is locally cached somewhere. Why always compound the getattr to the > > > > > > open instead of only compounding the getattr when the attributes are > > > > > > actually invalid? > > > > > > > > > > > > But maybe I'm wrong here and this is the preferable way of doing it. > > > > > > Miklos, could you provide your input on this? > > > > > > Yes, it makes sense to refresh attributes only when necessary. > > > > > > > OK, I will add a 'compound flag' for optional operations and don't > > execute those, when the fuse server does not support compounds. > > > > This way we can always send the open+getattr, but if the fuse server > > does not process this as a compound (aka. it would be costly to do it), > > we only resend the FUSE_OPEN. Thus the current behavior does not change > > and we can profit from fuse servers that actually have the possibility to > > give us the attributes. > > in my opinion, this adds additional complexity for no real benefit. I > think we'll rarely hit a case where it'll be useful to speculatively > prefetch attributes that are already valid that is not already > accounted for by the attr_timeout the server set. > So the current consensus would be to use the compound when we either don't have the data, or it has become invalid, and use the current behavior (just do an open and don't worry about the stale attributes) when we have unexpired attributes? Thanks, Horst