commit | c756ec4217dcc045f70f49f2a758ba301b057e55 | [log] [tgz] |
---|---|---|
author | Robert Yang <liezhi.yang@windriver.com> | Sun Oct 13 22:08:40 2013 -0400 |
committer | Theodore Ts'o <tytso@mit.edu> | Sun Oct 13 22:08:40 2013 -0400 |
tree | d08e1a9b86d1e93f911f95e1ea226263ce56d255 | |
parent | 355ffb2ff566229b8bc3f5f7557e91edff5a767a [diff] |
debugfs.c: do sparse copy when src is a sparse file Let debugfs do sparse copy when src is a sparse file, just like "cp --sparse=auto" * For the: #define IO_BUFSIZE 64*1024 this is a suggested value from gnu coreutils: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/ioblksize.h;h=1ae93255e7d0ccf0855208c7ae5888209997bf16;hb=HEAD * Use malloc() to allocate memory for the buffer since put 64K (or more) on the stack seems not a good idea. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>