From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 25/28] xfs: support returning partial reflink results Date: Mon, 22 Oct 2018 13:14:39 +1100 Message-ID: <20181022021439.GT6311@dastard> References: <154013850285.29026.16168387526580596209.stgit@magnolia> <154013867727.29026.14417615066515846065.stgit@magnolia> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <154013867727.29026.14417615066515846065.stgit@magnolia> Sender: linux-btrfs-owner@vger.kernel.org To: "Darrick J. Wong" Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com List-Id: linux-unionfs@vger.kernel.org On Sun, Oct 21, 2018 at 09:17:57AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > Back when the XFS reflink code only supported clone_file_range, we were > only able to return zero or negative error codes to userspace. However, > now that copy_file_range (which returns bytes copied) can use XFS' > clone_file_range, we have the opportunity to return partial results. > For example, if userspace sends a 1GB clone request and we run out of > space halfway through, we at least can tell userspace that we completed > 512M of that request like a regular write. > > Signed-off-by: Darrick J. Wong Looks ok to me. remap_file_range() still returns the full length, so there's no change of behaviour there. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Date: Mon, 22 Oct 2018 13:14:39 +1100 Subject: [Ocfs2-devel] [PATCH 25/28] xfs: support returning partial reflink results In-Reply-To: <154013867727.29026.14417615066515846065.stgit@magnolia> References: <154013850285.29026.16168387526580596209.stgit@magnolia> <154013867727.29026.14417615066515846065.stgit@magnolia> Message-ID: <20181022021439.GT6311@dastard> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Darrick J. Wong" Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com On Sun, Oct 21, 2018 at 09:17:57AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > Back when the XFS reflink code only supported clone_file_range, we were > only able to return zero or negative error codes to userspace. However, > now that copy_file_range (which returns bytes copied) can use XFS' > clone_file_range, we have the opportunity to return partial results. > For example, if userspace sends a 1GB clone request and we run out of > space halfway through, we at least can tell userspace that we completed > 512M of that request like a regular write. > > Signed-off-by: Darrick J. Wong Looks ok to me. remap_file_range() still returns the full length, so there's no change of behaviour there. Reviewed-by: Dave Chinner -- Dave Chinner david at fromorbit.com