[PATCH] Btrfs: truncate pages from clone ioctl target range

2011-08-10 Thread Sage Weil
We need to truncate page cache pages for the clone ioctl target range or else we'll confuse ourselves to no end. If the old data was cached, we used to still see it (until remount). If the page was partially updated we used to get a mix of old and new data. Signed-off-by: Sage Weil --- v1->v2:

Re: [PATCH] Btrfs: truncate pages from clone ioctl target range

2011-08-09 Thread David Sterba
just a readability issue: On Tue, Aug 09, 2011 at 12:00:41PM -0700, Sage Weil wrote: > --- a/fs/btrfs/ioctl.c > +++ b/fs/btrfs/ioctl.c > @@ -2243,6 +2243,10 @@ static noinline long btrfs_ioctl_clone(struct file > *file, unsigned long srcfd, > btrfs_wait_ordered_range(src, off, len);

[PATCH] Btrfs: truncate pages from clone ioctl target range

2011-08-09 Thread Sage Weil
We need to truncate page cache pages for the clone ioctl target range or else we'll confuse ourselves to no end. If the old data was cached, we'll still see it (until remount). If it was dirty we'll get a mix of old and new data if the page(s) are partially updated. Signed-off-by: Sage Weil ---