From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 23 Aug 2019 09:04:29 -0300 From: Jason Gunthorpe Subject: Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-) Message-ID: <20190823120428.GA12968@ziepe.ca> References: <20190819092409.GM7777@dread.disaster.area> <20190819123841.GC5058@ziepe.ca> <20190820011210.GP7777@dread.disaster.area> <20190820115515.GA29246@ziepe.ca> <20190821180200.GA5965@iweiny-DESK2.sc.intel.com> <20190821181343.GH8653@ziepe.ca> <20190821185703.GB5965@iweiny-DESK2.sc.intel.com> <20190821194810.GI8653@ziepe.ca> <20190821204421.GE5965@iweiny-DESK2.sc.intel.com> <20190823032345.GG1119@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190823032345.GG1119@dread.disaster.area> Sender: owner-linux-mm@kvack.org To: Dave Chinner Cc: Ira Weiny , Jan Kara , Andrew Morton , Dan Williams , Matthew Wilcox , Theodore Ts'o , John Hubbard , Michal Hocko , linux-xfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org List-ID: On Fri, Aug 23, 2019 at 01:23:45PM +1000, Dave Chinner wrote: > > But the fact that RDMA, and potentially others, can "pass the > > pins" to other processes is something I spent a lot of time trying to work out. > > There's nothing in file layout lease architecture that says you > can't "pass the pins" to another process. All the file layout lease > requirements say is that if you are going to pass a resource for > which the layout lease guarantees access for to another process, > then the destination process already have a valid, active layout > lease that covers the range of the pins being passed to it via the > RDMA handle. How would the kernel detect and enforce this? There are many ways to pass a FD. IMHO it is wrong to try and create a model where the file lease exists independently from the kernel object relying on it. In other words the IB MR object itself should hold a reference to the lease it relies upon to function properly. Then we don't have to wreck the unix FD model to fit this in. Jason