Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7118534ybi; Thu, 13 Jun 2019 09:52:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2zobg0D9MJnk4VSuDdl2qna/mDt/7syJC6sfosmz0ZP257dMwBJ/w+kDoVyAwBcVlvqqq X-Received: by 2002:a17:902:25ab:: with SMTP id y40mr32702509pla.268.1560444773563; Thu, 13 Jun 2019 09:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560444773; cv=none; d=google.com; s=arc-20160816; b=nNSUq/frDTBx8oZ1NCef5Z/f/mxHpF3KeUk8xYan4Up0SxC5uBGyIO6VFw3ltYTmYv NukOvOXZh8DU+5XEGMfclBf9EfMATnB9wCm6kZgluw712lRRaDEe48qyfcn78eJqWZJl bkMHKa0U3D6NgiRTtu+hncvyba+p8RlEgiTahQAyQNGMQ7VweqsLrzgtUtuPusXWaleP Dtwjg64K3aMRL97UGG9ka7rnuwPODqMwCiOP9kWT3/lwgYVqeZyFXcuIWIln0C7/+afn G49MJuzVk/lMO0mvV+yCNGov5D86MnuWHj6b7ITQG1DyyHWc/B9YamwLVXIbOCkT5z8l bVrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QaIPZk5fG08PMipK2ZOjFgNMkP7/mE5EU+2hsa7y6lY=; b=viC2o3TeY71YsVSaqDbf3JgT5GbRJh7QWWEwXmYBjIIJrzUjaJJXInT2q3WnmsUE5z Wb+hzXou8aRCkHqG1EGBMrb71IH6W7UqJstO1blswOeAXemP7wY1GfJDKSSFAHa4DvKC 3UeseLHVPmvezWs39mcDeWmLU/qREoRVFHZcYFzDASsmo+iMJ6MIJVCq9MuJql7nZctA 52c2DpvUoh15jyiru5DdVB10+1k4/naJ7HyHQX/qUe/sO1BSHPOOsWYl+cwsliFH//2V CQ+Dryu2LCScZLQEKH4Wtjg1D72cyVibcN+v49UP+MEkbSE2VRT3dcJs93RIx8LEhzS+ 1noQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="VCF/wqwv"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si88274plr.192.2019.06.13.09.52.39; Thu, 13 Jun 2019 09:52:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="VCF/wqwv"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392957AbfFMQwB (ORCPT + 99 others); Thu, 13 Jun 2019 12:52:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60620 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730127AbfFMDX2 (ORCPT ); Wed, 12 Jun 2019 23:23:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QaIPZk5fG08PMipK2ZOjFgNMkP7/mE5EU+2hsa7y6lY=; b=VCF/wqwvWCkPBIrvCaL/D3G8l tHqc/P5TR0jF4odv4tFa+eZycXtANJYw8npQGw1u7+6Uv8D3dPL6PSPWSss02vOD3RMl8SN9UE9tE pgdev89Cvk50mX8MdLQMFzWKjT9ybPnHlvymKlhrDcAdtq9BjKibIVkW+vernB9b/39/CVM/w8KPZ 7eNO6yjjUerdEhluGAkQcubSLK9G/8N4d5w54XxHTAPHR/5HqmRB4lPvHLnyja2+Z1QV2Pr2MBWyz OHrDRVCwX8aCx5s1LcyskUetCbhRrlq1e3Hk4+o+Gp2Qi2Fokqvsf6H+CAZFG91Ylp4HPDaT6v01i r9dkL+CUQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hbGKe-0003os-RJ; Thu, 13 Jun 2019 03:23:20 +0000 Date: Wed, 12 Jun 2019 20:23:20 -0700 From: Matthew Wilcox To: Dave Chinner Cc: Ira Weiny , Jan Kara , Dan Williams , Theodore Ts'o , Jeff Layton , linux-xfs@vger.kernel.org, Andrew Morton , John Hubbard , =?iso-8859-1?B?Suly9G1l?= Glisse , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal Message-ID: <20190613032320.GG32656@bombadil.infradead.org> References: <20190606014544.8339-1-ira.weiny@intel.com> <20190606104203.GF7433@quack2.suse.cz> <20190606220329.GA11698@iweiny-DESK2.sc.intel.com> <20190607110426.GB12765@quack2.suse.cz> <20190607182534.GC14559@iweiny-DESK2.sc.intel.com> <20190608001036.GF14308@dread.disaster.area> <20190612123751.GD32656@bombadil.infradead.org> <20190613002555.GH14363@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613002555.GH14363@dread.disaster.area> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > That's rather different from the normal meaning of 'exclusive' in the > > context of locks, which is "only one user can have access to this at > > a time". > > Layout leases are not locks, they are a user access policy object. > It is the process/fd which holds the lease and it's the process/fd > that is granted exclusive access. This is exactly the same semantic > as O_EXCL provides for granting exclusive access to a block device > via open(), yes? This isn't my understanding of how RDMA wants this to work, so we should probably clear that up before we get too far down deciding what name to give it. For the RDMA usage case, it is entirely possible that both process A and process B which don't know about each other want to perform RDMA to file F. So there will be two layout leases active on this file at the same time. It's fine for IOs to simultaneously be active to both leases. But if the filesystem wants to move blocks around, it has to break both leases. If Process C tries to do a write to file F without a lease, there's no problem, unless a side-effect of the write would be to change the block mapping, in which case either the leases must break first, or the write must be denied. Jason, please correct me if I've misunderstood the RDMA needs here.