summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-08-22 16:32:24 +0200
committerDavid Sterba <dsterba@suse.com>2016-08-24 14:37:31 +0200
commit2ff04db5f4fbf28cf990804b4ed4ad2bd605e677 (patch)
treeceec1a34bd9f49d2ede1c8cc9d9c8dcad1d50a40 /ctree.h
parent974cfeeebb42b4911737876241c13dd12685b412 (diff)
btrfs-progs: two staged filesystem creation
The filesystem existence on a device is manifested by the signature, during the mkfs process we write it first and then create other structures. Such filesystem is not valid and should not be registered during device scan nor listed among devices from blkid. This patch will introduce two staged creation. In the first phase, the signature is wrong, but recognized as a partially created filesystem (by open or scan helpers). Once we successfully create and write everything, we fixup the signature. At this point automated scanning should find a valid filesystem on all devices. We can also rely on the partially created filesystem to do better error handling during creation. We can just bail out and do not need to clean up. The partial signature is '!BHRfS_M', can be shown by btrfs inspect-internal dump-super -F image Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index 89e47abd..d0569835 100644
--- a/ctree.h
+++ b/ctree.h
@@ -1032,6 +1032,7 @@ struct btrfs_fs_info {
unsigned int ignore_chunk_tree_error:1;
unsigned int avoid_meta_chunk_alloc:1;
unsigned int avoid_sys_chunk_alloc:1;
+ unsigned int finalize_on_close:1;
int (*free_extent_hook)(struct btrfs_trans_handle *trans,
struct btrfs_root *root,