Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp312602ybi; Thu, 13 Jun 2019 16:45:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwALktx8HeocHNFU33IzmQZQ0C+sB1Q5//fnAbDTgn19PMVfo0yQnU0L0NOl/IU/p72hg/s X-Received: by 2002:a63:514:: with SMTP id 20mr32513350pgf.272.1560469552575; Thu, 13 Jun 2019 16:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560469552; cv=none; d=google.com; s=arc-20160816; b=PPLvGTaNEZMImoHtwjU6IoMcsfHrFbsoRq6k45Lkuga6GrLMt9pMH/YZhgB7wRrIhv yapB/tRvhoqYRRuEpNKd7T2ghNcdE6KJEZ44/R8/IY3QEukc+Lj1zfRS3DImSdh6JX6X 9H42yEU+FOuQ+wH+7tBwjyG03kl1b4t7MWnwdyZxyvq8XGoF0qcHBDNtRNwrfO/3Sp4d xbFaxClFtmgnpsQLbdcLckuA4V35qCqiQc9z9M3vm/vtqaatG/8Am49nG9DjvkKL2hhx sqVpReqhCi1idOiQq4my+z/SGgwldcgjIvPln6FOOZokjPZjuCq9BF79DYOMTdEwvSOI 336Q== 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=3+t+8plqnMDu5LItEINv+R5LzGXlbnOEW8lA7KqYoSA=; b=KvAVCz/Yh9PO2Dmbew6W1VfYONe27fBXW67HvWwYKcN4ULFf2nRWzYW1FWPdcW5JOy FtC/BOkscT4xh5vv54ynE1jZoEIvh82LSQ1vzuk4oPTUyuqY4UO6m7ha1pDWAH4dBQAI kYo1hBk33gbnMHrH65FVS3BbSrDItR4q/7wphQvJvSAP3S3h2jMX0Lv1UWgwlXqDE4i6 +uVWCvMH9ZExwnf3n7gsJhGaDQogljpAFvxA74LM8Qezmv/z2uCf2eabH47INCRtxO11 XcltbdAEHkz+3fYNjrfM34eMkRDI6ojqtr2TkjvOl1KCt22AqysWP2TcqGWo507sYJ3P d9oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=V4uYx3PC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j3si675213plk.79.2019.06.13.16.45.37; Thu, 13 Jun 2019 16:45:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=V4uYx3PC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727468AbfFMXpc (ORCPT + 99 others); Thu, 13 Jun 2019 19:45:32 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45025 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbfFMXpb (ORCPT ); Thu, 13 Jun 2019 19:45:31 -0400 Received: by mail-qt1-f193.google.com with SMTP id x47so445619qtk.11 for ; Thu, 13 Jun 2019 16:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3+t+8plqnMDu5LItEINv+R5LzGXlbnOEW8lA7KqYoSA=; b=V4uYx3PC9/Kgy2M4ZekgvRKvGqR7t7tO5empinBcdD/vjjrTDNXNvOpJr4/tQqqwEv pgwxcXIhwGK63QcFR+H2l9DHorWqNbCBtL/l6TDJJHIPYNsX9L9ltGsrgYOW3djbfTBk +CXWBZJDK9oBlsTLuRXbHuNYYhdEA1G3FVTmNkzNArpZNxg9Y+HQQ0VSyzjYgYXSbRs9 dsl1IHcwMZEtpAJdgQWfZ90e/nLGeyYk/+rPuZQscIiBjl8tNgkwswTbzSy2Qj7AjBEY 8qq4PDFRq3uqJPA6SKTJGsY5tJs7i3mv34NRvdlqzlDhrOcr5qUMSiJ4ZEoA8UNdsYha GrlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3+t+8plqnMDu5LItEINv+R5LzGXlbnOEW8lA7KqYoSA=; b=lQNiFttc4EN9kkZrK5zAUCt3L9OG/WVq9sCzXXmd5i6phm9i5YIIjwO0gfzBG/Gwj2 8qqsT/a767HbGh7IDjfMLSFQF6MsHX7ogKKqaqUnHlzaEDJ3mpSXQq+8i1Hh5hL+ANX9 fw0APlmBAtK1FxHxbc063DoQGszR8CBdlyPpLGyCI5ORbulnzXdVp9/n3cOJR2wpTD+D On4zhgiNGeAvS8OzsSEbW0rhSd0LMCNJ8Yc3Cl71xDWBvRaVbFo8xg5zcFcG5IgxuFsY oc4g4S0o5DezrZAEljmSJLHrYpYFENZ1lPitmlTx6s9fbJ2aNVzzxssUlTmWwOehHyGD TWkw== X-Gm-Message-State: APjAAAUeFaVhuNSHFhd81bunOZJIOdDeRynCKF39nnDU6eRX5eVdy177 1bKOp65umQAZzZAJh6wETD/AcQ== X-Received: by 2002:ac8:2f7b:: with SMTP id k56mr66798515qta.376.1560469531072; Thu, 13 Jun 2019 16:45:31 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id o6sm757625qtc.47.2019.06.13.16.45.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 16:45:30 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hbZPO-00019B-4b; Thu, 13 Jun 2019 20:45:30 -0300 Date: Thu, 13 Jun 2019 20:45:30 -0300 From: Jason Gunthorpe To: Ira Weiny Cc: Matthew Wilcox , Dave Chinner , Jan Kara , Dan Williams , Theodore Ts'o , Jeff Layton , linux-xfs@vger.kernel.org, Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= 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, linux-rdma@vger.kernel.org Subject: Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal Message-ID: <20190613234530.GK22901@ziepe.ca> 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> <20190613152755.GI32656@bombadil.infradead.org> <20190613211321.GC32404@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613211321.GC32404@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 02:13:21PM -0700, Ira Weiny wrote: > On Thu, Jun 13, 2019 at 08:27:55AM -0700, Matthew Wilcox wrote: > > On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > > > e.g. Process A has an exclusive layout lease on file F. It does an > > > IO to file F. The filesystem IO path checks that Process A owns the > > > lease on the file and so skips straight through layout breaking > > > because it owns the lease and is allowed to modify the layout. It > > > then takes the inode metadata locks to allocate new space and write > > > new data. > > > > > > Process B now tries to write to file F. The FS checks whether > > > Process B owns a layout lease on file F. It doesn't, so then it > > > tries to break the layout lease so the IO can proceed. The layout > > > breaking code sees that process A has an exclusive layout lease > > > granted, and so returns -ETXTBSY to process B - it is not allowed to > > > break the lease and so the IO fails with -ETXTBSY. > > > > This description doesn't match the behaviour that RDMA wants either. > > Even if Process A has a lease on the file, an IO from Process A which > > results in blocks being freed from the file is going to result in the > > RDMA device being able to write to blocks which are now freed (and > > potentially reallocated to another file). > > I don't understand why this would not work for RDMA? As long as the layout > does not change the page pins can remain in place. Because process A had a layout lease (and presumably a MR) and the layout was still modified in way that invalidates the RDMA MR. Jason