Commit Graph

4 Commits

Author SHA1 Message Date
Rob Bradford
6c8bd1f476 block_util: Remove duplicated logic for block size ioctls
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-12-17 12:42:10 +01:00
Rob Bradford
443b64b04f block_util: Implement DiskTopology::probe()
This method detects the underlying block topology if the disk is backed
by a block device.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-12-17 12:42:10 +01:00
Rob Bradford
ccccc94c8a block_util: Add ability to get block topology from a DiskFile
For simplicity this trait implements a default version that has a
topology with 512 byte (i.e. sector) recommended sizes.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-12-17 12:42:10 +01:00
Sebastien Boeuf
30033bdaea block_util: Add new traits for handling disk files asynchronously
Both DiskFile and AsyncIo traits are introduced to allow all kind of
files (RAW, QCOW, VHD) to be able to handle asynchronous access to the
underlying file.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-01-22 16:10:34 +00:00