Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4329096rba; Tue, 2 Apr 2024 13:49:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUuG7GS29YPcm6DwZDtAwPC2cBtM30NUAqfDbJ3L/SexX0ahdw8wY80NHYRoCQeB6yTyZxdA3dlpmlKI3WPUwWhee0DFdCR9IABnTJhHA== X-Google-Smtp-Source: AGHT+IHYDfnR7XvRFUsYmn2FCXtFFkoaBSvQmPziQdft+QiwvxaxJZL+r6yobTv/uKoSntP2XCpx X-Received: by 2002:a05:6a00:130b:b0:6ea:afdb:6d03 with SMTP id j11-20020a056a00130b00b006eaafdb6d03mr11870413pfu.19.1712090974709; Tue, 02 Apr 2024 13:49:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712090974; cv=pass; d=google.com; s=arc-20160816; b=JNfTow4pE9M3DuNZ5klGsPzkq1ovU8yExhiCj4XLsCUkfuFzprk/Wnev+/NMou8phT u4bBitLzbEAXOsGhmlamrCQ37Ug5Dfhhma7cvUUfuC5RhQ9Wioy5/AEGaaCD8Lp6d2p1 6aQCed+pzA99cIO6IaiW66TNdF7UK8rck3EgoQYNyNdLpwTb0hZ0qvkiA2Of4K0thNBg bMNRr2U7iTQwJFzYdcFg9n0iCq9RAHL4ZaqwwJojeN+2NL8SGUk8in3tH5y4G0uozFNq RZsydYpEJnQQLhcFsas4SyJjK+UjYEHtGIgvWL6VRpnoOes2ja+RvQX7jvNNNTYIe9mw /yVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jjW5IPu4pLtxcmVb8J59xaXG6ylbJ/zfz4A/SNdIOuA=; fh=0eaFkm2MMV9ybkcxVCe7pUti6F41dv6ePLYn65T7O/8=; b=e5sK4AqAbuJnSHzIADbAhF7yY7zqTniNoulsygiDVChqHC25Iucn++e1atW+Nvo6zj +UBS6FgZqIYLVLn9g3bcn/P8WQk/nyv73JMIZwzgpPgn8v6Mu6VPjXvoapxYmu2nyAvn mz09alqF809bUMzZVwQSB5M/rDuJR693P3OepZDKUl8N9So9+kh3dtGpdeapEv2c24Tr F+HVGQ9ZsGYX/oIGfCSPZDTQIpK4y3YUrMyQjoAuEkkbBWWXiEQfmAbjIoRzjuDkMD4X +HVW1R+spmrkgjMorXLbNYFgX7847YckDUWBNmz9tuu0BUGfaonlkhxT/OXwba60e1ow xkoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=dm0a6go9; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-128201-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128201-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b185-20020a62cfc2000000b006e70c36b8ebsi11309308pfg.212.2024.04.02.13.49.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 13:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128201-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=dm0a6go9; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-128201-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128201-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B83802836D2 for ; Tue, 2 Apr 2024 14:51:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C70112C547; Tue, 2 Apr 2024 14:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="dm0a6go9" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 488C18662E; Tue, 2 Apr 2024 14:49:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712069352; cv=none; b=S6Wl7GklBYotSeibPQzSbtcdss6qW/vi9yAa58D1XKdGosVrblSSW9cKAY2+EoCEkDa7Zp5pGPYeAlJVpGTHqHlqH2EX01ytD9oHtIIkyRKRAuj1MgRt1TZQ2DFqTUtTweZugzt2DPoIpYMEejHPBnswTBSW/e+mtVTxzp4Ztqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712069352; c=relaxed/simple; bh=JAxoc87P16PDhGWdLO0TNAOBSGeN9QTM6g13jC6CC20=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OvIgJDpIvB35v3ONyDRFfcn/qcvp+uws7+Z5ETR0TdO2nEqEL0k1S2g+DMgqUgoadMrRCjCUYyoZ+L3ciJcDr/zjMRxwtBQauItpq1MEfGDK/TPD6A5Q/6SR1Sa+giDtABjFyUR4RMSsmzxTGR8Vo4q75eEJKNtEOG/4BW7/Kew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=dm0a6go9; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jjW5IPu4pLtxcmVb8J59xaXG6ylbJ/zfz4A/SNdIOuA=; b=dm0a6go9xoxTykButNFZSyF4U0 lVrem8uSPFvSrdtubEsPGTGEzeeWKAO1OIEP4+3BUDgJopzISw3yCxn3s+MvQAlq7m4INfuMDpxqZ wgDWH7Iy3iCWmrBVkO0CRmv1mwSXQVhyflm7+pUyTtfGl/Kjn38S4DSyuYgYGDIkjABQdopUI29oW Kqz7Z8fcocLQbrMqeIpIZgxHxoL5kIMMaDQk3f0gKv5GzXiTjMxaJaTNIUW9pnx4dvdBlf4W8HdZy vSc0oIZ3cH5enlXMvntHZhYdEJQCMPtnN/sOmglSS1iOhb/EeDbBNZd3yyY0CjjbhnryWKbT+45Ca XPw6jknA==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrfRl-0000000BgU0-2rRl; Tue, 02 Apr 2024 14:49:09 +0000 Date: Tue, 2 Apr 2024 07:49:09 -0700 From: Christoph Hellwig To: Jeff Layton Cc: Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] fuse: allow FUSE drivers to declare themselves free from outside changes Message-ID: References: <20240402-setlease-v2-1-b098a5f9295d@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240402-setlease-v2-1-b098a5f9295d@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Apr 02, 2024 at 09:10:59AM -0400, Jeff Layton wrote: > Traditionally, we've allowed people to set leases on FUSE inodes. Some > FUSE drivers are effectively local filesystems and should be fine with > kernel-internal lease support. Others are backed by a network server > that may have multiple clients, or may be backed by something non-file > like entirely. On those, we don't want to allow leases. > > Have the filesytem driver to set a fuse_conn flag to indicate whether > the inodes are subject to outside changes, not done via kernel APIs. If > the flag is unset (the default), then setlease attempts will fail with > -EINVAL, indicating that leases aren't supported on that inode. So while this polarity is how we should be doing it, doesn't it risk breaking all the local fuse file systems? I.e. shouldn't the flag be inverse to maximize backwards compatibility?