copy: handle mergeable extents across fiemap scans
authorPádraig Brady <P@draigBrady.com>
Tue, 5 Apr 2011 10:04:13 +0000 (11:04 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 6 Apr 2011 22:15:19 +0000 (23:15 +0100)
commit18f5a8537c49d87a7ba5c3fa0bcf9215bf9877a7
tree7d49768fa78a69249ea8b149db2cfdeb813350bd
parent8b2bedadb565489085e24833da34175e2be7e4cc
copy: handle mergeable extents across fiemap scans

* extent-scan.h (extent_scan_free): Init the pointer to NULL,
and reset the count to 0, so that we can realloc the buffer.
* src/extent-scan.c (extent_scan_init): Likewise.
(extent_scan_read): Loop over multiple fiemap scans, so we handle
mergeable extents that span across fiemap scan boundaries.  Once
we have enough unique extents, return so as to minimize memory use.
src/extent-scan.c
src/extent-scan.h