On 06/08/2014 10:48 PM, Filipe David Borba Manana wrote: > 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.
[ ... ] > @@ -3406,6 +3471,10 @@ process_slot: > } > ret = clone_finish_inode_update(trans, inode, destoff + len, > destoff, olen); > + if (ret) > + goto out; > + clone_update_extent_map(inode, trans, path, NULL, last_dest_end, > + destoff + len - last_dest_end); > } > > out: > path has already been released by this point, I'm getting use-fater-free crashes during xfstests. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
