Hide Forgot
Description of problem: hardlink does not link files larger than 1 GB. For files larger than 1 GB but smaller than 2 GB, an error is printed "Failed to mmap <filename>. File sized 2GB or larger are silently ignored. Version-Release number of selected component (if applicable): hardlink-1.0-1.27 How reproducible: Always Steps to Reproduce: 1. Create linkable files of various sizes for i in 512 1024 1536 2048 do dd if=/dev/zero of=$i.dat bs=1024k count=$i cp $i.dat $i.dat.bak done 2. hardlink -vvc . Actual results: Failed to mmap ./1536.dat.bak Linked ./1024.dat.bak to ./1024.dat, saved 1073741824 Linked ./512.dat to ./512.dat.bak, saved 536870912 Expected results: All files linked, no error messages Additional info: Same problem with hardlink-1.0-9.fc12.i686 on Fedora 14 i686
Does it fail for you if you set "ulimit -v unlimited" ? With unlimited virtual memory I get: $ hardlink -vvc . Linked ./512.dat to ./512.dat.bak, saved 536870912 Linked ./2048.dat to ./2048.dat.bak, saved 2147483648 Linked ./1536.dat.bak to ./1536.dat, saved 1610612736 Linked ./1024.dat.bak to ./1024.dat, saved 1073741824 Directories 1 Objects 10 IFREG 9 Mmaps 4 Comparisons 4 Linked 4 saved 5368709120
Fails too; ulimit -v is already unlimited. I should have mentioned hardlink does not fail on x86_64. You need to test on i686.
I suppose this has to do with the 2GB addressing limit for 32-bit processes. This may not be circumvented when using mmap(). If so, I would suggest to at least print a more clear error message for files > 1GB && < 2GB, and to not silently ignore files > 2GB
Created attachment 482274 [details] Patch to let hardlink manipulate with 1GiB+ files on i386 This could be fixed quite easily by replacing mmap() with read(). Please test.
Yes it works. Thanks.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).
This issue is fixed and should have been closed as fixed.