Re: [PATCH] Btrfs: fix a bug of snapshot-aware defrag to make it work on partial extents

2013-07-03 Thread Liu Bo
On Mon, Jul 01, 2013 at 04:22:06PM -0400, Josef Bacik wrote: On Mon, Jul 01, 2013 at 10:13:26PM +0800, Liu Bo wrote: For partial extents, snapshot-aware defrag does not work as expected, since a) we use the wrong logical offset to search for parents, which should be disk_bytenr +

Re: [PATCH] Btrfs: fix a bug of snapshot-aware defrag to make it work on partial extents

2013-07-01 Thread Josef Bacik
On Mon, Jul 01, 2013 at 10:13:26PM +0800, Liu Bo wrote: For partial extents, snapshot-aware defrag does not work as expected, since a) we use the wrong logical offset to search for parents, which should be disk_bytenr + extent_offset, not just disk_bytenr, b) 'offset' returned by the