raw-posix.c: Make GetBSDPath() handle caching options
commit98caa5bc0083ed4fe4833addd3078b56ce2f6cfa
authorProgrammingkid <programmingkidx@gmail.com>
Sat, 21 Nov 2015 00:17:48 +0000 (20 19:17 -0500)
committerKevin Wolf <kwolf@redhat.com>
Wed, 25 Nov 2015 13:27:43 +0000 (25 14:27 +0100)
treeaaf4eaf1ff797ee530bbb6b6c94cebaedb0cacad
parent8e37ca6d0be8aae2887c167da783fd2d9536c962
raw-posix.c: Make GetBSDPath() handle caching options

Add support for caching options that can be specified from the command
line.

The CD-ROM raw char device bypasses the host page cache and therefore
has alignment requirements.  Alignment probing is necessary so only use
the raw char device if BDRV_O_NOCACHE is set.

This patch fixes -cdrom /dev/cdrom on Mac OS X hosts, where bdrv_read()
used to fail due to misaligned requests during image format probing.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c