Bug 128335
Summary: | rpm doesn't handle sparse files efficiently | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jakub Jelinek <jakub> |
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> |
Status: | CLOSED WONTFIX | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | drepper, herrold, laroche, nobody+pnasrat, yersinia.spiros |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-04-04 11:16:57 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 150224 |
Description
Jakub Jelinek
2004-07-21 20:37:40 UTC
rpm decompresses into a mmap'd buffer, so sparse files are filled in by zlib I believe. Possibly blocks of zero's can be eliminated after installing. Special handling for PT_LOAD and elf within cpio unpacking is almost certainly not the right approach. > Special handling for PT_LOAD and elf within cpio unpacking
> is almost certainly not the right approach.
If you don't want to do this, it is required that you record somehow
somewere in the .rpm file which parts of the original files have been
sparsely allocated. The problem is that you in general cannot just
force every file to be sparse. There are noticeable difference: the
file layout will be non-sequential in some cases (-> performance), or
no disk space can be allocated for a file once data is written to the
sparse area.
On the o ther hand, these issues will never pop up with executables.
So it makes sense to treat them special if you don't want to do it
100% right.
OK, I know how to implement sparse file handling in rpm for PT_LOAD segment gaps. If this change is actually necessary, rather than desirable, then I suggest you expedite through other channels than bugzilla. NEEDINFO, I know what to do in rpm, but perhaps installing all executables sparsely needs to be carefully thought through before attempting an implementation. I've never seen any unix user who was not surprised by, say, cp -R /usr /var/tmp when there are sparse files that are involved, one's disk space mysteriously vanishes. And yes I know there are options to handle sparse files correctly, I just don't believe those options are widely known or used. I cannot see any problem with installing all binaries sparsely. You can recognize ELF binaries easily and then treat them appropriately. Sure there's no problem installing elf files sparsely in rpm. The problem is the change when users do "cp -R" or any other command that does not copy files sparsely. Disk space can/will be used when sparse blocks are filled in, that is invariably surprising to end-users. Again, not my call. You want sparse file handling in rpm, it's easier to implement than to discuss the merits of sparse files. Off to distribution, please attach to some tracking bug so that I have a clue when and where sparse file rpm installs are desired. Currently not being considered for U5 unless informed otherwise. |