mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl currently uses the FIBMAP ioctl to map blocks for the bootloader; on XFS, if FIBMAP is requested on a reflinked file, it will fail - and FIBMAP returns 0 in this case, which is indistinguishable from a hole. This causes boot to fail because the file is not mapped. We can use the FIEMAP ioctl instead, which is able to map reflinked files. While FIEMAP is able to map entire extents at once, here we simply use it to obtain the mapping block-by-block so that it fits in with the current FIBMAP calls. Fixes: https://github.com/ibm-s390-tools/s390-tools/issues/34 Closes: https://github.com/ibm-s390-tools/s390-tools/pull/36 Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Tested-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>