Lines Matching refs:old_fd
1529 static int subvol_snapshot_children(int old_fd, int new_fd, const char *subvolume, uint64_t old_subvol_id, BtrfsSnapshotFlags flags) {
1546 .fd = old_fd,
1552 assert(old_fd >= 0);
1566 r = btrfs_subvol_get_id_fd(old_fd, &old_subvol_id);
1593 if (ioctl(old_fd, BTRFS_IOC_TREE_SEARCH, &args) < 0)
1629 if (ioctl(old_fd, BTRFS_IOC_INO_LOOKUP, &ino_args) < 0)
1641 old_child_fd = openat(old_fd, c, O_RDONLY|O_NOCTTY|O_CLOEXEC|O_DIRECTORY);
1709 int btrfs_subvol_snapshot_fd(int old_fd, const char *new_path, BtrfsSnapshotFlags flags) {
1714 assert(old_fd >= 0);
1717 r = btrfs_is_subvol_fd(old_fd);
1728 r = copy_directory_fd(old_fd, new_path, true);
1753 return subvol_snapshot_children(old_fd, new_fd, subvolume, 0, flags);
1757 _cleanup_close_ int old_fd = -1;
1762 old_fd = open(old_path, O_RDONLY|O_NOCTTY|O_CLOEXEC|O_DIRECTORY);
1763 if (old_fd < 0)
1766 return btrfs_subvol_snapshot_fd(old_fd, new_path, flags);