@@ -1913,3 +1913,13 @@ int btrfs_list_get_path_rootid(int fd, u64 *treeid)
*treeid = args.treeid;
return 0;
}
+
+int wait_for_commit(int fd)
+{
+ int ret;
+
+ ret = ioctl(fd, BTRFS_IOC_START_SYNC, NULL);
+ if (ret < 0)
+ return ret;
+ return ioctl(fd, BTRFS_IOC_WAIT_SYNC, NULL);
+}
@@ -36,7 +36,6 @@
#include "commands.h"
#include "utils.h"
#include "btrfs-list.h"
-#include "utils.h"
static int is_subvolume_cleaned(int fd, u64 subvolid)
{
@@ -223,16 +222,6 @@ out:
return retval;
}
-static int wait_for_commit(int fd)
-{
- int ret;
-
- ret = ioctl(fd, BTRFS_IOC_START_SYNC, NULL);
- if (ret < 0)
- return ret;
- return ioctl(fd, BTRFS_IOC_WAIT_SYNC, NULL);
-}
-
static const char * const cmd_subvol_delete_usage[] = {
"btrfs subvolume delete [options] <subvolume> [<subvolume>...]",
"Delete subvolume(s)",
@@ -225,6 +225,7 @@ int test_isdir(const char *path);
const char *subvol_strip_mountpoint(const char *mnt, const char *full_path);
int get_subvol_info(const char *fullpath, struct root_info *get_ri);
+int wait_for_commit(int fd);
/*
* Btrfs minimum size calculation is complicated, it should include at least:
wait_for_commit() is needed by encrypt patch set so this patch makes it non static. Also as utils.h is included twice deletes one of it. Signed-off-by: Anand Jain <anand.jain@oracle.com> --- btrfs-list.c | 10 ++++++++++ cmds-subvolume.c | 11 ----------- utils.h | 1 + 3 files changed, 11 insertions(+), 11 deletions(-)