search for: virtio_blk_f_identify

Displaying 10 results from an estimated 10 matches for "virtio_blk_f_identify".

2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...,59 @@ struct virtio_blk_config_deprecated { __u8 identify[VIRTIO_BLK_ID_BYTES]; } __attribute__((packed)); -static int virtblk_identify(struct gendisk *disk, void *argp) +static int virtblk_identify_deprecated(struct virtio_blk *vblk, void *opaque) +{ + return virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, + offsetof(struct virtio_blk_config_deprecated, identify), opaque, + VIRTIO_BLK_ID_BYTES); +} + +static int virtblk_get_id(struct virtio_blk *vblk, void *opaque) +{ + struct request *req; + struct bio *bio; + + bio = bio_map_kern(vblk->disk->queue, opaque, VIRTIO_BLK_ID_BYTES, + GFP_K...
2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...,59 @@ struct virtio_blk_config_deprecated { __u8 identify[VIRTIO_BLK_ID_BYTES]; } __attribute__((packed)); -static int virtblk_identify(struct gendisk *disk, void *argp) +static int virtblk_identify_deprecated(struct virtio_blk *vblk, void *opaque) +{ + return virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, + offsetof(struct virtio_blk_config_deprecated, identify), opaque, + VIRTIO_BLK_ID_BYTES); +} + +static int virtblk_get_id(struct virtio_blk *vblk, void *opaque) +{ + struct request *req; + struct bio *bio; + + bio = bio_map_kern(vblk->disk->queue, opaque, VIRTIO_BLK_ID_BYTES, + GFP_K...
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
...__u8 identify[VIRTIO_BLK_ID_BYTES]; +} __attribute__((packed)); + static int virtblk_identify(struct gendisk *disk, void *argp) { struct virtio_blk *vblk = disk->private_data; @@ -196,7 +212,7 @@ static int virtblk_identify(struct gendi goto out; err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, - offsetof(struct virtio_blk_config, identify), opaque, + offsetof(struct virtio_blk_config_deprecated, identify), opaque, VIRTIO_BLK_ID_BYTES); if (err) diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h...
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
...__u8 identify[VIRTIO_BLK_ID_BYTES]; +} __attribute__((packed)); + static int virtblk_identify(struct gendisk *disk, void *argp) { struct virtio_blk *vblk = disk->private_data; @@ -196,7 +212,7 @@ static int virtblk_identify(struct gendi goto out; err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, - offsetof(struct virtio_blk_config, identify), opaque, + offsetof(struct virtio_blk_config_deprecated, identify), opaque, VIRTIO_BLK_ID_BYTES); if (err) diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h...
2009 Sep 29
0
[PATCH 2/4] lguest: get rid of offset hack in example launcher
We never supported the ATA VIRTIO_BLK_F_IDENTIFY anyway, but simply including it in the struct definition broke us (see commit 8ef562d112 "lguest: fix descriptor corruption in example launcher"). Now we can acknowledge that it's deprecated, and get the struct without it. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au&gt...
2009 Sep 29
0
[PATCH 2/4] lguest: get rid of offset hack in example launcher
We never supported the ATA VIRTIO_BLK_F_IDENTIFY anyway, but simply including it in the struct definition broke us (see commit 8ef562d112 "lguest: fix descriptor corruption in example launcher"). Now we can acknowledge that it's deprecated, and get the struct without it. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au&gt...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
...m_addr_t target) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 2beff52..7d33fee 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -364,7 +364,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev) if (strcmp(s->serial_str, "0")) features |= 1 << VIRTIO_BLK_F_IDENTIFY; - return features; + return features | virtio_common_features(); } static void virtio_blk_save(QEMUFile *f, void *opaque) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 663c8b9..ac25499 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -53,7 +53,7 @@ static vo...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
...m_addr_t target) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 2beff52..7d33fee 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -364,7 +364,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev) if (strcmp(s->serial_str, "0")) features |= 1 << VIRTIO_BLK_F_IDENTIFY; - return features; + return features | virtio_common_features(); } static void virtio_blk_save(QEMUFile *f, void *opaque) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 663c8b9..ac25499 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -53,7 +53,7 @@ static vo...
2009 Nov 02
1
[PATCHv4 1/6] qemu/virtio: move features to an inline function
...m_addr_t target) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 2630b99..db727b9 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -445,7 +445,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev) if (strcmp(s->serial_str, "0")) features |= 1 << VIRTIO_BLK_F_IDENTIFY; - return features; + return features | virtio_common_features(); } static void virtio_blk_save(QEMUFile *f, void *opaque) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 92c953c..79544bb 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -53,7 +53,7 @@ static vo...
2009 Nov 02
1
[PATCHv4 1/6] qemu/virtio: move features to an inline function
...m_addr_t target) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 2630b99..db727b9 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -445,7 +445,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev) if (strcmp(s->serial_str, "0")) features |= 1 << VIRTIO_BLK_F_IDENTIFY; - return features; + return features | virtio_common_features(); } static void virtio_blk_save(QEMUFile *f, void *opaque) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 92c953c..79544bb 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -53,7 +53,7 @@ static vo...