From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752348AbcGSEsl (ORCPT ); Tue, 19 Jul 2016 00:48:41 -0400 Received: from mail.kernel.org ([198.145.29.136]:34486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037AbcGSEsY (ORCPT ); Tue, 19 Jul 2016 00:48:24 -0400 Date: Mon, 18 Jul 2016 21:48:20 -0700 From: Jaegeuk Kim To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-api@vger.kernel.org Subject: Re: [PATCH 3/3] f2fs: support clone_file_range Message-ID: <20160719044820.GA80986@jaegeuk> References: <20160717062427.56718-1-jaegeuk@kernel.org> <20160717062427.56718-3-jaegeuk@kernel.org> <20160719034736.GA4037@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160719034736.GA4037@infradead.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 18, 2016 at 08:47:36PM -0700, Christoph Hellwig wrote: > On Sat, Jul 16, 2016 at 11:24:27PM -0700, Jaegeuk Kim wrote: > > This patch implements clone_file_range in f2fs. > > [...] > > > +int f2fs_clone_file_range(struct file *file_in, loff_t pos_in, > > + struct file *file_out, loff_t pos_out, u64 len) > > +{ > > + return f2fs_clone_files(file_in, pos_in, file_out, pos_out, len); > > +} > > + > > Falling back from copy to clone should be done in the VFS. I look into > implementing the fallback, and the code is trivial, but we don't seem > to have any useful coverage for copy_file_range yet, so I didn't dare > to add it yet. How did you test copy and clone in f2fs? And how did > you handle the difference in corner cases (e.g. the lacking 0 special > case in copy)? Frankly speaking, I confused the behaviors without being aware of corner cases. And thus, I dropped the patches already. Instead, I realized that what I did was moving a range of blocks from one file to another file. So, I've been testing a new ioctl, F2FS_IOC_MOVE_RANGE. In terms of coverage, I just did some unit tests only. Thanks,