From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH v9 2/6] fs, mm: pass fd to ->mmap_validate() Date: Thu, 12 Oct 2017 02:21:32 +0100 Message-ID: <20171012012131.GD21978@ZenIV.linux.org.uk> References: <150776922692.9144.16963640112710410217.stgit@dwillia2-desk3.amr.corp.intel.com> <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <150776923838.9144.15727770472447035032.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , "Darrick J. Wong" , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Dave Chinner , linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Christoph Hellwig List-Id: linux-api@vger.kernel.org On Wed, Oct 11, 2017 at 05:47:18PM -0700, Dan Williams wrote: > The MAP_DIRECT mechanism for mmap intends to use a file lease to prevent > block map changes while the file is mapped. It requires the fd to setup > an fasync_struct for signalling lease break events to the lease holder. *UGH* That looks like one hell of a bad API. You are not even guaranteed that descriptor will remain be still open by the time you pass it down to your helper, nevermind the moment when event actually happens... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5938C21EA15DF for ; Wed, 11 Oct 2017 18:18:05 -0700 (PDT) Date: Thu, 12 Oct 2017 02:21:32 +0100 From: Al Viro Subject: Re: [PATCH v9 2/6] fs, mm: pass fd to ->mmap_validate() Message-ID: <20171012012131.GD21978@ZenIV.linux.org.uk> References: <150776922692.9144.16963640112710410217.stgit@dwillia2-desk3.amr.corp.intel.com> <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , "Darrick J. Wong" , linux-api@vger.kernel.org, linux-nvdimm@lists.01.org, Dave Chinner , linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Christoph Hellwig List-ID: On Wed, Oct 11, 2017 at 05:47:18PM -0700, Dan Williams wrote: > The MAP_DIRECT mechanism for mmap intends to use a file lease to prevent > block map changes while the file is mapped. It requires the fd to setup > an fasync_struct for signalling lease break events to the lease holder. *UGH* That looks like one hell of a bad API. You are not even guaranteed that descriptor will remain be still open by the time you pass it down to your helper, nevermind the moment when event actually happens... _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:40200 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbdJLBVl (ORCPT ); Wed, 11 Oct 2017 21:21:41 -0400 Date: Thu, 12 Oct 2017 02:21:32 +0100 From: Al Viro Subject: Re: [PATCH v9 2/6] fs, mm: pass fd to ->mmap_validate() Message-ID: <20171012012131.GD21978@ZenIV.linux.org.uk> References: <150776922692.9144.16963640112710410217.stgit@dwillia2-desk3.amr.corp.intel.com> <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Dan Williams Cc: linux-nvdimm@lists.01.org, Jan Kara , "Darrick J. Wong" , linux-api@vger.kernel.org, Dave Chinner , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-mm@kvack.org, Jeff Moyer , linux-fsdevel@vger.kernel.org, Andrew Morton , Ross Zwisler On Wed, Oct 11, 2017 at 05:47:18PM -0700, Dan Williams wrote: > The MAP_DIRECT mechanism for mmap intends to use a file lease to prevent > block map changes while the file is mapped. It requires the fd to setup > an fasync_struct for signalling lease break events to the lease holder. *UGH* That looks like one hell of a bad API. You are not even guaranteed that descriptor will remain be still open by the time you pass it down to your helper, nevermind the moment when event actually happens... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 12 Oct 2017 02:21:32 +0100 From: Al Viro To: Dan Williams Cc: linux-nvdimm@lists.01.org, Jan Kara , "Darrick J. Wong" , linux-api@vger.kernel.org, Dave Chinner , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-mm@kvack.org, Jeff Moyer , linux-fsdevel@vger.kernel.org, Andrew Morton , Ross Zwisler Subject: Re: [PATCH v9 2/6] fs, mm: pass fd to ->mmap_validate() Message-ID: <20171012012131.GD21978@ZenIV.linux.org.uk> References: <150776922692.9144.16963640112710410217.stgit@dwillia2-desk3.amr.corp.intel.com> <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150776923838.9144.15727770472447035032.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Oct 11, 2017 at 05:47:18PM -0700, Dan Williams wrote: > The MAP_DIRECT mechanism for mmap intends to use a file lease to prevent > block map changes while the file is mapped. It requires the fd to setup > an fasync_struct for signalling lease break events to the lease holder. *UGH* That looks like one hell of a bad API. You are not even guaranteed that descriptor will remain be still open by the time you pass it down to your helper, nevermind the moment when event actually happens... -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org