btrfs-progs: rename lookup_ino_rootid
It does not resolve the inode number but path where fd has been opened. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3fe243296d
commit
49cb98e5d6
|
@ -459,7 +459,7 @@ static int du_add_file(const char *filename, int dirfd,
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = lookup_ino_rootid(fd, &subvol);
|
||||
ret = lookup_path_rootid(fd, &subvol);
|
||||
if (ret)
|
||||
goto out_close;
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ static int cmd_inspect_rootid(int argc, char **argv)
|
|||
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;
|
||||
|
|
|
@ -366,7 +366,7 @@ static int cmd_qgroup_show(int argc, char **argv)
|
|||
}
|
||||
|
||||
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));
|
||||
|
|
4
utils.c
4
utils.c
|
@ -2927,7 +2927,7 @@ path:
|
|||
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);
|
||||
|
@ -3609,7 +3609,7 @@ int ask_user(const char *question)
|
|||
* - 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;
|
||||
|
|
2
utils.h
2
utils.h
|
@ -209,7 +209,7 @@ int is_vol_small(const char *file);
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue