It does not resolve the inode number but path where fd has been opened.
Signed-off-by: David Sterba <dsterba@suse.com>
goto out;
}
- ret = lookup_ino_rootid(fd, &subvol);
+ ret = lookup_path_rootid(fd, &subvol);
if (ret)
goto out_close;
goto out;
}
- ret = lookup_ino_rootid(fd, &rootid);
+ ret = lookup_path_rootid(fd, &rootid);
if (ret) {
error("failed to lookup root id: %s", strerror(-ret));
goto out;
}
if (filter_flag) {
- ret = lookup_ino_rootid(fd, &qgroupid);
+ ret = lookup_path_rootid(fd, &qgroupid);
if (ret < 0) {
error("cannot resolve rootid for %s: %s",
path, strerror(-ret));
fd = open(p, O_RDONLY);
if (fd < 0)
goto err;
- ret = lookup_ino_rootid(fd, &id);
+ ret = lookup_path_rootid(fd, &id);
if (ret)
error("failed to lookup root id: %s", strerror(-ret));
close(fd);
* - BTRFS_EMPTY_SUBVOL_DIR_OBJECTID (directory with ino == 2) the result is
* undefined and function returns -1
*/
-int lookup_ino_rootid(int fd, u64 *rootid)
+int lookup_path_rootid(int fd, u64 *rootid)
{
struct btrfs_ioctl_ino_lookup_args args;
int ret;
int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
int verify);
int ask_user(const char *question);
-int lookup_ino_rootid(int fd, u64 *rootid);
+int lookup_path_rootid(int fd, u64 *rootid);
int btrfs_scan_devices(void);
int get_btrfs_mount(const char *dev, char *mp, size_t mp_size);
int find_mount_root(const char *path, char **mount_root);