Opened 15 years ago
Closed 8 years ago
#5967 closed enhancement (fixed)
use posix_fallocate() for preallocated hard disks when possible
Reported by: | bjacke | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 3.1.2 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
when creating a new hard disk it would be good if preallocated (fixes size) hard disks would be created via posix_fallocate when that call is availbale. On recent Linux systems this call will allocate the whole space very fast and efficiently when XFS or ext4 is being used as filesystem.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Yep, this feature should be trivial to implement and would be a huge time-saver when creating non-expanding VDIs. Even creating a small 10GB VDI on a USB 2.0 hard drive takes several minutes. Using fallocate() it would be almost instantaneous.
ping. creating preallocated images ist still a pain. Why don't you make use of the filesystem doing that work efficiently in less than a second? Would also be a trivial change to do.