History log of /include/linux/virtio_blk.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a1b383870a28cfbd1657d4922c0fafc634a62ebd 30-May-2011 Rusty Russell <rusty@rustcorp.com.au> virtio: add full three-clause BSD text to headers.

It's unclear to me if it's important, but it's obviously causing my
technical colleages some headaches and I'd hate such imprecision to
slow virtio adoption.

I've emailed this to all non-trivial contributors for approval, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Ryan Harper <ryanh@us.ibm.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Acked-by: john cooper <john.cooper@redhat.com>
Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
/include/linux/virtio_blk.h
4cb2ea28c55cf5e5ef83aec535099ffce3c583df 25-Mar-2010 john cooper <john.cooper@redhat.com> Add virtio disk identification support

Add virtio-blk device id (s/n) support via virtio request.

Signed-off-by: john cooper <john.cooper@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
69740c8ba878f58bc3c71f74618fc2cd1da990da 24-Feb-2010 Christoph Hellwig <hch@lst.de> virtio_blk: add block topology support

Allow reading various alignment values from the config page. This
allows the guest to much better align I/O requests depending on the
storage topology.

Note that the formats for the config values appear a bit messed up,
but we follow the formats used by ATA and SCSI so they are expected in
the storage world.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
3225beaba05d4f06087593f5e903ce867b6e118a 23-Oct-2009 Rusty Russell <rusty@rustcorp.com.au> virtio_blk: Revert serial number support

This reverts "Add serial number support for virtio_blk, V4a".

Turns out that virtio_pci, lguest and s/390 all have an 8 bit limit
on virtio config space, so noone could ever use this.

This is coming back later in a cleaner form.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: john cooper <john.cooper@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
/include/linux/virtio_blk.h
e95646c3ec33c8ec0693992da4332a6b32eb7e31 30-Sep-2009 Christian Borntraeger <borntraeger@de.ibm.com> virtio: let header files include virtio_ids.h

Rusty,

commit 3ca4f5ca73057a617f9444a91022d7127041970a
virtio: add virtio IDs file
moved all device IDs into a single file. While the change itself is
a very good one, it can break userspace applications. For example
if a userspace tool wanted to get the ID of virtio_net it used to
include virtio_net.h. This does no longer work, since virtio_net.h
does not include virtio_ids.h.
This patch moves all "#include <linux/virtio_ids.h>" from the C
files into the header files, making the header files compatible with
the old ones.

In addition, this patch exports virtio_ids.h to userspace.

CC: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
f1b0ef062602713c2c7cfa12362d5d90ed01c5f6 17-Sep-2009 Christoph Hellwig <hch@lst.de> virtio_blk: add support for cache flush

Recent qemu has added a VIRTIO_BLK_F_FLUSH flag to advertise that the
virtual disk has a volatile write cache that needs to be flushed. In case
we see this feature implement tell the Linux block layer about the fact
and use the new VIRTIO_BLK_T_FLUSH to flush the cache when required. This
allows for an correct and simple implementation of write barriers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
3ca4f5ca73057a617f9444a91022d7127041970a 31-Jul-2009 Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> virtio: add virtio IDs file

Virtio IDs are spread all over the tree which makes assigning new IDs
bothersome. Putting them together should make the process less error-prone.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
1842f23c05b6a866be831aa60bc8a8731c58ddd0 31-Jul-2009 Rusty Russell <rusty@rustcorp.com.au> lguest and virtio: cleanup struct definitions to Linux style.

I've been doing this for years, and akpm picked me up on it about 12
months ago. lguest partly serves as example code, so let's do it Right.

Also, remove two unused fields in struct vblk_info in the example launcher.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@redhat.com>
/include/linux/virtio_blk.h
1d589bb16b825b3a7b4edd34d997f1f1f953033d 09-Jun-2009 john cooper <john.cooper@redhat.com> Add serial number support for virtio_blk, V4a

This patch extracts the opaque data from pci i/o
region 0 via the added VIRTIO_BLK_F_IDENTIFY
field. By convention this data takes the form of
that returned by an ATA IDENTIFY DEVICE command,
however the driver (except for structure size)
makes no interpretation of the data. The structure
data is copied wholesale to userspace via a
HDIO_GET_IDENTITY ioctl command (eg: hdparm -i <dev>).

Signed-off-by: john cooper <john.cooper@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/include/linux/virtio_blk.h
1cde26f928863d90e9e7c1217880c8450464d305 18-May-2009 Hannes Reinecke <hare@suse.de> virtio_blk: SG_IO passthru support

Add support for SG_IO passthru to virtio_blk. We add the scsi command
block after the normal outhdr, and the scsi inhdr with full status
information aswell as the sense buffer before the regular inhdr.

[hch: forward ported, added the VIRTIO_BLK_F_SCSI flags, some comments
and tested the whole beast]
[axboe: updated to use ->resid and not dual-path the byte count]

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (+ checkpatch.pl tweak)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/include/linux/virtio_blk.h
982f8184f9a9251ba4e5c6d79ec32d25c0ad3cc8 30-Jan-2009 Jaswinder Singh Rajput <jaswinderrajput@gmail.com> headers_check fix: linux/virtio_blk.h

fix the following 'make headers_check' warning:

usr/include/linux/virtio_blk.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
/include/linux/virtio_blk.h
066f4d82a67f621ddd547bfa4b9c94631d8457b0 29-May-2008 Christian Borntraeger <borntraeger@de.ibm.com> virtio_blk: check for hardsector size from host

Currently virtio_blk assumes a 512 byte hard sector size. This can cause
trouble / performance issues if the backing has a different block size
(like a file on an ext3 file system formatted with 4k block size or a dasd).

Lets add a feature flag that tells the guest to use a different hard sector
size than 512 byte.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
674bfc23c585b34c42263d73fb51710d49762a23 25-Jul-2008 Rusty Russell <rusty@rustcorp.com.au> virtio: clarify that ABI is usable by any implementations

We want others to implement and use virtio, so it makes sense to BSD
license the non-__KERNEL__ parts of the headers to make this crystal
clear.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
Acked-by: Ryan Harper <ryanh@us.ibm.com>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
/include/linux/virtio_blk.h
7757f09c70af87887dfc195e6d6ddd54f5cc7c39 29-May-2008 Christian Borntraeger <borntraeger@de.ibm.com> virtio_blk: fix endianess annotations

Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config
to guest endian) config space is no longer fixed endian.

Lets change the virtio_blk_config variables.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
3ef536095446552823fc488fec1c5451aab1260d 16-May-2008 Christian Borntraeger <borntraeger@de.ibm.com> virtio_blk: allow read-only disks

Hello Rusty,

sometimes it is useful to share a disk (e.g. usr). To avoid file system
corruption, the disk should be mounted read-only in that case. This patch
adds a new feature flag, that allows the host to specify, if the disk should
be considered read-only.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 16-Apr-2008 Ryan Harper <ryanh@us.ibm.com> virtio: add virtio disk geometry feature

Rather than faking up some geometry, allow the backend to push the disk
geometry via virtio pci config option. Keep the old geo code around for
compatibility.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified to single struct)
/include/linux/virtio_blk.h
cb38fa23c17519faf46a76d2f71a8430705fe474 03-May-2008 Rusty Russell <rusty@rustcorp.com.au> virtio: de-structify virtio_block status byte

Ron Minnich points out that a struct containing a char is not always
sizeof(char); simplest to remove the structure to avoid confusion.

Cc: "ron minnich" <rminnich@gmail.com>

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
24a5ae5d0340d5a45df840b24a10d62aa9516116 05-Feb-2008 Rusty Russell <rusty@rustcorp.com.au> virtio: remove unused id field from struct virtio_blk_outhdr

This field has been unused since an older version of virtio. Remove
it now before we freeze the ABI.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au.
/include/linux/virtio_blk.h
a586d4f6016f7139d8c26df0e6927131168d3b5b 05-Feb-2008 Rusty Russell <rusty@rustcorp.com.au> virtio: simplify config mechanism.

Previously we used a type/len pair within the config space, but this
seems overkill. We now simply define a structure which represents the
layout in the config space: the config space can now only be extended
at the end.

The main driver-visible changes:
1) We indicate what fields are present with an explicit feature bit.
2) Virtqueues are explicitly numbered, and not in the config space.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/include/linux/virtio_blk.h
e467cde238184d1b0923db2cd61ae1c5a6dc15aa 22-Oct-2007 Rusty Russell <rusty@rustcorp.com.au> Block driver using virtio.

The block driver uses scatter-gather lists with sg[0] being the
request information (struct virtio_blk_outhdr) with the type, sector
and inbuf id. The next N sg entries are the bio itself, then the last
sg is the status byte. Whether the N entries are in or out depends on
whether it's a read or a write.

We accept the normal (SCSI) ioctls: they get handed through to the other
side which can then handle it or reply that it's unsupported. It's
not clear that this actually works in general, since I don't know
if blk_pc_request() requests have an accurate rq_data_dir().

Although we try to reply -ENOTTY on unsupported commands, ioctl(fd,
CDROMEJECT) returns success to userspace. This needs a separate
patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <jens.axboe@oracle.com>
/include/linux/virtio_blk.h