From: Filipe Manana Date: Mon, 9 Jun 2014 02:48:05 +0000 (+0100) Subject: Btrfs: make fsync work after cloning into a file X-Git-Tag: omap-for-v3.16/fixes-against-rc1~54^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ffbb598a059b73487909619d73150f99b50337a;p=pandora-kernel.git Btrfs: make fsync work after cloning into a file When cloning into a file, we were correctly replacing the extent items in the target range and removing the extent maps. However we weren't replacing the extent maps with new ones that point to the new extents - as a consequence, an incremental fsync (when the inode doesn't have the full sync flag) was a NOOP, since it relies on the existence of extent maps in the modified list of the inode's extent map tree, which was empty. Therefore add new extent maps to reflect the target clone range. A test case for xfstests follows. Signed-off-by: Filipe David Borba Manana Signed-off-by: Chris Mason --- Reading git-diff-tree failed