seeking advice on sparse files on xfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks:

I've been using sparse files on xfs for a while, and every now and then have the pleasure of copying them. Using coreutils cp (standard linux cp) usually winds up with the utility seeking through the entire file (yes, even with with the --sparse=* options set).

It seems to me that the code is blissfully unware of the file extents, and its sparse implementation amounts to a read, a check to see if it needs to write it as a hole, write it, and the next seek. Iterate until done.

Here's my question. Is there a way to (easily) programmatically hand cp (or any other utility) something akin to the output of xfs_bmap, and thus save it potentially *gargantuan* amounts of seeking over known zero regions? File sparsity in these cases are from 80-99% in some cases (fills of 1-20%) for multi GB/TB sized files.

Pointers appreciated. I am looking at the copy routines in coreutils now, looking to see if we can increase its intelligence somewhat w.r.t. sparse files.

  Thanks!

Joe

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux