erofs-utils: mkfs: fix unexpected errors for chunk-based images
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 16 Oct 2024 07:48:49 +0000 (15:48 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 16 Oct 2024 07:54:42 +0000 (15:54 +0800)
commita4b10b26e1bf0f36563c7228ec39d77def1090ec
treea5df83696ff0c531e9ab1873f9ae0ca1967e9598
parent882ad1c3157f7544bd4d004e3b6d744f0cbe3ffc
erofs-utils: mkfs: fix unexpected errors for chunk-based images

mkfs.erofs may fail because copy_file_range() returns the number of
bytes which could be less than the length originally requested.

Fixes: 03cbf7b8f7f7 ("erofs-utils: mkfs: support chunk-based uncompressed files")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241016074849.2862282-1-hsiangkao@linux.alibaba.com
lib/blobchunk.c