From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com ([134.134.136.65]:60088 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbcJJWFw (ORCPT ); Mon, 10 Oct 2016 18:05:52 -0400 Date: Mon, 10 Oct 2016 16:05:50 -0600 From: Ross Zwisler Subject: Re: [PATCH v5 13/17] dax: dax_iomap_fault() needs to call iomap_end() Message-ID: <20161010220550.GA22793@linux.intel.com> References: <1475874544-24842-1-git-send-email-ross.zwisler@linux.intel.com> <1475874544-24842-14-git-send-email-ross.zwisler@linux.intel.com> <20161010155004.GD19343@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161010155004.GD19343@lst.de> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Christoph Hellwig Cc: Ross Zwisler , linux-kernel@vger.kernel.org, Theodore Ts'o , Alexander Viro , Andreas Dilger , Andrew Morton , Dan Williams , Dave Chinner , Jan Kara , Matthew Wilcox , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org On Mon, Oct 10, 2016 at 05:50:04PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:00PM -0600, Ross Zwisler wrote: > > Currently iomap_end() doesn't do anything for DAX page faults for both ext2 > > and XFS. ext2_iomap_end() just checks for a write underrun, and > > xfs_file_iomap_end() checks to see if it needs to finish a delayed > > allocation. However, in the future iomap_end() calls might be needed to > > make sure we have balanced allocations, locks, etc. So, add calls to > > iomap_end() with appropriate error handling to dax_iomap_fault(). > > Is there a way to just have a single call to iomap_end at the end of > the function, after which we just return a previosuly setup return > value? > > e.g. > > out: > if (ops->iomap_end) { > error = ops->iomap_end(inode, pos, PAGE_SIZE, > PAGE_SIZE, flags, &iomap); > } > > if (error == -ENOMEM) > return VM_FAULT_OOM | major; > if (error < 0 && error != -EBUSY) > return VM_FAULT_SIGBUS | major; > return ret; Sure, will do.