On Saturday 03 May 2008, Yan Zheng wrote: > 2008/5/3, Sage Weil <[EMAIL PROTECTED]>: > > Hi Yan- > > > > On Sat, 3 May 2008, Yan Zheng wrote: > > > I think the clone ioctl won't work in some corner case. The big loop > > > in btrfs_ioctl_clone uses path->slots[0]++ and btrfs_next_leaf to get > > > next item in the tree. However, this approach works only when the > > > layout of tree keeps unchangeed. In btrfs_ioctl_clone, both > > > btrfs_insert_file_extent and dup_item_to_inode may change the layout > > > of tree. > > > > > > To be safe, I think the codes should: > > > use btrfs_search_slot to find next item. > > > use a intermediate buffer when coping item between two extent buffer.
[ ... ] > In my previous mail, I said items of different types should be > differentiated. Actually, there is no need to do that. Please consider > changing the big loop in btrfs_ioctl_clone to something like: Oh, nice catch Yan, thanks. I've pushed out a new version to the unstable tree. Sage, could you please give this a try too? -chris _______________________________________________ Btrfs-devel mailing list [email protected] http://oss.oracle.com/mailman/listinfo/btrfs-devel
