Description of problem: The below command shows that the file fragmentation increases after the first activation of prelink: sudo find / -xdev -type f -exec filefrag '{}' \; | grep -v "[01] extent" Expected results: Why not reallocating the whole file when its content is changed ? Moreover it would also defragment the files which were previously fragmented. Since the goal of prelink is to speedup the applications launch I think that reallocating the file blocks of the modified files isn't out of the scope of prelink.
Prelink never writes into the original file, that would be racy. It always writes first a new complete file in the same directory and then just renames it over. I don't see how doing that can fragment the files, unless the filesystem does something bad.
Then why not allocating the file at one time before filling its content ? This would possibly spare fragmentation.
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
The not yet released elfutils 0.162 makes sure to call posix_fallocate for the whole elf size before writing. Which might help prevent fragmentation. Although I am slightly the current approach (which ftruncates the file and then writes the ELF parts) does cause fragmentation. It really shouldn't unless the file system is already fragmented/low on space. elfutils 0.162 will be released later this week and then be added to fedora rawhide.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.