From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [RFC v0 1/4] vfs: add copy_range syscall and vfs entry point Date: Wed, 15 May 2013 16:25:43 -0400 Message-ID: <20130515202543.24668.14371@localhost.localdomain> References: <20130515193600.GA318@lenny.home.zabbo.net> <20130515201614.24668.83788@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Cc: Zach Brown , linux-fsdevel , "linux-cifs@vger.kernel.org" , "J. Bruce Fields" To: Steve French Return-path: Received: from dkim1.fusionio.com ([66.114.96.53]:42994 "EHLO dkim1.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932623Ab3EOUZp convert rfc822-to-8bit (ORCPT ); Wed, 15 May 2013 16:25:45 -0400 Received: from mx2.fusionio.com (unknown [10.101.1.160]) by dkim1.fusionio.com (Postfix) with ESMTP id 4EA927C068F for ; Wed, 15 May 2013 14:25:45 -0600 (MDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Quoting Steve French (2013-05-15 16:21:12) > On Wed, May 15, 2013 at 3:16 PM, Chris Mason wrote: > > truncate_inode_pages_range ends with invalidate. It just locks the page > > first and makes sure to wait for writeback if it was already in > > progress. > > Does > > truncate_inode_pages_range(&inode->i_data, destoff, > PAGE_CACHE_ALIGN(destoff + len) - 1); > > > I also am worried about what does: > > 1) writing out data from start of previous page up to destoff (if > destoff not page aligned, and first page dirty) > 2) writing out data from dest+len through end of page (if destoff not > page aligned, and last page dirty) > > before tossing first through last page out It does a check for a partial first page (sending down the partial offset to invalidatepage), but the last page is fully truncated. -chris