#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
+#include <linux/btrfs_tree.h>
#include <linux/fs.h>
#include <linux/loop.h>
+#include <linux/magic.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "fs-util.h"
#include "io-util.h"
#include "macro.h"
-#include "missing.h"
#include "path-util.h"
#include "rm-rf.h"
#include "smack-util.h"
/* Destroys the specified qgroup, but unassigns it from all
* its parents first. Also, it recursively destroys all
- * qgroups it is assgined to that have the same id part of the
+ * qgroups it is assigned to that have the same id part of the
* qgroupid as the specified group. */
r = btrfs_qgroupid_split(qgroupid, NULL, &subvol_id);
if (old_child_fd < 0)
return -errno;
- np = strjoin(subvolume, "/", ino_args.name);
+ np = path_join(subvolume, ino_args.name);
if (!np)
return -ENOMEM;
} else if (r < 0)
return r;
- r = copy_directory_fd_full(old_fd, new_path, COPY_MERGE|COPY_REFLINK, progress_path, progress_bytes, userdata);
+ r = copy_directory_fd_full(old_fd, new_path, COPY_MERGE|COPY_REFLINK|COPY_SAME_MOUNT, progress_path, progress_bytes, userdata);
if (r < 0)
goto fallback_fail;