Lines Matching defs:fd
56 char *get_btrfs_subvol_path(int fd, u64 dir_id, u64 objid, char *name,
68 ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
109 int btrfs_list_get_path_rootid(int fd, u64 *treeid)
117 ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
129 int fd, ret;
133 fd = open(path, O_RDONLY);
134 if (fd < 0)
138 ret = ioctl(fd, BTRFS_IOC_SPACE_INFO, &sargs);
139 close(fd);
223 int ret, fd = -1;
240 fd = open(newfull, O_RDONLY);
241 if (fd < 0) {
250 ret = ioctl(fd, BTRFS_IOC_SUBVOL_CREATE, &args);
254 close(fd);
301 int fd = -1, fddst = -1, ret = -1;
317 fd = open(orig, O_RDONLY);
318 if (fd < 0) {
329 args.fd = fd;
338 if (fd != -1)
339 close(fd);
414 int ret, fd = -1;
431 fd = open(newfull, O_RDONLY);
432 if (fd < 0) {
441 ret = ioctl(fd, BTRFS_IOC_SNAP_DESTROY, &args);
447 close(fd);
592 int fd;
605 fd = open(path, O_RDONLY);
606 if (fd < 0) {
611 if (btrfs_list_get_path_rootid(fd, &root_id)) {
613 close(fd);
625 close(fd);
644 ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
647 close(fd);
674 tmppath = get_btrfs_subvol_path(fd, sh.offset,
682 close(fd);
713 close(fd);