block: implement is_allocated for raw
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 May 2012 14:49:58 +0000 (16:49 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Jun 2012 12:03:42 +0000 (14:03 +0200)
commit5500316ded9db5b10072334cde1e27fb37682240
treec02ce4c1a29b4a05d8860b6fec6f99d5b9eb26a2
parent87267753a36798e25262ee48264bea2ab70921aa
block: implement is_allocated for raw

Either FIEMAP, or SEEK_DATA+SEEK_HOLE can be used to implement the
is_allocated callback for raw files.  On Linux ext4, btrfs and XFS
all support it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c
block/raw.c