summaryrefslogtreecommitdiff
path: root/c_src/libbcachefs.h
diff options
context:
space:
mode:
authorAriel Miculas <ariel.miculas@gmail.com>2024-06-14 21:46:50 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-06-16 14:08:52 -0400
commitd750b2b98b492479eb71875499220608b6f19dcc (patch)
tree0b4218122e8ad3bb1cddafd1cbb8a33f83d60d4b /c_src/libbcachefs.h
parentf3ab07db7394cd2142ef9cc5cbc62b4bdff21d6d (diff)
bcachefs: allow initializing a bcachefs filesystem from a source directory
Add a new source command line argument which specifies the directory tree that will be copied onto the newly formatted bcachefs filesystem. This commit also fixes an issue in copy_link where uninitialized data is copied into the symlink because of a round_up of the buffer size. Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src/libbcachefs.h')
-rw-r--r--c_src/libbcachefs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/c_src/libbcachefs.h b/c_src/libbcachefs.h
index 5c7ef6c7..60332bb8 100644
--- a/c_src/libbcachefs.h
+++ b/c_src/libbcachefs.h
@@ -6,6 +6,7 @@
#include "libbcachefs/bcachefs_format.h"
#include "libbcachefs/bcachefs_ioctl.h"
+#include "libbcachefs/inode.h"
#include "libbcachefs/opts.h"
#include "libbcachefs/vstructs.h"
#include "tools-util.h"
@@ -37,6 +38,7 @@ struct format_opts {
unsigned superblock_size;
bool encrypted;
char *passphrase;
+ char *source;
};
static inline struct format_opts format_opts_default()