From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3079EC47404 for ; Mon, 7 Oct 2019 10:16:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D426B206BB for ; Mon, 7 Oct 2019 10:16:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D426B206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4BF9F8E0005; Mon, 7 Oct 2019 06:16:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4703B8E0003; Mon, 7 Oct 2019 06:16:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 386598E0005; Mon, 7 Oct 2019 06:16:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 177A68E0003 for ; Mon, 7 Oct 2019 06:16:21 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 9ED34181AC55C for ; Mon, 7 Oct 2019 10:16:20 +0000 (UTC) X-FDA: 76016583720.22.drink78_3756d64a5f637 X-HE-Tag: drink78_3756d64a5f637 X-Filterd-Recvd-Size: 3517 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 7 Oct 2019 10:16:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 688B2B206; Mon, 7 Oct 2019 10:16:18 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id E6A461E4813; Fri, 4 Oct 2019 09:51:00 +0200 (CEST) Date: Fri, 4 Oct 2019 09:51:00 +0200 From: Jan Kara To: Dave Chinner Cc: Ira Weiny , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org, Jeff Layton , Jan Kara , Theodore Ts'o , John Hubbard , Dan Williams , Jason Gunthorpe Subject: Re: Lease semantic proposal Message-ID: <20191004075100.GA12412@quack2.suse.cz> References: <20190923190853.GA3781@iweiny-DESK2.sc.intel.com> <20190923222620.GC16973@dread.disaster.area> <20190925234602.GB12748@iweiny-DESK2.sc.intel.com> <20190930084233.GO16973@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190930084233.GO16973@dread.disaster.area> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon 30-09-19 18:42:33, Dave Chinner wrote: > On Wed, Sep 25, 2019 at 04:46:03PM -0700, Ira Weiny wrote: > > On Tue, Sep 24, 2019 at 08:26:20AM +1000, Dave Chinner wrote: > > > Hence, AFIACT, the above definition of a F_RDLCK|F_LAYOUT lease > > > doesn't appear to be compatible with the semantics required by > > > existing users of layout leases. > > > > I disagree. Other than the addition of F_UNBREAK, I think this is consistent > > with what is currently implemented. Also, by exporting all this to user space > > we can now write tests for it independent of the RDMA pinning. > > The current usage of F_RDLCK | F_LAYOUT by the pNFS code allows > layout changes to occur to the file while the layout lease is held. I remember you saying that in the past conversations. But I agree with Ira that I don't see where in the code this would be implemented. AFAICS break_layout() called from xfs_break_leased_layouts() simply breaks all the leases with F_LAYOUT set attached to the inode... Now I'm not any expert on file leases but what am I missing? > IOWs, your definition of F_RDLCK | F_LAYOUT not being allowed > to change the is in direct contradition to existing users. > > I've said this several times over the past few months now: shared > layout leases must allow layout modifications to be made. Only > allowing an exclusive layout lease to modify the layout rules out > many potential use cases for direct data placement and p2p DMA > applications, not to mention conflicts with the existing pNFS usage. > Layout leases need to support more than just RDMA, and tailoring the > API to exactly the immediate needs of RDMA is just going to make it > useless for anything else. I agree we should not tailor the layout lease definition to just RDMA usecase. But let's talk about the semantics once our confusion about how pNFS currently uses layout leases is clear out. Honza -- Jan Kara SUSE Labs, CR