]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
debugfs.c: do sparse copy when src is a sparse file
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 14 Oct 2013 02:08:40 +0000 (22:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Oct 2013 02:08:40 +0000 (22:08 -0400)
commitc756ec4217dcc045f70f49f2a758ba301b057e55
treed08e1a9b86d1e93f911f95e1ea226263ce56d255
parent355ffb2ff566229b8bc3f5f7557e91edff5a767a
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>
debugfs/debugfs.c