Whamcloud - gitweb
copy-in: for files, only iterate file blocks that are mapped
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 May 2015 14:46:48 +0000 (10:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 May 2015 14:46:48 +0000 (10:46 -0400)
commit76f132349182c5b59698e831223a7dbcb883ae3d
treeb9f819c2410982bc41fd075e5e3479b03f8db827
parenta433db04d054a4c949c816b28cfa9952b35e0b0a
copy-in: for files, only iterate file blocks that are mapped

Rewrite the file copy-in algorithm to detect smaller holes in the
files we're copying in.  Use SEEK_DATA/SEEK_HOLE/FIEMAP when available
to skip known empty parts.  This fixes the particular bug where zeroed
blocks on a system with 64k pages are needlessly copied into a
4k-block filesystem.  It also saves time by skipping parts we know to
be zeroed.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c