diff options
author | Luca Boccassi <bluca@debian.org> | 2023-04-28 12:34:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 12:34:41 +0200 |
commit | 91010bd6ccd363be9e09f22c60d45f5e27c1d2a8 (patch) | |
tree | 75aad1e83b20e261f9aa239697894af66f70e93b /src | |
parent | network-generator: shorten code a bit (diff) | |
parent | missing_fs: mention commit hash and version of ioctl commands introduced (diff) | |
download | systemd-91010bd6ccd363be9e09f22c60d45f5e27c1d2a8.tar.xz systemd-91010bd6ccd363be9e09f22c60d45f5e27c1d2a8.zip |
Merge pull request #27440 from yuwata/reflink-follow-ups
copy: follow ups for reflink()
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/missing_fs.h | 6 | ||||
-rw-r--r-- | src/import/qcow2-util.c | 2 | ||||
-rw-r--r-- | src/shared/copy.c | 4 | ||||
-rw-r--r-- | src/shared/copy.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/basic/missing_fs.h b/src/basic/missing_fs.h index 9a0b12af4a..6dcea6c56a 100644 --- a/src/basic/missing_fs.h +++ b/src/basic/missing_fs.h @@ -6,15 +6,15 @@ #define RENAME_NOREPLACE (1 << 0) #endif -#ifndef BLKGETDISKSEQ +#ifndef BLKGETDISKSEQ /* 7957d93bf32bc211415827e44fdd9cdf1388df59 (5.15) */ #define BLKGETDISKSEQ _IOR(0x12,128,__u64) #endif -#ifndef FICLONE +#ifndef FICLONE /* 04b38d601239b4d9be641b412cf4b7456a041c67 (4.5) */ #define FICLONE _IOW(0x94, 9, int) #endif -#ifndef FICLONERANGE +#ifndef FICLONERANGE /* 04b38d601239b4d9be641b412cf4b7456a041c67 (4.5) */ #define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) #endif diff --git a/src/import/qcow2-util.c b/src/import/qcow2-util.c index 9addb5c555..c70656bc0e 100644 --- a/src/import/qcow2-util.c +++ b/src/import/qcow2-util.c @@ -69,7 +69,7 @@ static int copy_cluster( ssize_t l; int r; - r = reflink_full(sfd, soffset, dfd, doffset, cluster_size); + r = reflink_range(sfd, soffset, dfd, doffset, cluster_size); if (r >= 0) return r; diff --git a/src/shared/copy.c b/src/shared/copy.c index dd1306abe9..6a5a52309a 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -203,7 +203,7 @@ int copy_bytes_full( if (foffset == 0 && toffset == 0 && max_bytes == UINT64_MAX) r = reflink(fdf, fdt); /* full file reflink */ else - r = reflink_full(fdf, foffset, fdt, toffset, max_bytes == UINT64_MAX ? 0 : max_bytes); /* partial reflink */ + r = reflink_range(fdf, foffset, fdt, toffset, max_bytes == UINT64_MAX ? 0 : max_bytes); /* partial reflink */ if (r >= 0) { off_t t; @@ -1621,7 +1621,7 @@ int reflink(int infd, int outfd) { assert_cc(sizeof(struct file_clone_range) == sizeof(struct btrfs_ioctl_clone_range_args)); -int reflink_full(int infd, uint64_t in_offset, int outfd, uint64_t out_offset, uint64_t sz) { +int reflink_range(int infd, uint64_t in_offset, int outfd, uint64_t out_offset, uint64_t sz) { struct file_clone_range args = { .src_fd = infd, .src_offset = in_offset, diff --git a/src/shared/copy.h b/src/shared/copy.h index 4f97e542f5..c4482eba7e 100644 --- a/src/shared/copy.h +++ b/src/shared/copy.h @@ -106,4 +106,4 @@ static inline int copy_rights(int fdf, int fdt) { int copy_xattr(int df, const char *from, int dt, const char *to, CopyFlags copy_flags); int reflink(int infd, int outfd); -int reflink_full(int infd, uint64_t in_offset, int outfd, uint64_t out_offset, uint64_t sz); +int reflink_range(int infd, uint64_t in_offset, int outfd, uint64_t out_offset, uint64_t sz); |