[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] POSIX_ARCHIVE & big sparse files (>= 2^33 B excluding holes)
From: |
Pavel Raiskup |
Subject: |
[Bug-tar] POSIX_ARCHIVE & big sparse files (>= 2^33 B excluding holes) |
Date: |
Fri, 25 Jan 2013 14:17:59 +0100 |
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 off_t range 0..8589934591
tar: Exiting with failure status due to previous errors
Simple test:
$ cat script
#!/bin/bash
COUNT=1 # 1000 * 2 * 10M ~> ~ 20GB
if ! test -z "$2"; then
COUNT=$2
fi
for i in `seq 0 $(( $COUNT - 1))`; do
dd if=/dev/urandom of=$1 bs=4K count=$(( 256 * 10 )) \
seek=$(( $i * 2 * 256 * 10 )) 2> /dev/null
echo $i
done
$ ./script BIGFILE 1000
Sorry that I haven't written test. I was unable to use genfile utility to
produce such files. Is the 'dd' utility used as above ^^ ok for portability
reasons?
Pavel
0001-sparse-Fix-bug-in-POSIX_FORMAT.patch
Description: Text Data
- [Bug-tar] POSIX_ARCHIVE & big sparse files (>= 2^33 B excluding holes),
Pavel Raiskup <=