[PATCH 1/2] zhashfs, detect fill pattern and suppress blocks in output
Daniel Drake
dsd at laptop.org
Tue Apr 26 14:25:34 EDT 2011
On 25 April 2011 20:37, James Cameron <quozl at laptop.org> wrote:
> No, because that would fail to detect blocks that have been read and
> then written unchanged. While I don't know of any examples of that
> being done, it is still a possibility, either now or in the future.
>
> Using FIEMAP will place a kernel version dependency on zhashfs
> unnecessarily, since the task can be done with memcmp.
>
> It would also be more complex code to process the FIEMAP extents; more
> complex than memcmp.
>
> It would also require the output directory to be on a filesystem that
> supports sparse files. (Attempting to create a sparse file using dd on
> a FAT filesystem results in a non-sparse file of the specified size ...
> a FIEMAP ioctl on this would show no holes).
I think all of those are safe assumptions to make, and that FIEMAP is
the more correct and efficient way of doing this.
Daniel
More information about the Devel
mailing list