[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] seek_hole proposal
From: |
Pavel Raiskup |
Subject: |
[Bug-tar] seek_hole proposal |
Date: |
Thu, 27 Feb 2014 14:12:35 +0100 |
User-agent: |
KMail/4.12.2 (Linux/3.13.3-201.fc20.x86_64; KDE/4.12.2; x86_64; ; ) |
Hello all,
I am trying to prepare patch which would reuse lseek's
SEEK_HOLE/SEEK_DATA, the [v1] is attached. Some info:
Note that after discussion [1] I still think that existing ST_IS_SPARSE
macro is better for file-sparseness detection than using SEEK_HOLE (not
worth having additional syscalls open~>seek~>close).
I have played with similar idea; changing "fstatat() ~> open()" sequence
to "open() ~> fstat() (and close eventually if file is not dumpable..)".
this case, we would need only two calls of lseek(). I have such patch but
I reverted it locally due to unnecessary complexity (I can share if you
were interested, that could be useful for some more precise sparseness
detection; concretely for sparse files of size < 512B).
Note that I don't know what the scan_parse() callback should be used for
so I didn't used in new function sparse_scan_file_seek. Some help would
be needed.
[1] http://www.mail-archive.com/address@hidden/msg04199.html
Thanks for any comment,
Pavel
PS: Use --ignore-space-change due to some indentation changes
0001-tar-use-SEEK_HOLE-for-hole-detection.patch
Description: Text Data
testsuite.log.gz
Description: application/gzip
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] seek_hole proposal,
Pavel Raiskup <=