mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Btrfs: Clear space_info full when adding new devices
The full flag on the space info structs tells the allocator not to try and allocate more chunks because the devices in the FS are fully allocated. When more devices are added, we need to clear the full flag so the allocator knows it has more space available. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
4184ea7f90
commit
913d952eb5
1 changed files with 6 additions and 0 deletions
|
@ -1374,6 +1374,12 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
|
|||
ret = btrfs_add_device(trans, root, device);
|
||||
}
|
||||
|
||||
/*
|
||||
* we've got more storage, clear any full flags on the space
|
||||
* infos
|
||||
*/
|
||||
btrfs_clear_space_info_full(root->fs_info);
|
||||
|
||||
unlock_chunks(root);
|
||||
btrfs_commit_transaction(trans, root);
|
||||
|
||||
|
|
Loading…
Reference in a new issue