patchGNU tar - Patches: patch #10432, create: Always check for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10432: create: Always check for sparseness if '--hole-detection=raw'

Submitter:  Douglas Anderson <dianders>
Submitted:  Sat 27 Jan 2024 12:38:56 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  gray Open/Closed:  Open

Mon 12 May 2025 10:41:39 AM UTC, comment #1: 


> We don't really care about whether the OS thinks they're sparse,


Actually, we do.  The documentation states that:

> When you use this option (--sparse), then, for any file using less disk space than would be expected from its length, 'tar' searches the file for holes.


(emphasis is mine).  It makes no distinction between detection methods in this regard, so it doesn't seem logical to make 'raw' differ from 'seek'.  The main purpose of distinguishing between the two is portability: 'raw' is portable, while 'seek' is not.

Besides, the 'raw' detection method is much slower than 'seek', so applying
it to each file could drastically increase archivation time.

While the proposed method could be useful when compressing sparse files is more important than speed, I'd rather introdcuce a special option for it.

Sergey Poznyakoff <gray>
Group administrator
Sat 27 Jan 2024 12:38:56 AM UTC, original submission:  

If we're using 'hole-detection=raw' then we're going to be manually
looking for sparseness in our files. We don't really care about
whether the OS thinks they're sparse, so don't do the check about the
number of blocks the OS thinks the file takes.

Without this change if I use "tar --hole-detection=raw -cf" to tar up
a file that's got lots of zeros (but isn't marked by the OS as
sparse), when I untar the file then it's still not sparse. With this
change then the zeros are correctly transformed into sparseness.

Douglas Anderson <dianders>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gray (Posted a comment)
  • -email is unavailable- added by dianders (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-05-12 gray StatusNone Wont Do
        Assigned toNone gray
    2024-01-27 dianders Attached File- Added create-Always-check-for-sparseness-if-hole-detection.patch, #55620

    Back to the top

    Powered by Savane 3.15-f85b.
    Corresponding source code