*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "trace.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "qed.h"
#include "qemu/memalign.h"
/* Called with table_lock held. */
-static int coroutine_fn qed_read_table(BDRVQEDState *s, uint64_t offset,
- QEDTable *table)
+static int coroutine_fn GRAPH_RDLOCK
+qed_read_table(BDRVQEDState *s, uint64_t offset, QEDTable *table)
{
unsigned int bytes = s->header.cluster_size * s->header.table_size;
*
* Called with table_lock held.
*/
-static int coroutine_fn qed_write_table(BDRVQEDState *s, uint64_t offset,
- QEDTable *table, unsigned int index,
- unsigned int n, bool flush)
+static int coroutine_fn GRAPH_RDLOCK
+qed_write_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
+ unsigned int index, unsigned int n, bool flush)
{
unsigned int sector_mask = BDRV_SECTOR_SIZE / sizeof(uint64_t) - 1;
unsigned int start, end, i;
int coroutine_fn qed_write_l1_table(BDRVQEDState *s, unsigned int index,
unsigned int n)
{
- BLKDBG_EVENT(s->bs->file, BLKDBG_L1_UPDATE);
+ BLKDBG_CO_EVENT(s->bs->file, BLKDBG_L1_UPDATE);
return qed_write_table(s, s->header.l1_table_offset,
s->l1_table, index, n, false);
}
request->l2_table = qed_alloc_l2_cache_entry(&s->l2_cache);
request->l2_table->table = qed_alloc_table(s);
- BLKDBG_EVENT(s->bs->file, BLKDBG_L2_LOAD);
+ BLKDBG_CO_EVENT(s->bs->file, BLKDBG_L2_LOAD);
ret = qed_read_table(s, offset, request->l2_table->table);
if (ret) {
unsigned int index, unsigned int n,
bool flush)
{
- BLKDBG_EVENT(s->bs->file, BLKDBG_L2_UPDATE);
+ BLKDBG_CO_EVENT(s->bs->file, BLKDBG_L2_UPDATE);
return qed_write_table(s, request->l2_table->offset,
request->l2_table->table, index, n, flush);
}