* [Qemu-devel] [PULL 00/10] Block patches
@ 2010-08-30 16:32 Kevin Wolf
2010-09-06 15:07 ` Kevin Wolf
0 siblings, 1 reply; 26+ messages in thread
From: Kevin Wolf @ 2010-08-30 16:32 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 02a89b219039621c940863aa5a9da4fec81a1546:
isapc: fix segfault. (2010-08-28 08:50:40 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Andrew de Quincey (1):
posix-aio-compat: Fix async_conmtext for ioctl
Izumi Tsutsui (1):
sheepdog: remove unnecessary includes
Kevin Wolf (4):
virtio: Factor virtqueue_map_sg out
virtio-blk: Fix migration of queued requests
block: Fix image re-open in bdrv_commit
qemu-img rebase: Open new backing file read-only
Laurent Vivier (1):
nbd: Introduce NBD named exports.
Loïc Minier (1):
vvfat: fat_chksum(): fix access above array bounds
Miguel Di Ciurcio Filho (2):
monitor: make 'info snapshots' show only fully available snapshots
savevm: Generate a name when run without one
block.c | 13 ++++--
block/nbd.c | 68 +++++++++++++++++++++--------
block/sheepdog.c | 10 ----
block/vvfat.c | 2 +-
hw/virtio-blk.c | 5 ++
hw/virtio.c | 38 +++++++++++------
hw/virtio.h | 3 +
nbd.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++-----
nbd.h | 5 ++-
posix-aio-compat.c | 1 +
qemu-doc.texi | 7 +++
qemu-img.c | 2 +-
qemu-nbd.c | 4 +-
savevm.c | 88 ++++++++++++++++++++++++++++-----------
14 files changed, 276 insertions(+), 88 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2010-08-30 16:32 Kevin Wolf
@ 2010-09-06 15:07 ` Kevin Wolf
0 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2010-09-06 15:07 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Am 30.08.2010 18:32, schrieb Kevin Wolf:
> The following changes since commit 02a89b219039621c940863aa5a9da4fec81a1546:
>
> isapc: fix segfault. (2010-08-28 08:50:40 +0000)
>
> are available in the git repository at:
> git://repo.or.cz/qemu/kevin.git for-anthony
>
> Andrew de Quincey (1):
> posix-aio-compat: Fix async_conmtext for ioctl
>
> Izumi Tsutsui (1):
> sheepdog: remove unnecessary includes
>
> Kevin Wolf (4):
> virtio: Factor virtqueue_map_sg out
> virtio-blk: Fix migration of queued requests
> block: Fix image re-open in bdrv_commit
> qemu-img rebase: Open new backing file read-only
>
> Laurent Vivier (1):
> nbd: Introduce NBD named exports.
>
> Loïc Minier (1):
> vvfat: fat_chksum(): fix access above array bounds
>
> Miguel Di Ciurcio Filho (2):
> monitor: make 'info snapshots' show only fully available snapshots
> savevm: Generate a name when run without one
Anthony, I think you already pulled the patches for stable-0.13 that I
sent on the same day, but these patches for master still seem to be missing.
Kevin
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2010-11-04 13:15 Kevin Wolf
0 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2010-11-04 13:15 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 5fc9cfedfa09199e10b5f9b67dcd286bfeae4f7a:
Fold send_all() wrapper unix_write() into one function (2010-11-03 12:48:09 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Blue Swirl (1):
block: avoid a warning on 64 bit hosts with long as int64_t
Kevin Wolf (9):
scsi-disk: Implement rerror option
block: Allow bdrv_flush to return errors
scsi-disk: Complete failed requests in scsi_disk_emulate_command
scsi-disk: Implement werror for flushes
vpc: Implement bdrv_flush
qcow2: Invalidate cache after failed read
ide: Handle immediate bdrv_aio_flush failure
virtio-blk: Handle immediate flush failure properly
scsi-disk: Fix immediate failure of bdrv_aio_*
block.c | 21 ++++++-
block.h | 2 +-
block/blkdebug.c | 4 +-
block/blkverify.c | 8 +-
block/cow.c | 4 +-
block/qcow.c | 4 +-
block/qcow2-cluster.c | 1 +
block/qcow2-refcount.c | 1 +
block/qcow2.c | 4 +-
block/raw-posix.c | 4 +-
block/raw-win32.c | 9 +++-
block/raw.c | 4 +-
block/vdi.c | 4 +-
block/vmdk.c | 4 +-
block/vpc.c | 21 ++++---
block_int.h | 2 +-
blockdev.c | 6 +-
hw/ide/core.c | 12 +++-
hw/scsi-disk.c | 147 +++++++++++++++++++++++++++++++----------------
hw/virtio-blk.c | 2 +-
20 files changed, 172 insertions(+), 92 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2011-04-13 12:05 Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification Kevin Wolf
` (9 more replies)
0 siblings, 10 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 9df38c47d01eb1fd7eb9d60ac70a4170e638b4a2:
target-arm: Detect tininess before rounding for FP operations (2011-04-12 23:33:33 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Amit Shah (7):
atapi: Drives can be locked without media present
atapi: Report correct errors on guest eject request
atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change
atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function
atapi: GESN: Use structs for commonly-used field types
atapi: GESN: Standardise event response handling for future additions
atapi: GESN: implement 'media' subcommand
Anthony Liguori (1):
qed: Add support for zero clusters
Mitnick Lyu (1):
vpc.c: Use get_option_parameter() does the search
Stefan Hajnoczi (1):
docs: Describe zero data clusters in QED specification
block/qed-check.c | 5 +-
block/qed-cluster.c | 31 +++++---
block/qed.c | 21 ++++-
block/qed.h | 26 ++++++
block/vpc.c | 8 +--
docs/specs/qed_spec.txt | 8 ++
hw/ide/core.c | 204 ++++++++++++++++++++++++++++++++++++++++-------
hw/ide/internal.h | 6 ++
8 files changed, 258 insertions(+), 51 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 02/10] qed: Add support for zero clusters Kevin Wolf
` (8 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Zero data clusters are a space-efficient way of storing zeroed regions
of the image.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
docs/specs/qed_spec.txt | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/docs/specs/qed_spec.txt b/docs/specs/qed_spec.txt
index 1d5fa87..7982e05 100644
--- a/docs/specs/qed_spec.txt
+++ b/docs/specs/qed_spec.txt
@@ -89,6 +89,7 @@ L1, L2, and data cluster offsets must be aligned to header.cluster_size. The fo
===Data cluster offsets===
* 0 - unallocated. The data cluster is not yet allocated.
+* 1 - zero. The data cluster contents are all zeroes and no cluster is allocated.
Future format extensions may wish to store per-offset information. The least significant 12 bits of an offset are reserved for this purpose and must be set to zero. Image files with cluster_size > 2^12 will have more unused bits which should also be zeroed.
@@ -97,6 +98,13 @@ Reads to an unallocated area of the image file access the backing file. If ther
Writes to an unallocated area cause a new data clusters to be allocated, and a new L2 table if that is also unallocated. The new data cluster is populated with data from the backing file (or zeroes if no backing file) and the data being written.
+===Zero data clusters===
+Zero data clusters are a space-efficient way of storing zeroed regions of the image.
+
+Reads to a zero data cluster produce zeroes. Note that the difference between an unallocated and a zero data cluster is that zero data clusters stop the reading of contents from the backing file.
+
+Writes to a zero data cluster cause a new data cluster to be allocated. The new data cluster is populated with zeroes and the data being written.
+
===Logical offset translation===
Logical offsets are translated into cluster offsets as follows:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 02/10] qed: Add support for zero clusters
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 03/10] atapi: Drives can be locked without media present Kevin Wolf
` (7 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Anthony Liguori <aliguori@us.ibm.com>
Zero clusters are similar to unallocated clusters except instead of reading
their value from a backing file when one is available, the cluster is always
read as zero.
This implements read support only. At this stage, QED will never write a
zero cluster.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qed-check.c | 5 +++--
block/qed-cluster.c | 31 +++++++++++++++++++++----------
block/qed.c | 21 ++++++++++++++++-----
block/qed.h | 26 ++++++++++++++++++++++++++
4 files changed, 66 insertions(+), 17 deletions(-)
diff --git a/block/qed-check.c b/block/qed-check.c
index 4600932..ea4ebc8 100644
--- a/block/qed-check.c
+++ b/block/qed-check.c
@@ -72,7 +72,8 @@ static unsigned int qed_check_l2_table(QEDCheck *check, QEDTable *table)
for (i = 0; i < s->table_nelems; i++) {
uint64_t offset = table->offsets[i];
- if (!offset) {
+ if (qed_offset_is_unalloc_cluster(offset) ||
+ qed_offset_is_zero_cluster(offset)) {
continue;
}
@@ -111,7 +112,7 @@ static int qed_check_l1_table(QEDCheck *check, QEDTable *table)
unsigned int num_invalid_l2;
uint64_t offset = table->offsets[i];
- if (!offset) {
+ if (qed_offset_is_unalloc_cluster(offset)) {
continue;
}
diff --git a/block/qed-cluster.c b/block/qed-cluster.c
index 0ec864b..3e19ad1 100644
--- a/block/qed-cluster.c
+++ b/block/qed-cluster.c
@@ -23,7 +23,8 @@
* @n: Maximum number of clusters
* @offset: Set to first cluster offset
*
- * This function scans tables for contiguous allocated or free clusters.
+ * This function scans tables for contiguous clusters. A contiguous run of
+ * clusters may be allocated, unallocated, or zero.
*/
static unsigned int qed_count_contiguous_clusters(BDRVQEDState *s,
QEDTable *table,
@@ -38,9 +39,14 @@ static unsigned int qed_count_contiguous_clusters(BDRVQEDState *s,
*offset = last;
for (i = index + 1; i < end; i++) {
- if (last == 0) {
- /* Counting free clusters */
- if (table->offsets[i] != 0) {
+ if (qed_offset_is_unalloc_cluster(last)) {
+ /* Counting unallocated clusters */
+ if (!qed_offset_is_unalloc_cluster(table->offsets[i])) {
+ break;
+ }
+ } else if (qed_offset_is_zero_cluster(last)) {
+ /* Counting zero clusters */
+ if (!qed_offset_is_zero_cluster(table->offsets[i])) {
break;
}
} else {
@@ -87,14 +93,19 @@ static void qed_find_cluster_cb(void *opaque, int ret)
n = qed_count_contiguous_clusters(s, request->l2_table->table,
index, n, &offset);
- ret = offset ? QED_CLUSTER_FOUND : QED_CLUSTER_L2;
- len = MIN(find_cluster_cb->len, n * s->header.cluster_size -
- qed_offset_into_cluster(s, find_cluster_cb->pos));
-
- if (offset && !qed_check_cluster_offset(s, offset)) {
+ if (qed_offset_is_unalloc_cluster(offset)) {
+ ret = QED_CLUSTER_L2;
+ } else if (qed_offset_is_zero_cluster(offset)) {
+ ret = QED_CLUSTER_ZERO;
+ } else if (qed_check_cluster_offset(s, offset)) {
+ ret = QED_CLUSTER_FOUND;
+ } else {
ret = -EINVAL;
}
+ len = MIN(find_cluster_cb->len, n * s->header.cluster_size -
+ qed_offset_into_cluster(s, find_cluster_cb->pos));
+
out:
find_cluster_cb->cb(find_cluster_cb->opaque, ret, offset, len);
qemu_free(find_cluster_cb);
@@ -132,7 +143,7 @@ void qed_find_cluster(BDRVQEDState *s, QEDRequest *request, uint64_t pos,
len = MIN(len, (((pos >> s->l1_shift) + 1) << s->l1_shift) - pos);
l2_offset = s->l1_table->offsets[qed_l1_index(s, pos)];
- if (!l2_offset) {
+ if (qed_offset_is_unalloc_cluster(l2_offset)) {
cb(opaque, QED_CLUSTER_L1, 0, len);
return;
}
diff --git a/block/qed.c b/block/qed.c
index 75ae244..c8c5930 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -573,7 +573,7 @@ static void qed_is_allocated_cb(void *opaque, int ret, uint64_t offset, size_t l
{
QEDIsAllocatedCB *cb = opaque;
*cb->pnum = len / BDRV_SECTOR_SIZE;
- cb->is_allocated = ret == QED_CLUSTER_FOUND;
+ cb->is_allocated = (ret == QED_CLUSTER_FOUND || ret == QED_CLUSTER_ZERO);
}
static int bdrv_qed_is_allocated(BlockDriverState *bs, int64_t sector_num,
@@ -745,7 +745,10 @@ static void qed_copy_from_backing_file(BDRVQEDState *s, uint64_t pos,
* @table: L2 table
* @index: First cluster index
* @n: Number of contiguous clusters
- * @cluster: First cluster byte offset in image file
+ * @cluster: First cluster offset
+ *
+ * The cluster offset may be an allocated byte offset in the image file, the
+ * zero cluster marker, or the unallocated cluster marker.
*/
static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index,
unsigned int n, uint64_t cluster)
@@ -753,7 +756,10 @@ static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index,
int i;
for (i = index; i < index + n; i++) {
table->offsets[i] = cluster;
- cluster += s->header.cluster_size;
+ if (!qed_offset_is_unalloc_cluster(cluster) &&
+ !qed_offset_is_zero_cluster(cluster)) {
+ cluster += s->header.cluster_size;
+ }
}
}
@@ -1075,6 +1081,7 @@ static void qed_aio_write_data(void *opaque, int ret,
case QED_CLUSTER_L2:
case QED_CLUSTER_L1:
+ case QED_CLUSTER_ZERO:
qed_aio_write_alloc(acb, len);
break;
@@ -1114,8 +1121,12 @@ static void qed_aio_read_data(void *opaque, int ret,
qemu_iovec_copy(&acb->cur_qiov, acb->qiov, acb->qiov_offset, len);
- /* Handle backing file and unallocated sparse hole reads */
- if (ret != QED_CLUSTER_FOUND) {
+ /* Handle zero cluster and backing file reads */
+ if (ret == QED_CLUSTER_ZERO) {
+ qemu_iovec_memset(&acb->cur_qiov, 0, acb->cur_qiov.size);
+ qed_aio_next_io(acb, 0);
+ return;
+ } else if (ret != QED_CLUSTER_FOUND) {
qed_read_backing_file(s, acb->cur_pos, &acb->cur_qiov,
qed_aio_next_io, acb);
return;
diff --git a/block/qed.h b/block/qed.h
index 2925e37..3e1ab84 100644
--- a/block/qed.h
+++ b/block/qed.h
@@ -161,6 +161,7 @@ typedef struct {
enum {
QED_CLUSTER_FOUND, /* cluster found */
+ QED_CLUSTER_ZERO, /* zero cluster found */
QED_CLUSTER_L2, /* cluster missing in L2 */
QED_CLUSTER_L1, /* cluster missing in L1 */
};
@@ -298,4 +299,29 @@ static inline bool qed_check_table_offset(BDRVQEDState *s, uint64_t offset)
qed_check_cluster_offset(s, end_offset);
}
+static inline bool qed_offset_is_cluster_aligned(BDRVQEDState *s,
+ uint64_t offset)
+{
+ if (qed_offset_into_cluster(s, offset)) {
+ return false;
+ }
+ return true;
+}
+
+static inline bool qed_offset_is_unalloc_cluster(uint64_t offset)
+{
+ if (offset == 0) {
+ return true;
+ }
+ return false;
+}
+
+static inline bool qed_offset_is_zero_cluster(uint64_t offset)
+{
+ if (offset == 1) {
+ return true;
+ }
+ return false;
+}
+
#endif /* BLOCK_QED_H */
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 03/10] atapi: Drives can be locked without media present
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 02/10] qed: Add support for zero clusters Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 04/10] atapi: Report correct errors on guest eject request Kevin Wolf
` (6 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
Drivers are free to lock drives without any media present. Such a
condition should not result in an error condition.
See Table 341 in MMC-5 spec for details.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index c11d457..a290142 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1230,13 +1230,8 @@ static void ide_atapi_cmd(IDEState *s)
ide_atapi_cmd_reply(s, 18, max_len);
break;
case GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
- if (bdrv_is_inserted(s->bs)) {
- bdrv_set_locked(s->bs, packet[4] & 1);
- ide_atapi_cmd_ok(s);
- } else {
- ide_atapi_cmd_error(s, SENSE_NOT_READY,
- ASC_MEDIUM_NOT_PRESENT);
- }
+ bdrv_set_locked(s->bs, packet[4] & 1);
+ ide_atapi_cmd_ok(s);
break;
case GPCMD_READ_10:
case GPCMD_READ_12:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 04/10] atapi: Report correct errors on guest eject request
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (2 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 03/10] atapi: Drives can be locked without media present Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 05/10] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change Kevin Wolf
` (5 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
Table 629 of the MMC-5 spec mentions two different error conditions when
a CDROM eject is requested: a) while a disc is inserted and b) while a
disc is not inserted.
Ensure we return the appropriate error for the present condition of the
drive and disc status.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index a290142..b5de22e 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1304,7 +1304,7 @@ static void ide_atapi_cmd(IDEState *s)
break;
case GPCMD_START_STOP_UNIT:
{
- int start, eject, err = 0;
+ int start, eject, sense, err = 0;
start = packet[4] & 1;
eject = (packet[4] >> 1) & 1;
@@ -1317,7 +1317,11 @@ static void ide_atapi_cmd(IDEState *s)
ide_atapi_cmd_ok(s);
break;
case -EBUSY:
- ide_atapi_cmd_error(s, SENSE_NOT_READY,
+ sense = SENSE_NOT_READY;
+ if (bdrv_is_inserted(s->bs)) {
+ sense = SENSE_ILLEGAL_REQUEST;
+ }
+ ide_atapi_cmd_error(s, sense,
ASC_MEDIA_REMOVAL_PREVENTED);
break;
default:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 05/10] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (3 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 04/10] atapi: Report correct errors on guest eject request Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 06/10] atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function Kevin Wolf
` (4 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
After a media change, the only commands allowed from the guest were
REQUEST_SENSE and INQUIRY. The guest may also issue
GET_EVENT_STATUS_NOTIFICATION commands to get media
changed notification.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index b5de22e..f0da95d 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1102,13 +1102,21 @@ static void ide_atapi_cmd(IDEState *s)
printf("\n");
}
#endif
- /* If there's a UNIT_ATTENTION condition pending, only
- REQUEST_SENSE and INQUIRY commands are allowed to complete. */
+ /*
+ * If there's a UNIT_ATTENTION condition pending, only
+ * REQUEST_SENSE, INQUIRY, GET_CONFIGURATION and
+ * GET_EVENT_STATUS_NOTIFICATION commands are allowed to complete.
+ * MMC-5, section 4.1.6.1 lists only these commands being allowed
+ * to complete, with other commands getting a CHECK condition
+ * response unless a higher priority status, defined by the drive
+ * here, is pending.
+ */
if (s->sense_key == SENSE_UNIT_ATTENTION &&
- s->io_buffer[0] != GPCMD_REQUEST_SENSE &&
- s->io_buffer[0] != GPCMD_INQUIRY) {
- ide_atapi_cmd_check_status(s);
- return;
+ s->io_buffer[0] != GPCMD_REQUEST_SENSE &&
+ s->io_buffer[0] != GPCMD_INQUIRY &&
+ s->io_buffer[0] != GPCMD_GET_EVENT_STATUS_NOTIFICATION) {
+ ide_atapi_cmd_check_status(s);
+ return;
}
switch(s->io_buffer[0]) {
case GPCMD_TEST_UNIT_READY:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 06/10] atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (4 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 05/10] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 07/10] atapi: GESN: Use structs for commonly-used field types Kevin Wolf
` (3 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
This makes the code more readable.
Also, there's a block like:
if () {
...
} else {
...
}
Split that into
if () {
...
return;
}
...
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index f0da95d..4e4ade2 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1084,6 +1084,29 @@ static int ide_dvd_read_structure(IDEState *s, int format,
}
}
+static void handle_get_event_status_notification(IDEState *s,
+ uint8_t *buf,
+ const uint8_t *packet)
+{
+ unsigned int max_len;
+
+ max_len = ube16_to_cpu(packet + 7);
+
+ if (!(packet[1] & 0x01)) { /* asynchronous mode */
+ /* Only polling is supported, asynchronous mode is not. */
+ ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
+ ASC_INV_FIELD_IN_CMD_PACKET);
+ return;
+ }
+
+ /* polling */
+ /* We don't support any event class (yet). */
+ cpu_to_ube16(buf, 0x00); /* No event descriptor returned */
+ buf[2] = 0x80; /* No Event Available (NEA) */
+ buf[3] = 0x00; /* Empty supported event classes */
+ ide_atapi_cmd_reply(s, 4, max_len);
+}
+
static void ide_atapi_cmd(IDEState *s)
{
const uint8_t *packet;
@@ -1529,19 +1552,7 @@ static void ide_atapi_cmd(IDEState *s)
break;
}
case GPCMD_GET_EVENT_STATUS_NOTIFICATION:
- max_len = ube16_to_cpu(packet + 7);
-
- if (packet[1] & 0x01) { /* polling */
- /* We don't support any event class (yet). */
- cpu_to_ube16(buf, 0x00); /* No event descriptor returned */
- buf[2] = 0x80; /* No Event Available (NEA) */
- buf[3] = 0x00; /* Empty supported event classes */
- ide_atapi_cmd_reply(s, 4, max_len);
- } else { /* asynchronous mode */
- /* Only polling is supported, asynchronous mode is not. */
- ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
- ASC_INV_FIELD_IN_CMD_PACKET);
- }
+ handle_get_event_status_notification(s, buf, packet);
break;
default:
ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 07/10] atapi: GESN: Use structs for commonly-used field types
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (5 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 06/10] atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 08/10] atapi: GESN: Standardise event response handling for future additions Kevin Wolf
` (2 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
Instead of using magic numbers, use structs that are more descriptive of
the fields being used.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 4e4ade2..f976947 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1088,11 +1088,23 @@ static void handle_get_event_status_notification(IDEState *s,
uint8_t *buf,
const uint8_t *packet)
{
+ struct {
+ uint8_t opcode;
+ uint8_t polled; /* lsb bit is polled; others are reserved */
+ uint8_t reserved2[2];
+ uint8_t class;
+ uint8_t reserved3[2];
+ uint16_t len;
+ uint8_t control;
+ } __attribute__((packed)) *gesn_cdb;
+
unsigned int max_len;
- max_len = ube16_to_cpu(packet + 7);
+ gesn_cdb = (void *)packet;
+ max_len = be16_to_cpu(gesn_cdb->len);
- if (!(packet[1] & 0x01)) { /* asynchronous mode */
+ /* It is fine by the MMC spec to not support async mode operations */
+ if (!(gesn_cdb->polled & 0x01)) { /* asynchronous mode */
/* Only polling is supported, asynchronous mode is not. */
ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
ASC_INV_FIELD_IN_CMD_PACKET);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 08/10] atapi: GESN: Standardise event response handling for future additions
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (6 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 07/10] atapi: GESN: Use structs for commonly-used field types Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 09/10] atapi: GESN: implement 'media' subcommand Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 10/10] vpc.c: Use get_option_parameter() does the search Kevin Wolf
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
Handle GET_EVENT_STATUS_NOTIFICATION's No Event Available response in a
generic way so that future additions to the code to handle other
response types is easier.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index f976947..a38cc14 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1098,9 +1098,17 @@ static void handle_get_event_status_notification(IDEState *s,
uint8_t control;
} __attribute__((packed)) *gesn_cdb;
- unsigned int max_len;
+ struct {
+ uint16_t len;
+ uint8_t notification_class;
+ uint8_t supported_events;
+ } __attribute((packed)) *gesn_event_header;
+
+ unsigned int max_len, used_len;
gesn_cdb = (void *)packet;
+ gesn_event_header = (void *)buf;
+
max_len = be16_to_cpu(gesn_cdb->len);
/* It is fine by the MMC spec to not support async mode operations */
@@ -1111,12 +1119,17 @@ static void handle_get_event_status_notification(IDEState *s,
return;
}
- /* polling */
+ /* polling mode operation */
+
/* We don't support any event class (yet). */
- cpu_to_ube16(buf, 0x00); /* No event descriptor returned */
- buf[2] = 0x80; /* No Event Available (NEA) */
- buf[3] = 0x00; /* Empty supported event classes */
- ide_atapi_cmd_reply(s, 4, max_len);
+ gesn_event_header->supported_events = 0;
+
+ gesn_event_header->notification_class = 0x80; /* No event available */
+ used_len = sizeof(*gesn_event_header);
+
+ gesn_event_header->len = cpu_to_be16(used_len
+ - sizeof(*gesn_event_header));
+ ide_atapi_cmd_reply(s, used_len, max_len);
}
static void ide_atapi_cmd(IDEState *s)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 09/10] atapi: GESN: implement 'media' subcommand
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (7 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 08/10] atapi: GESN: Standardise event response handling for future additions Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 10/10] vpc.c: Use get_option_parameter() does the search Kevin Wolf
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Amit Shah <amit.shah@redhat.com>
Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION
command. This helps us report tray open, tray closed, no media, media
present states to the guest.
Newer Linux kernels (2.6.38+) rely on this command to revalidate discs
after media change.
This patch also sends out tray open/closed status to the guest driver
when requested e.g. via the CDROM_DRIVE_STATUS ioctl (thanks Markus).
Without such notification, the guest and qemu's tray open/close status
was frequently out of sync, causing installers like Anaconda detecting
no disc instead of tray open, confusing them terribly.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/core.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++--
hw/ide/internal.h | 6 +++
2 files changed, 115 insertions(+), 4 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index a38cc14..f028ddb 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1084,6 +1084,48 @@ static int ide_dvd_read_structure(IDEState *s, int format,
}
}
+static unsigned int event_status_media(IDEState *s,
+ uint8_t *buf)
+{
+ enum media_event_code {
+ MEC_NO_CHANGE = 0, /* Status unchanged */
+ MEC_EJECT_REQUESTED, /* received a request from user to eject */
+ MEC_NEW_MEDIA, /* new media inserted and ready for access */
+ MEC_MEDIA_REMOVAL, /* only for media changers */
+ MEC_MEDIA_CHANGED, /* only for media changers */
+ MEC_BG_FORMAT_COMPLETED, /* MRW or DVD+RW b/g format completed */
+ MEC_BG_FORMAT_RESTARTED, /* MRW or DVD+RW b/g format restarted */
+ };
+ enum media_status {
+ MS_TRAY_OPEN = 1,
+ MS_MEDIA_PRESENT = 2,
+ };
+ uint8_t event_code, media_status;
+
+ media_status = 0;
+ if (s->bs->tray_open) {
+ media_status = MS_TRAY_OPEN;
+ } else if (bdrv_is_inserted(s->bs)) {
+ media_status = MS_MEDIA_PRESENT;
+ }
+
+ /* Event notification descriptor */
+ event_code = MEC_NO_CHANGE;
+ if (media_status != MS_TRAY_OPEN && s->events.new_media) {
+ event_code = MEC_NEW_MEDIA;
+ s->events.new_media = false;
+ }
+
+ buf[4] = event_code;
+ buf[5] = media_status;
+
+ /* These fields are reserved, just clear them. */
+ buf[6] = 0;
+ buf[7] = 0;
+
+ return 8; /* We wrote to 4 extra bytes from the header */
+}
+
static void handle_get_event_status_notification(IDEState *s,
uint8_t *buf,
const uint8_t *packet)
@@ -1104,6 +1146,26 @@ static void handle_get_event_status_notification(IDEState *s,
uint8_t supported_events;
} __attribute((packed)) *gesn_event_header;
+ enum notification_class_request_type {
+ NCR_RESERVED1 = 1 << 0,
+ NCR_OPERATIONAL_CHANGE = 1 << 1,
+ NCR_POWER_MANAGEMENT = 1 << 2,
+ NCR_EXTERNAL_REQUEST = 1 << 3,
+ NCR_MEDIA = 1 << 4,
+ NCR_MULTI_HOST = 1 << 5,
+ NCR_DEVICE_BUSY = 1 << 6,
+ NCR_RESERVED2 = 1 << 7,
+ };
+ enum event_notification_class_field {
+ ENC_NO_EVENTS = 0,
+ ENC_OPERATIONAL_CHANGE,
+ ENC_POWER_MANAGEMENT,
+ ENC_EXTERNAL_REQUEST,
+ ENC_MEDIA,
+ ENC_MULTIPLE_HOSTS,
+ ENC_DEVICE_BUSY,
+ ENC_RESERVED,
+ };
unsigned int max_len, used_len;
gesn_cdb = (void *)packet;
@@ -1121,12 +1183,32 @@ static void handle_get_event_status_notification(IDEState *s,
/* polling mode operation */
- /* We don't support any event class (yet). */
- gesn_event_header->supported_events = 0;
+ /*
+ * These are the supported events.
+ *
+ * We currently only support requests of the 'media' type.
+ */
+ gesn_event_header->supported_events = NCR_MEDIA;
- gesn_event_header->notification_class = 0x80; /* No event available */
- used_len = sizeof(*gesn_event_header);
+ /*
+ * We use |= below to set the class field; other bits in this byte
+ * are reserved now but this is useful to do if we have to use the
+ * reserved fields later.
+ */
+ gesn_event_header->notification_class = 0;
+ /*
+ * Responses to requests are to be based on request priority. The
+ * notification_class_request_type enum above specifies the
+ * priority: upper elements are higher prio than lower ones.
+ */
+ if (gesn_cdb->class & NCR_MEDIA) {
+ gesn_event_header->notification_class |= ENC_MEDIA;
+ used_len = event_status_media(s, buf);
+ } else {
+ gesn_event_header->notification_class = 0x80; /* No event available */
+ used_len = sizeof(*gesn_event_header);
+ }
gesn_event_header->len = cpu_to_be16(used_len
- sizeof(*gesn_event_header));
ide_atapi_cmd_reply(s, used_len, max_len);
@@ -1655,6 +1737,7 @@ static void cdrom_change_cb(void *opaque, int reason)
s->sense_key = SENSE_UNIT_ATTENTION;
s->asc = ASC_MEDIUM_MAY_HAVE_CHANGED;
s->cdrom_changed = 1;
+ s->events.new_media = true;
ide_set_irq(s->bus);
}
@@ -2799,6 +2882,25 @@ static bool ide_drive_pio_state_needed(void *opaque)
return (s->status & DRQ_STAT) != 0;
}
+static bool ide_atapi_gesn_needed(void *opaque)
+{
+ IDEState *s = opaque;
+
+ return s->events.new_media || s->events.eject_request;
+}
+
+/* Fields for GET_EVENT_STATUS_NOTIFICATION ATAPI command */
+const VMStateDescription vmstate_ide_atapi_gesn_state = {
+ .name ="ide_drive/atapi/gesn_state",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_BOOL(events.new_media, IDEState),
+ VMSTATE_BOOL(events.eject_request, IDEState),
+ }
+};
+
const VMStateDescription vmstate_ide_drive_pio_state = {
.name = "ide_drive/pio_state",
.version_id = 1,
@@ -2853,6 +2955,9 @@ const VMStateDescription vmstate_ide_drive = {
.vmsd = &vmstate_ide_drive_pio_state,
.needed = ide_drive_pio_state_needed,
}, {
+ .vmsd = &vmstate_ide_atapi_gesn_state,
+ .needed = ide_atapi_gesn_needed,
+ }, {
/* empty */
}
}
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index d533fb6..ba7e9a8 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -373,6 +373,11 @@ typedef int DMAFunc(IDEDMA *);
typedef int DMAIntFunc(IDEDMA *, int);
typedef void DMARestartFunc(void *, int, int);
+struct unreported_events {
+ bool eject_request;
+ bool new_media;
+};
+
/* NOTE: IDEState represents in fact one drive */
struct IDEState {
IDEBus *bus;
@@ -408,6 +413,7 @@ struct IDEState {
BlockDriverState *bs;
char version[9];
/* ATAPI specific */
+ struct unreported_events events;
uint8_t sense_key;
uint8_t asc;
uint8_t cdrom_changed;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PATCH 10/10] vpc.c: Use get_option_parameter() does the search
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
` (8 preceding siblings ...)
2011-04-13 12:05 ` [Qemu-devel] [PATCH 09/10] atapi: GESN: implement 'media' subcommand Kevin Wolf
@ 2011-04-13 12:05 ` Kevin Wolf
9 siblings, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2011-04-13 12:05 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Mitnick Lyu <mitnick.lyu@gmail.com>
Use get_option_parameter() to instead of duplicating the loop, and
use BDRV_SECTOR_SIZE to instead of 512
Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/vpc.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 7b025be..56865da 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -505,12 +505,8 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options)
int ret = -EIO;
// Read out options
- while (options && options->name) {
- if (!strcmp(options->name, "size")) {
- total_sectors = options->value.n / 512;
- }
- options++;
- }
+ total_sectors = get_option_parameter(options, BLOCK_OPT_SIZE)->value.n /
+ BDRV_SECTOR_SIZE;
// Create the file
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2012-08-15 13:56 Kevin Wolf
2012-08-15 19:49 ` Anthony Liguori
0 siblings, 1 reply; 26+ messages in thread
From: Kevin Wolf @ 2012-08-15 13:56 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 03834e22abafbc8dc4052d46a5ccd6dd135a54a3:
Merge remote-tracking branch 'origin/master' into staging (2012-08-14 15:19:50 -0500)
are available in the git repository at:
http://repo.or.cz/r/qemu/kevin.git for-anthony
Corey Bryant (7):
qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg
qapi: Introduce add-fd, remove-fd, query-fdsets
block: Prevent detection of /dev/fdset/ as floppy
block: Convert open calls to qemu_open
block: Convert close calls to qemu_close
block: Enable qemu_open/close to work with fd sets
monitor: Clean up fd sets on monitor disconnect
Kevin Wolf (2):
block: Flush parent to OS with cache=unsafe
qemu-iotests: Fix 030 after switch to GenericError
Stefan Priebe (1):
iscsi: Fix NULL dereferences / races between task completion and abort
Makefile | 6 +-
block.c | 3 +-
block/iscsi.c | 55 ++++-----
block/raw-posix.c | 46 ++++----
block/raw-win32.c | 6 +-
block/vdi.c | 5 +-
block/vmdk.c | 25 ++---
block/vpc.c | 4 +-
block/vvfat.c | 16 ++--
cutils.c | 5 +
monitor.c | 294 ++++++++++++++++++++++++++++++++++++++++++++++++
monitor.h | 5 +
osdep.c | 116 +++++++++++++++++++
qapi-schema.json | 98 ++++++++++++++++
qemu-char.c | 12 ++-
qemu-common.h | 2 +
qemu-tool.c | 20 ++++
qemu-user.c | 20 ++++
qmp-commands.hx | 122 ++++++++++++++++++++
savevm.c | 4 +-
tests/Makefile | 2 +-
tests/qemu-iotests/030 | 6 +-
22 files changed, 776 insertions(+), 96 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2012-08-15 13:56 Kevin Wolf
@ 2012-08-15 19:49 ` Anthony Liguori
0 siblings, 0 replies; 26+ messages in thread
From: Anthony Liguori @ 2012-08-15 19:49 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Kevin Wolf <kwolf@redhat.com> writes:
> The following changes since commit 03834e22abafbc8dc4052d46a5ccd6dd135a54a3:
>
> Merge remote-tracking branch 'origin/master' into staging (2012-08-14 15:19:50 -0500)
>
> are available in the git repository at:
>
> http://repo.or.cz/r/qemu/kevin.git for-anthony
>
Pulled. Thanks.
Regards,
Anthony Liguori
> Corey Bryant (7):
> qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg
> qapi: Introduce add-fd, remove-fd, query-fdsets
> block: Prevent detection of /dev/fdset/ as floppy
> block: Convert open calls to qemu_open
> block: Convert close calls to qemu_close
> block: Enable qemu_open/close to work with fd sets
> monitor: Clean up fd sets on monitor disconnect
>
> Kevin Wolf (2):
> block: Flush parent to OS with cache=unsafe
> qemu-iotests: Fix 030 after switch to GenericError
>
> Stefan Priebe (1):
> iscsi: Fix NULL dereferences / races between task completion and abort
>
> Makefile | 6 +-
> block.c | 3 +-
> block/iscsi.c | 55 ++++-----
> block/raw-posix.c | 46 ++++----
> block/raw-win32.c | 6 +-
> block/vdi.c | 5 +-
> block/vmdk.c | 25 ++---
> block/vpc.c | 4 +-
> block/vvfat.c | 16 ++--
> cutils.c | 5 +
> monitor.c | 294 ++++++++++++++++++++++++++++++++++++++++++++++++
> monitor.h | 5 +
> osdep.c | 116 +++++++++++++++++++
> qapi-schema.json | 98 ++++++++++++++++
> qemu-char.c | 12 ++-
> qemu-common.h | 2 +
> qemu-tool.c | 20 ++++
> qemu-user.c | 20 ++++
> qmp-commands.hx | 122 ++++++++++++++++++++
> savevm.c | 4 +-
> tests/Makefile | 2 +-
> tests/qemu-iotests/030 | 6 +-
> 22 files changed, 776 insertions(+), 96 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2013-06-04 12:45 Kevin Wolf
2013-06-17 21:17 ` Anthony Liguori
0 siblings, 1 reply; 26+ messages in thread
From: Kevin Wolf @ 2013-06-04 12:45 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 171392406d8e230d62e5ebf4805f71460854b8ec:
gtk: don't use g_object_unref on GdkCursor (2013-06-03 16:14:05 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
for you to fetch changes up to 5b91704469c0f801e0219f26458356872c4145ab:
block: dump snapshot and image info to specified output (2013-06-04 13:56:30 +0200)
----------------------------------------------------------------
Fam Zheng (1):
block: add block driver read only whitelist
Stefan Hajnoczi (6):
qemu-iotests: fix 054 cluster size help output
qemu-iotests: make assert_no_active_block_jobs() common
qemu-iotests: make cancel_and_wait() common
qemu-iotests: make compare_images() common
qemu-iotests: make create_image() common
block: drop bs_snapshots global variable
Wenchao Xia (3):
block: move snapshot code in block.c to block/snapshot.c
block: move qmp and info dump related code to block/qapi.c
block: dump snapshot and image info to specified output
block.c | 356 ++++------------------------------------
block/Makefile.objs | 1 +
block/qapi.c | 366 ++++++++++++++++++++++++++++++++++++++++++
block/snapshot.c | 157 ++++++++++++++++++
blockdev.c | 4 +-
configure | 20 ++-
hw/block/xen_disk.c | 8 +-
include/block/block.h | 31 +---
include/block/block_int.h | 1 +
include/block/qapi.h | 43 +++++
include/block/snapshot.h | 53 ++++++
qemu-img.c | 163 +------------------
savevm.c | 40 ++---
scripts/create_config | 11 +-
tests/qemu-iotests/030 | 99 ++++--------
tests/qemu-iotests/041 | 181 ++++++++-------------
tests/qemu-iotests/054.out | 2 +-
tests/qemu-iotests/iotests.py | 38 +++++
18 files changed, 843 insertions(+), 731 deletions(-)
create mode 100644 block/qapi.c
create mode 100644 block/snapshot.c
create mode 100644 include/block/qapi.h
create mode 100644 include/block/snapshot.h
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2013-06-04 12:45 Kevin Wolf
@ 2013-06-17 21:17 ` Anthony Liguori
0 siblings, 0 replies; 26+ messages in thread
From: Anthony Liguori @ 2013-06-17 21:17 UTC (permalink / raw)
To: Kevin Wolf, anthony; +Cc: qemu-devel
Pulled. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2015-06-12 14:57 Stefan Hajnoczi
2015-06-15 9:42 ` Peter Maydell
0 siblings, 1 reply; 26+ messages in thread
From: Stefan Hajnoczi @ 2015-06-12 14:57 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Peter Maydell, Stefan Hajnoczi
The following changes since commit d8e3b729cf452d2689c8669f1ec18158db29fd5a:
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-06-11 15:33:38 +0100)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 2db33f88d2b340c049c576ad75d442e4b6ffe768:
qemu-iotests: expand test 093 to support group throttling (2015-06-12 14:00:00 +0100)
----------------------------------------------------------------
----------------------------------------------------------------
Alberto Garcia (7):
throttle: Add throttle group infrastructure
throttle: Add throttle group infrastructure tests
throttle: Add throttle group support
throttle: acquire the ThrottleGroup lock in bdrv_swap()
throttle: add the name of the ThrottleGroup to BlockDeviceInfo
throttle: Update throttle infrastructure copyright
qemu-iotests: expand test 093 to support group throttling
Benoît Canet (1):
throttle: Extract timers from ThrottleState into a separate structure
Kevin Wolf (1):
raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size
Stefan Hajnoczi (1):
Revert "iothread: release iothread around aio_poll"
async.c | 8 +-
block.c | 38 ++-
block/Makefile.objs | 1 +
block/io.c | 71 ++----
block/qapi.c | 8 +-
block/raw-posix.c | 5 +-
block/throttle-groups.c | 496 ++++++++++++++++++++++++++++++++++++++++
blockdev.c | 38 ++-
hmp.c | 10 +-
include/block/block.h | 3 +-
include/block/block_int.h | 7 +-
include/block/throttle-groups.h | 46 ++++
include/qemu/throttle.h | 46 ++--
iothread.c | 11 +-
qapi/block-core.json | 29 ++-
qemu-options.hx | 1 +
qmp-commands.hx | 3 +-
tests/qemu-iotests/093 | 89 ++++---
tests/test-aio.c | 19 +-
tests/test-throttle.c | 163 +++++++++----
util/throttle.c | 81 ++++---
21 files changed, 954 insertions(+), 219 deletions(-)
create mode 100644 block/throttle-groups.c
create mode 100644 include/block/throttle-groups.h
--
2.4.2
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2015-06-12 14:57 Stefan Hajnoczi
@ 2015-06-15 9:42 ` Peter Maydell
0 siblings, 0 replies; 26+ messages in thread
From: Peter Maydell @ 2015-06-15 9:42 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Kevin Wolf, QEMU Developers
On 12 June 2015 at 15:57, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit d8e3b729cf452d2689c8669f1ec18158db29fd5a:
>
> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-06-11 15:33:38 +0100)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 2db33f88d2b340c049c576ad75d442e4b6ffe768:
>
> qemu-iotests: expand test 093 to support group throttling (2015-06-12 14:00:00 +0100)
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2015-12-22 8:54 Stefan Hajnoczi
2015-12-22 14:47 ` Peter Maydell
0 siblings, 1 reply; 26+ messages in thread
From: Stefan Hajnoczi @ 2015-12-22 8:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit c688084506cf2cf2eba4ba9df4e91abb6e3dab83:
Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-secrets-base-2015-12-18-1' into staging (2015-12-18 17:04:15 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 723697551a7e926abe7d3c7f2966012b8075143d:
sdhci: add optional quirk property to disable card insertion/removal interrupts (2015-12-22 16:34:26 +0800)
----------------------------------------------------------------
----------------------------------------------------------------
Andrew Baumann (2):
sdhci: don't raise a command index error for an unexpected response
sdhci: add optional quirk property to disable card insertion/removal
interrupts
Gonglei (1):
virtio-blk: trivial code optimization
Peter Crosthwaite (1):
sd: sdhci: Delete over-zealous power check
Stefan Hajnoczi (4):
block: add BlockLimits.max_iov field
block-backend: add blk_get_max_iov()
block: replace IOV_MAX with BlockLimits.max_iov
block/mirror: replace IOV_MAX with blk_get_max_iov()
Vladimir Sementsov-Ogievskiy (1):
parallels: add format spec
Yang Wei (1):
scripts/gdb: Fix a python exception in mtree.py
MAINTAINERS | 1 +
block/block-backend.c | 5 +
block/io.c | 10 +-
block/mirror.c | 6 +-
docs/specs/parallels.txt | 228 +++++++++++++++++++++++++++++++++++++++++
hw/block/virtio-blk.c | 28 ++---
hw/sd/sdhci.c | 10 +-
include/block/block_int.h | 3 +
include/hw/sd/sdhci.h | 1 +
include/sysemu/block-backend.h | 1 +
scripts/qemugdb/mtree.py | 10 +-
11 files changed, 272 insertions(+), 31 deletions(-)
create mode 100644 docs/specs/parallels.txt
--
2.5.0
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2015-12-22 8:54 Stefan Hajnoczi
@ 2015-12-22 14:47 ` Peter Maydell
0 siblings, 0 replies; 26+ messages in thread
From: Peter Maydell @ 2015-12-22 14:47 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers
On 22 December 2015 at 08:54, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit c688084506cf2cf2eba4ba9df4e91abb6e3dab83:
>
> Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-secrets-base-2015-12-18-1' into staging (2015-12-18 17:04:15 +0000)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 723697551a7e926abe7d3c7f2966012b8075143d:
>
> sdhci: add optional quirk property to disable card insertion/removal interrupts (2015-12-22 16:34:26 +0800)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
>
> Andrew Baumann (2):
> sdhci: don't raise a command index error for an unexpected response
> sdhci: add optional quirk property to disable card insertion/removal
> interrupts
>
> Gonglei (1):
> virtio-blk: trivial code optimization
>
> Peter Crosthwaite (1):
> sd: sdhci: Delete over-zealous power check
>
> Stefan Hajnoczi (4):
> block: add BlockLimits.max_iov field
> block-backend: add blk_get_max_iov()
> block: replace IOV_MAX with BlockLimits.max_iov
> block/mirror: replace IOV_MAX with blk_get_max_iov()
>
> Vladimir Sementsov-Ogievskiy (1):
> parallels: add format spec
>
> Yang Wei (1):
> scripts/gdb: Fix a python exception in mtree.py
>
> MAINTAINERS | 1 +
> block/block-backend.c | 5 +
> block/io.c | 10 +-
> block/mirror.c | 6 +-
> docs/specs/parallels.txt | 228 +++++++++++++++++++++++++++++++++++++++++
> hw/block/virtio-blk.c | 28 ++---
> hw/sd/sdhci.c | 10 +-
> include/block/block_int.h | 3 +
> include/hw/sd/sdhci.h | 1 +
> include/sysemu/block-backend.h | 1 +
> scripts/qemugdb/mtree.py | 10 +-
> 11 files changed, 272 insertions(+), 31 deletions(-)
> create mode 100644 docs/specs/parallels.txt
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2016-06-29 3:10 Jeff Cody
2016-06-29 18:13 ` Peter Maydell
0 siblings, 1 reply; 26+ messages in thread
From: Jeff Cody @ 2016-06-29 3:10 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel
The following changes since commit d7f30403576f04f1f3a5fb5a1d18cba8dfa7a6d2:
cputlb: don't cpu_abort() if guest tries to execute outside RAM or RAM (2016-06-28 18:50:53 +0100)
are available in the git repository at:
git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to 15d6729850728ee49859711dd40b00d8d85d94ee:
mirror: fix misleading comments (2016-06-28 23:08:25 -0400)
----------------------------------------------------------------
----------------------------------------------------------------
Changlong Xie (2):
blockjob: assert(cb) when create job
mirror: fix misleading comments
Denis V. Lunev (1):
mirror: fix trace_mirror_yield_in_flight usage in mirror_iteration()
Jeff Cody (1):
block/gluster: add support for selecting debug logging level
John Snow (3):
mirror: clarify mirror_do_read return code
mirror: limit niov to IOV_MAX elements, again
iotests: add small-granularity mirror test
Niels de Vos (1):
block/gluster: add support for SEEK_DATA/SEEK_HOLE
Peter Lieven (2):
block/nfs: refuse readahead if cache.direct is on
block/nfs: add support for libnfs pagecache
block/backup.c | 1 -
block/gluster.c | 230 +++++++++++++++++++++++++++++++++++++++++++--
block/mirror.c | 14 ++-
block/nfs.c | 55 ++++++++++-
blockjob.c | 1 +
tests/qemu-iotests/041 | 30 ++++++
tests/qemu-iotests/041.out | 4 +-
7 files changed, 317 insertions(+), 18 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2016-06-29 3:10 Jeff Cody
@ 2016-06-29 18:13 ` Peter Maydell
0 siblings, 0 replies; 26+ messages in thread
From: Peter Maydell @ 2016-06-29 18:13 UTC (permalink / raw)
To: Jeff Cody; +Cc: Qemu-block, QEMU Developers
On 29 June 2016 at 04:10, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit d7f30403576f04f1f3a5fb5a1d18cba8dfa7a6d2:
>
> cputlb: don't cpu_abort() if guest tries to execute outside RAM or RAM (2016-06-28 18:50:53 +0100)
>
> are available in the git repository at:
>
> git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 15d6729850728ee49859711dd40b00d8d85d94ee:
>
> mirror: fix misleading comments (2016-06-28 23:08:25 -0400)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Qemu-devel] [PULL 00/10] Block patches
@ 2017-12-18 21:08 Jeff Cody
2017-12-19 19:10 ` Peter Maydell
0 siblings, 1 reply; 26+ messages in thread
From: Jeff Cody @ 2017-12-18 21:08 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, jcody, vsementsov, jsnow, qemu-devel
The following changes since commit 411ad78115ebeb3411cf4b7622784b93dfabe259:
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-12-15-1' into staging (2017-12-17 15:27:41 +0000)
are available in the git repository at:
git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to 996922de45299878cdc4c15b72b19edf2bc618a4:
block/curl: fix minor memory leaks (2017-12-18 15:44:39 -0500)
----------------------------------------------------------------
Blockjob and protocol patches
----------------------------------------------------------------
Jeff Cody (4):
block/sheepdog: remove spurious NULL check
block/sheepdog: code beautification
block/curl: check error return of curl_global_init()
block/curl: fix minor memory leaks
John Snow (1):
blockjob: kick jobs on set-speed
Vladimir Sementsov-Ogievskiy (5):
hbitmap: add next_zero function
backup: move from done_bitmap to copy_bitmap
backup: init copy_bitmap from sync_bitmap for incremental
backup: simplify non-dirty bits progress processing
backup: use copy_bitmap in incremental backup
block/backup.c | 116 +++++++++++++++++-------------
block/curl.c | 24 +++++--
block/dirty-bitmap.c | 5 ++
block/sheepdog.c | 166 +++++++++++++++++++++----------------------
blockjob.c | 30 +++++++-
include/block/dirty-bitmap.h | 1 +
include/qemu/hbitmap.h | 8 +++
tests/test-hbitmap.c | 61 ++++++++++++++++
util/hbitmap.c | 39 ++++++++++
9 files changed, 309 insertions(+), 141 deletions(-)
--
2.9.5
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Qemu-devel] [PULL 00/10] Block patches
2017-12-18 21:08 [Qemu-devel] [PULL 00/10] Block patches Jeff Cody
@ 2017-12-19 19:10 ` Peter Maydell
0 siblings, 0 replies; 26+ messages in thread
From: Peter Maydell @ 2017-12-19 19:10 UTC (permalink / raw)
To: Jeff Cody
Cc: Qemu-block, Vladimir Sementsov-Ogievskiy, John Snow,
QEMU Developers
On 18 December 2017 at 21:08, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit 411ad78115ebeb3411cf4b7622784b93dfabe259:
>
> Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-12-15-1' into staging (2017-12-17 15:27:41 +0000)
>
> are available in the git repository at:
>
> git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 996922de45299878cdc4c15b72b19edf2bc618a4:
>
> block/curl: fix minor memory leaks (2017-12-18 15:44:39 -0500)
>
> ----------------------------------------------------------------
> Blockjob and protocol patches
> ----------------------------------------------------------------
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2017-12-19 19:11 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 02/10] qed: Add support for zero clusters Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 03/10] atapi: Drives can be locked without media present Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 04/10] atapi: Report correct errors on guest eject request Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 05/10] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 06/10] atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 07/10] atapi: GESN: Use structs for commonly-used field types Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 08/10] atapi: GESN: Standardise event response handling for future additions Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 09/10] atapi: GESN: implement 'media' subcommand Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 10/10] vpc.c: Use get_option_parameter() does the search Kevin Wolf
-- strict thread matches above, loose matches on Subject: below --
2017-12-18 21:08 [Qemu-devel] [PULL 00/10] Block patches Jeff Cody
2017-12-19 19:10 ` Peter Maydell
2016-06-29 3:10 Jeff Cody
2016-06-29 18:13 ` Peter Maydell
2015-12-22 8:54 Stefan Hajnoczi
2015-12-22 14:47 ` Peter Maydell
2015-06-12 14:57 Stefan Hajnoczi
2015-06-15 9:42 ` Peter Maydell
2013-06-04 12:45 Kevin Wolf
2013-06-17 21:17 ` Anthony Liguori
2012-08-15 13:56 Kevin Wolf
2012-08-15 19:49 ` Anthony Liguori
2010-11-04 13:15 Kevin Wolf
2010-08-30 16:32 Kevin Wolf
2010-09-06 15:07 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).