]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Enable O_DIRECT support
authorAsias He <asias.hejun@gmail.com>
Fri, 3 Aug 2012 09:19:51 +0000 (17:19 +0800)
committerPekka Enberg <penberg@kernel.org>
Sat, 4 Aug 2012 09:05:36 +0000 (12:05 +0300)
commit397f43a9a433d4ff9b59308cf3b7e29679cf474f
tree0a495855e16891e918b76d491f76097e7f1102e5
parent427dad4b0f99270b6d0ef1f3d24818cb1320a478
kvm tools: Enable O_DIRECT support

With Direct I/O, file reads and writes go directly from the applications
to the storage device, bypassing the operating system read and write
caches. This is useful for applications that manage their own caches.

Open a disk image with O_DIRECT:
   $ lkvm run -d ~/img/test.img,direct

The original readonly flag is still supported.
Open a disk image with O_DIRECT and readonly:
   $ lkvm run -d ~/img/test.img,direct,ro

Signed-off-by: Asias He <asias.hejun@gmail.com>
Acked-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-run.c
tools/kvm/disk/blk.c
tools/kvm/disk/core.c
tools/kvm/include/kvm/disk-image.h