Lines Matching refs:fdf

51 int copy_bytes(int fdf, int fdt, uint64_t max_bytes, bool try_reflink) {
55 assert(fdf >= 0);
61 lseek(fdf, 0, SEEK_CUR) == 0 &&
64 r = btrfs_reflink(fdf, fdt);
85 n = sendfile(fdt, fdf, NULL, m);
101 n = splice(fdf, NULL, fdt, NULL, m, 0);
119 n = read(fdf, buf, m);
162 _cleanup_close_ int fdf = -1, fdt = -1;
170 fdf = openat(df, from, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
171 if (fdf < 0)
178 r = copy_bytes(fdf, fdt, (uint64_t) -1, true);
194 (void) copy_xattr(fdf, fdt);
256 _cleanup_close_ int fdf = -1, fdt = -1;
266 fdf = openat(df, from, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
268 fdf = fcntl(df, F_DUPFD_CLOEXEC, 3);
270 d = fdopendir(fdf);
273 fdf = -1;
343 int copy_tree_at(int fdf, const char *from, int fdt, const char *to, bool merge) {
349 if (fstatat(fdf, from, &st, AT_SYMLINK_NOFOLLOW) < 0)
353 return fd_copy_regular(fdf, from, &st, fdt, to);
355 return fd_copy_directory(fdf, from, &st, fdt, to, st.st_dev, merge);
357 return fd_copy_symlink(fdf, from, &st, fdt, to);
359 return fd_copy_fifo(fdf, from, &st, fdt, to);
361 return fd_copy_node(fdf, from, &st, fdt, to);
387 _cleanup_close_ int fdf = -1;
393 fdf = open(from, O_RDONLY|O_CLOEXEC|O_NOCTTY);
394 if (fdf < 0)
397 r = copy_bytes(fdf, fdt, (uint64_t) -1, try_reflink);
399 (void) copy_times(fdf, fdt);
400 (void) copy_xattr(fdf, fdt);
464 int copy_times(int fdf, int fdt) {
469 assert(fdf >= 0);
472 if (fstat(fdf, &st) < 0)
481 if (fd_getcrtime(fdf, &crtime) >= 0)
487 int copy_xattr(int fdf, int fdt) {
499 n = flistxattr(fdf, bufa, sza);
528 m = fgetxattr(fdf, p, bufb, szb);