diff options
author | Tobias Stoeckmann | 2018-02-25 20:27:59 +0100 |
---|---|---|
committer | Karel Zak | 2018-02-26 11:54:12 +0100 |
commit | fcfe1a5cde0ad12a52f580037da201de667c5ced (patch) | |
tree | 803a344c7333dca84e09537b7214dac8ac54151d /sys-utils/blkzone.8 | |
parent | fincore: Handle large files correctly on 32 bit (diff) | |
download | kernel-qcow2-util-linux-fcfe1a5cde0ad12a52f580037da201de667c5ced.tar.gz kernel-qcow2-util-linux-fcfe1a5cde0ad12a52f580037da201de667c5ced.tar.xz kernel-qcow2-util-linux-fcfe1a5cde0ad12a52f580037da201de667c5ced.zip |
fincore: Handle large files on 32 bit without LFS
If util-linux is installed on a system without large file support,
an out of memory issue can occur while processing a file which is
2 GB in size:
$ ./configure --disable-largefile && make
$ dd if=/dev/zero of=2gb-file seek=2147483646 count=1 bs=1
$ fincore 2gb-file
(endless loop)
fincore: failed to do mmap: 2gb-file: Cannot allocate memory
Even though iterating with "len" seems counter-intuitive, it fixes
this issue. The variable len is only in the last iteration not a
multiplication of pagesize -- which is the requirement for mmap.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'sys-utils/blkzone.8')
0 files changed, 0 insertions, 0 deletions