btrfs: Check minimum partition size in CanInitialize
Linux btrfs-progs does not allow volumes smaller than 256MiB so, any volume smaller than that cannot be valid. Change-Id: I26b9d26b1b698e659f819607b8af4b6eddfe9c55 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10585 Reviewed-by: Adrien Destugues <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
64d96af568
commit
ea4aa5544f
@@ -91,10 +91,8 @@ BTRFSAddOn::CreatePartitionHandle(BMutablePartition* partition,
|
||||
bool
|
||||
BTRFSAddOn::CanInitialize(const BMutablePartition* partition)
|
||||
{
|
||||
// We can initialize if the partition is large enough.
|
||||
|
||||
//TODO(lesderid): Check min size
|
||||
return true;
|
||||
// btrfs-progs does not allow volumes smaller than 256MiB
|
||||
return partition->Size() >= 256 * 1024 * 1024;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user