Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp195147ybi; Thu, 13 Jun 2019 14:12:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzepVfVfcIShc8LrqIe+EUWxTqbi6OzRb0tO6HCca4Gp29Mp6uywnSdoZj56Xn0Boey3P1I X-Received: by 2002:a63:e950:: with SMTP id q16mr7431998pgj.270.1560460342055; Thu, 13 Jun 2019 14:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560460342; cv=none; d=google.com; s=arc-20160816; b=qAHPvaH8+yhR6Hy1vWMngJp5Um1loqDUraoOSUulmYrz3JwuPl+seX8UrxaGdgmv+0 meD18d4J306/p06GzK/EJrG8grAcJzoE/MnibhMH28RGydjAKxR/XTBCMVpbx/pSWplq hpzlnjZ0ipCaKWmrJn4dCEDCZYaXV2QpND8qkDbIUJw6FGnaNO+GMJrrBh8ly0zqhVZh 54x5nUuaYf0oaZDeH5y1/9rhAGLfOEFoc7qmCLC6CaE0EV04oR6t7yW2fW7F4VRixISW PieEiA33l1ek1GoxCaMRZPPoElPiZnmODW7h5/bMFLF153klMICaZ+wgeWdMj2/AgiMV QdTQ== 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; bh=Sf0T6+DE0Yp7Ry/3pib9DUa+9/DFe+NNfT6qIti9mKA=; b=zPj6REcGgmCFNYV7im5/fjvMGNT/CsXGNi+O8Hi4/JbbgGvz8D/FLKtlvgbtYDPXYX 7tesgwLEinB3FHnJmu/dCAJli7sOcqmp/ucsmg82YKm6VALC2G2vgs2exMYaWuXIPh/Z n6xW6gSIzmUT/lNqSq5y6XVkK11FvL7fdFzOhO4CyknIh1/5mZCzG8DXwo23xgE6WLam Bq85G9dfBkaosdlCGwo01zE2WkrsXR81u7KJ5lZ8r2ho8HjXxhFqzEjAMEqNClm531Kl 6sp9mYNpXChWnYS5AyGyySX7Vqsd4iJeMoKX/3uhB3o8zxzRkSMBhsgsQrsn/EVDLTpz wEKQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si548793pju.90.2019.06.13.14.12.06; Thu, 13 Jun 2019 14:12:22 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730199AbfFMVMC (ORCPT + 99 others); Thu, 13 Jun 2019 17:12:02 -0400 Received: from mga02.intel.com ([134.134.136.20]:28008 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfFMVMB (ORCPT ); Thu, 13 Jun 2019 17:12:01 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2019 14:12:01 -0700 X-ExtLoop1: 1 Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga006.jf.intel.com with ESMTP; 13 Jun 2019 14:12:00 -0700 Date: Thu, 13 Jun 2019 14:13:21 -0700 From: Ira Weiny To: Matthew Wilcox Cc: Dave Chinner , 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: <20190613211321.GC32404@iweiny-DESK2.sc.intel.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613152755.GI32656@bombadil.infradead.org> User-Agent: Mutt/1.11.1 (2018-12-01) 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 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. Ira