mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 06:32:57 +00:00
btrfs-progs: make sure btrfs-zero-log writes something
The close_ctree code does a check to see if the FS has changed before it does any IO. This forces the commit. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
13eced9a0c
commit
6da41f2a74
@ -42,6 +42,7 @@ static void print_usage(void)
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
struct btrfs_root *root;
|
||||
struct btrfs_trans_handle *trans;
|
||||
int ret;
|
||||
|
||||
if (ac != 2)
|
||||
@ -62,8 +63,10 @@ int main(int ac, char **av)
|
||||
if (root == NULL)
|
||||
return 1;
|
||||
|
||||
trans = btrfs_start_transaction(root, 1);
|
||||
btrfs_set_super_log_root(&root->fs_info->super_copy, 0);
|
||||
btrfs_set_super_log_root_level(&root->fs_info->super_copy, 0);
|
||||
btrfs_commit_transaction(trans, root);
|
||||
close_ctree(root);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user