[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 12/16] block: add some trace events for zone append
From: |
Stefan Hajnoczi |
Subject: |
[PULL v2 12/16] block: add some trace events for zone append |
Date: |
Mon, 15 May 2023 12:05:02 -0400 |
From: Sam Li <faithilikerun@gmail.com>
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20230508051510.177850-5-faithilikerun@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 179263fec6..0ab158efba 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2513,6 +2513,8 @@ out:
if (!BDRV_ZT_IS_CONV(*wp)) {
if (type & QEMU_AIO_ZONE_APPEND) {
*s->offset = *wp;
+ trace_zbd_zone_append_complete(bs, *s->offset
+ >> BDRV_SECTOR_BITS);
}
/* Advance the wp if needed */
if (offset + bytes > *wp) {
@@ -3554,6 +3556,7 @@ static int coroutine_fn
raw_co_zone_append(BlockDriverState *bs,
len += iov_len;
}
+ trace_zbd_zone_append(bs, *offset >> BDRV_SECTOR_BITS);
return raw_co_prw(bs, *offset, len, qiov, QEMU_AIO_ZONE_APPEND);
}
#endif
diff --git a/block/trace-events b/block/trace-events
index 3f4e1d088a..32665158d6 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -211,6 +211,8 @@ file_hdev_is_sg(int type, int version) "SG device found:
type=%d, version=%d"
file_flush_fdatasync_failed(int err) "errno %d"
zbd_zone_report(void *bs, unsigned int nr_zones, int64_t sector) "bs %p report
%d zones starting at sector offset 0x%" PRIx64 ""
zbd_zone_mgmt(void *bs, const char *op_name, int64_t sector, int64_t len) "bs
%p %s starts at sector offset 0x%" PRIx64 " over a range of 0x%" PRIx64 "
sectors"
+zbd_zone_append(void *bs, int64_t sector) "bs %p append at sector offset 0x%"
PRIx64 ""
+zbd_zone_append_complete(void *bs, int64_t sector) "bs %p returns append
sector 0x%" PRIx64 ""
# ssh.c
sftp_error(const char *op, const char *ssh_err, int ssh_err_code, int
sftp_err_code) "%s failed: %s (libssh error code: %d, sftp error code: %d)"
--
2.40.1
- [PULL v2 01/16] block/block-common: add zoned device structs, (continued)
- [PULL v2 01/16] block/block-common: add zoned device structs, Stefan Hajnoczi, 2023/05/15
- [PULL v2 08/16] docs/zoned-storage: add zoned device documentation, Stefan Hajnoczi, 2023/05/15
- [PULL v2 05/16] block: add zoned BlockDriver check to block layer, Stefan Hajnoczi, 2023/05/15
- [PULL v2 07/16] block: add some trace events for new block layer APIs, Stefan Hajnoczi, 2023/05/15
- [PULL v2 10/16] block: introduce zone append write for zoned devices, Stefan Hajnoczi, 2023/05/15
- [PULL v2 03/16] block/block-backend: add block layer APIs resembling Linux ZonedBlockDevice ioctls, Stefan Hajnoczi, 2023/05/15
- [PULL v2 02/16] block/file-posix: introduce helper functions for sysfs attributes, Stefan Hajnoczi, 2023/05/15
- [PULL v2 06/16] iotests: test new zone operations, Stefan Hajnoczi, 2023/05/15
- [PULL v2 09/16] file-posix: add tracking of the zone write pointers, Stefan Hajnoczi, 2023/05/15
- [PULL v2 11/16] qemu-iotests: test zone append operation, Stefan Hajnoczi, 2023/05/15
- [PULL v2 12/16] block: add some trace events for zone append,
Stefan Hajnoczi <=
- [PULL v2 14/16] block: add accounting for zone append operation, Stefan Hajnoczi, 2023/05/15
- [PULL v2 16/16] docs/zoned-storage:add zoned emulation use case, Stefan Hajnoczi, 2023/05/15
- [PULL v2 13/16] virtio-blk: add zoned storage emulation for zoned devices, Stefan Hajnoczi, 2023/05/15
- [PULL v2 15/16] virtio-blk: add some trace events for zoned emulation, Stefan Hajnoczi, 2023/05/15
- Re: [PULL v2 00/16] Block patches, Richard Henderson, 2023/05/15