diff options
author | Yifan Zhao <zhaoyifan@sjtu.edu.cn> | 2023-06-25 16:08:19 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-06-27 19:00:42 +0800 |
commit | e4939f9eaa177e05d697ace85d8dc283e25dc2ed (patch) | |
tree | ac29f5addac06fc0848bb78f7062db43ae78145c | |
parent | 363966dc60c196bff2f9feeb7d249245265d5f12 (diff) | |
download | erofs-utils-e4939f9eaa177e05d697ace85d8dc283e25dc2ed.tar.gz |
erofs-utils: lib: fallback for copy_file_range
If tmpfs is used for /tmp and blob device is not specified, we need to
copy data between two different file systems during mkfs, which is not
supported by the copy_file_range() syscall. In this case, let's give it
a second chance by fallback to __erofs_copy_file_range().
Link: https://lore.kernel.org/r/20230625080819.44502-1-zhaoyifan@sjtu.edu.cn
Fixes: e9afc0408745 ("erofs-utils: introduce copy_file_range")
Fixes: 03cbf7b8f7f7 ("erofs-utils: mkfs: support chunk-based uncompressed files")
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-rw-r--r-- | lib/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -387,7 +387,7 @@ ssize_t erofs_copy_file_range(int fd_in, erofs_off_t *off_in, length, 0); if (ret >= 0) goto out; - if (errno != ENOSYS) { + if (errno != ENOSYS && errno != EXDEV) { ret = -errno; out: *off_in = off64_in; |