path: root/Documentation
diff options
authorQu Wenruo <>2014-07-04 15:29:17 +0800
committerDavid Sterba <>2014-08-22 14:43:11 +0200
commit18e2663db3e18d4506b6fe583ad93fc83235fca9 (patch)
tree29d84e48bd1ce9afaefd78010177f1191dfb5279 /Documentation
parentb5fc0b90144c37532f68839f36be08e05c0767bf (diff)
btrfs-progs: Add minimum device size check
Btrfs has global block reservation, so even mkfs.btrfs can execute without problem, there is still a possibility that the filesystem can't be mounted. For example when mkfs.btrfs on a 8M file on x86_64 platform, kernel will refuse to mount due to ENOSPC, since system block group takes 4M and mixed block group takes 4M, and global block reservation will takes all the 4M from mixed block group, which makes btrfs unable to create uuid tree. This patch will add minimum device size check before actually mkfs. The minimum size calculation uses a simplified one: minimum_size_for_each_dev = 2 * (system block group + global block rsv) and global block rsv = leafsize << 10 Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions