On Wed, Jul 25, 2012 at 7:20 PM, Alex Lyakas <alex.bolshoy.bt...@gmail.com> wrote: > Alexander, > >>> Same is true for BTRFS_FILE_EXTENT_PREALLOC extents, I think. Those >>> also don't contain real data. >>> So something like: >>> if (left_disknr == 0 || left_type == BTRFS_FILE_EXTENT_REG) { >>> ret = 1; >>> goto out; >>> } >> Do you mean "|| left_type == BTRFS_FILE_EXTENT_PREALLOC"? > > I see your point about bytenr==0, I missed that on the parent tree it > can be something else. > > As for PREALLOC: can it happen that on differential send we see extent > of type BTRFS_FILE_EXTENT_PREALLOC? And can it happen that parent had > some real data extent in that place? I don't know the answer, but if > yes, then we must treat PREALLOC as normal extent. So this case is > similar to bytenr==0. > I also don't know if that may happen. Currently, only REG extents are checked by is_extent_unchanged. All other types are regarded as changed and will be sent. So in the worst case the stream gets larget then it should be, but we won't loose data. I need to leave in a few minutes and will continue working on btrfs send/receive v2 later today. We should probably postpone "optimizations" (actually bug fixing) here for later...don't know if I find enough time to investigate more.
> Thanks, > Alex. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html