Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-02-21 Thread Pavel Raiskup
We should overwrite the size when realsize has not been specified, not just when our size exceeds what's in st_size. Attached another attempt. Paul, what do you think? Thanks, Pavel

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-02-21 Thread Paul Eggert
On 02/21/13 05:37, Pavel Raiskup wrote: Paul, what do you think? Sorry, I've lost context. Is there a test case illustrating the bug that this fixes?

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-02-21 Thread Pavel Raiskup
On Thu, 2013-02-21 at 09:26 -0800, Paul Eggert wrote: On 02/21/13 05:37, Pavel Raiskup wrote: Paul, what do you think? Sorry, I've lost context. Is there a test case illustrating the bug that this fixes? Just prepare sparse file of effective size 8GB and try to create --posix tarball

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-29 Thread Pavel Raiskup
Hmm, this doesn't feel right. Can't the sparse size be greater than the real size, in some (unusual) cases? Really don't know, could you point me somewhere to make me able to test this? We should overwrite the size when realsize has not been specified, not just when our size exceeds what's

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-28 Thread Pavel Raiskup
Hi Paul, Thanks for catching that bug. We don't yet have a facility for large test cases, so I guess we can put that on the todo list. I agree (this is probably about paxutils?). Your patch doesn't feel quite right, as there's a similar issue in pax_dump_header_0, and also there's a

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-28 Thread Pavel Raiskup
On Mon, 2013-01-28 at 10:17 +0100, Pavel Raiskup wrote: Hi Paul, Thanks for catching that bug. We don't yet have a facility for large test cases, so I guess we can put that on the todo list. I agree (this is probably about paxutils?). Your patch doesn't feel quite right, as there's

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-28 Thread Pavel Raiskup
On Mon, 2013-01-28 at 14:59 +0100, Pavel Raiskup wrote: On Mon, 2013-01-28 at 10:17 +0100, Pavel Raiskup wrote: Hi Paul, Thanks for catching that bug. We don't yet have a facility for large test cases, so I guess we can put that on the todo list. I agree (this is probably about

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-28 Thread Paul Eggert
On 01/28/13 08:40, Pavel Raiskup wrote: + if (u st-stat.st_size) + /* Do *not* overwrite stat.st_size when it has been set by +GNU.sparse.realsize (func sparse_size_decoder) already. */ + st-stat.st_size = u; Hmm, this doesn't feel right. Can't the sparse size be

Re: [Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-26 Thread Paul Eggert
Thanks for catching that bug. We don't yet have a facility for large test cases, so I guess we can put that on the todo list. Your patch doesn't feel quite right, as there's a similar issue in pax_dump_header_0, and also there's a problem if the shrunken size is less than 8 GiB but the real size

[Bug-tar] POSIX_ARCHIVE big sparse files (= 2^33 B excluding holes)

2013-01-25 Thread Pavel Raiskup
Hi, I'm attaching patch for bug in tar for --posix --sparse options. Could you please consider applying? Reproduce: 1. Create sparse file of shrunken size (real data) = 8^11 bytes. 2. tar --posix --sparse -cf /dev/null ThatBigFile 3. Tar fails with: tar: value [BIG_NUMBER] out of