History log of /kvmtool/include/kvm/disk-image.h (Results 26 – 48 of 48)
Revision Date Author Comments
# 7d22135f 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Consolidate disk_image__{new, new_readonly}

This patch simplifies the disk image API.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# ebe6667c 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Remove dead coe disk_image__{read, write}_sector

These code are not used anymore. Let's remove it.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@ke

kvm tools: Remove dead coe disk_image__{read, write}_sector

These code are not used anymore. Let's remove it.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# b8861977 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Rename disk_image__{read, write}_sector_iov

This patch renames disk_image__{read, write}_sector_io to
disk_image__{read, write}.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-of

kvm tools: Rename disk_image__{read, write}_sector_iov

This patch renames disk_image__{read, write}_sector_io to
disk_image__{read, write}.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# c9310ac4 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Split raw image and blk device code from disk/core.c

This patch moves raw image and blk device code into disk/raw.c

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka E

kvm tools: Split raw image and blk device code from disk/core.c

This patch moves raw image and blk device code into disk/raw.c

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 70b0d7b0 15-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Return correct values from disk IOV functions

Currently read/write IOV functions return an incorrect
value instead of the amount of bytes read/written.

This incorrect value may cause err

kvm tools: Return correct values from disk IOV functions

Currently read/write IOV functions return an incorrect
value instead of the amount of bytes read/written.

This incorrect value may cause errors within the virtio layer.

Return correct amount of bytes read/written from _iov functions.

[ penberg@kernel.org: don't use 'inline' for out-of-line functions ]
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 29084a74 13-May-2011 Prasad Joshi <prasadjoshi124@gmail.com>

kvm tools: Add VIRTIO_BLK_T_FLUSH feature to handle flush operation from VM

The virtual machine calls 'sync' when the machine
is halted. Adding the virtio flush feature will
ensure that the data is

kvm tools: Add VIRTIO_BLK_T_FLUSH feature to handle flush operation from VM

The virtual machine calls 'sync' when the machine
is halted. Adding the virtio flush feature will
ensure that the data is synced on to disk before
the virtual machine is halted. This is needed to
ensure the intigrity of the data.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f10860ca 11-May-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Fix read-only support in QCOW

If the user specifies a read-only image, make sure we never write to it.
Booting to a read-only image looks like this now:

$ ./kvm run -i ~/images/linux-0

kvm tools: Fix read-only support in QCOW

If the user specifies a read-only image, make sure we never write to it.
Booting to a read-only image looks like this now:

$ ./kvm run -i ~/images/linux-0.2.qcow2,ro

[ snip ]
[ 1.250236] end_request: I/O error, dev vda, sector 32856
[ 1.252867] Buffer I/O error on device vda, logical block 16428
[ 1.255706] lost page write due to I/O error on vda
[ 1.258120] EXT4-fs (vda): previous I/O error to superblock detected
[ 1.261157] end_request: I/O error, dev vda, sector 2
[ 1.263333] Buffer I/O error on device vda, logical block 1
[ 1.264944] lost page write due to I/O error on vda
[ 1.266139] EXT4-fs (vda): re-mounted. Opts:
[ 1.284390] end_request: I/O error, dev vda, sector 35842
[ 1.285679] Buffer I/O error on device vda, logical block 17921
[ 1.287175] EXT4-fs warning (device vda): ext4_end_bio:259: I/O error writing to inode 3756 (offset 0 size 1024 starting block 17922)

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Asias He <asias.hejun@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 43835ac9 11-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Rename 'self' variables

Give proper names to vars named 'self'.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 3fdf659d 05-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Abolishment of uint*_t types

Clean uint*_t type from the code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 2d103098 16-Apr-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Rename _sg to _iov and remove dead code

Use _iov to indicate scatter-gather.
Remove simple IO ops from raw image - Dead code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-

kvm tools: Rename _sg to _iov and remove dead code

Use _iov to indicate scatter-gather.
Remove simple IO ops from raw image - Dead code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 70b53f25 16-Apr-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add scatter-gather support for disk images

Add optional support for scatter-gather to disk_image.
Formats that can't take advantage of scatter-gather fallback to simple IO.

Signed-off-by

kvm tools: Add scatter-gather support for disk images

Add optional support for scatter-gather to disk_image.
Formats that can't take advantage of scatter-gather fallback to simple IO.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f4ff38df 13-Apr-2011 Prasad Joshi <prasadjoshi124@gmail.com>

kvm tools: Avoid using disk_image->priv member in disk_image__new()

The disk_image->priv is supposed to be a private member for users of
disk_image__new(). The other block device drivers, for exampl

kvm tools: Avoid using disk_image->priv member in disk_image__new()

The disk_image->priv is supposed to be a private member for users of
disk_image__new(). The other block device drivers, for example qcow, might need
this pointer to hold their header.

Added a new function disk_image__new_readonly() which calls disk_image__new()
to allocate a new disk and then sets the priv member to mmamped address.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9ac38fe1 12-Apr-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add option to load disk image read only

As suggested by Christoph Hellwig and Pekka Enberg, Add a '--readonly' flag to
prevent runtime changes to the disk to be saved in the image file.

kvm tools: Add option to load disk image read only

As suggested by Christoph Hellwig and Pekka Enberg, Add a '--readonly' flag to
prevent runtime changes to the disk to be saved in the image file. Please note
that since the changes are saved in the VM instead of being written out, a
large amount of modified blocks may kill the tool.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# fffb37a9 11-Apr-2011 Pekka Enberg <penberg@kernel.org>

Revert "kvm tools: Use mmap by default for disk images"

This reverts commit ca8dc9130dd89ca790a7c0830d1129dfa6c5c69e.

As pointed out by Christoph Helwig, shared writeable mappings are error prone
a

Revert "kvm tools: Use mmap by default for disk images"

This reverts commit ca8dc9130dd89ca790a7c0830d1129dfa6c5c69e.

As pointed out by Christoph Helwig, shared writeable mappings are error prone
and don't handle I/O errors nor ENOSPC properly.

show more ...


# 5d4d9902 09-Apr-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Use mmap by default for disk images

Use mmap() for disk images and fallback to read()/write() if it fails (for
example, with large images on 32 bit systems).

Performance (kB/s) test usin

kvm tools: Use mmap by default for disk images

Use mmap() for disk images and fallback to read()/write() if it fails (for
example, with large images on 32 bit systems).

Performance (kB/s) test using bonnie++ shows 19% improvement in block writes,
7% improvement in block rewrites, and 6% improvement in block reads.

Guest was started with the following command:

./kvm run --mem=256 --image=./work/vms/gentoo.img --kernel=/boot/bzImage-git

and bonnie++ with:

bonnie++ -u 0

Before:
------

Version 1.96 ------Sequential Output----- --Sequential Input- -Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
tux 480M 673 100 308017 61 288156 49 3286 99 892186 76 +++++ +++
Latency 12998us 50992us 35993us 3000us 1999us 201ms
Version 1.96 ------Sequential Create------ --------Random Create--------
tux -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 3000us 1000us 1000us 1000us 1998us 1000us

After:
------

Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
tux 480M 674 99 366588 42 309514 44 3539 99 954554 76 +++++ +++
Latency 17997us 15997us 37993us 4999us 1998us 145ms
Version 1.96 ------Sequential Create------ --------Random Create--------
tux -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 1000us 1000us 2000us 1999us 1000us 1000us

[ penberg@kernel.org: drop MAP_NORESERVE, it's no-op for MAP_SHARED ]
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 499f3bed 06-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Cleanup disk image code

This patch cleans up disk image in preparation for supporting other disk
format.

Signed-off-by: Pekka Enberg <penberg@kernel.org>


# c4d7847b 31-Mar-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Fix large disk images on 32-bit

Use read()/write() instead of mmap() for virtio block device emulation to
support large disk images on 32-bit.

Reported-and-tested-by: Asias He <asias.hej

kvm tools: Fix large disk images on 32-bit

Use read()/write() instead of mmap() for virtio block device emulation to
support large disk images on 32-bit.

Reported-and-tested-by: Asias He <asias.hejun@gmail.com>
Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 2924f993 09-Jan-2011 Asias He <asias.hejun@gmail.com>

kvm,virtio: move SECTOR_SHIFT and SECTOR_SIZE to disk-image.h

Suggested-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@ker

kvm,virtio: move SECTOR_SHIFT and SECTOR_SIZE to disk-image.h

Suggested-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 258dd093 08-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm: Implement virtio block device write support

This patch implement virtio block device write support. The writes are not
persistent because we map the disk image with MAP_PRIVATE.

Signed-off-by:

kvm: Implement virtio block device write support

This patch implement virtio block device write support. The writes are not
persistent because we map the disk image with MAP_PRIVATE.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 1ef2738d 06-Jan-2011 Cyrill Gorcunov <gorcunov@gmail.com>

virtio-blk: Leave disk geometry to compute in kernel

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>


# ca7c891b 05-Jan-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm: Setup disk geometry if needed

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>


# 5a24a9f2 05-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm: Use disk image API from virtio block device

Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 9f532d00 05-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm: Add support for disk images

This patch implements "--image" command line option that can be used to specify
a disk image. It supports raw images and it needs to be integrated to the
hypervisor

kvm: Add support for disk images

This patch implements "--image" command line option that can be used to specify
a disk image. It supports raw images and it needs to be integrated to the
hypervisor block layer.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


12