[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v20 7/8] block: add some trace events for new block layer APIs
From: |
Sam Li |
Subject: |
[PATCH v20 7/8] block: add some trace events for new block layer APIs |
Date: |
Mon, 8 May 2023 12:55:32 +0800 |
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20230324090605.28361-8-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 9a52ad4c65..e143de8217 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -3267,6 +3267,7 @@ static int coroutine_fn
raw_co_zone_report(BlockDriverState *bs, int64_t offset,
},
};
+ trace_zbd_zone_report(bs, *nr_zones, offset >> BDRV_SECTOR_BITS);
return raw_thread_pool_submit(handle_aiocb_zone_report, &acb);
}
#endif
@@ -3333,6 +3334,8 @@ static int coroutine_fn raw_co_zone_mgmt(BlockDriverState
*bs, BlockZoneOp op,
},
};
+ trace_zbd_zone_mgmt(bs, op_name, offset >> BDRV_SECTOR_BITS,
+ len >> BDRV_SECTOR_BITS);
ret = raw_thread_pool_submit(handle_aiocb_zone_mgmt, &acb);
if (ret != 0) {
error_report("ioctl %s failed %d", op_name, ret);
diff --git a/block/trace-events b/block/trace-events
index 48dbf10c66..3f4e1d088a 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -209,6 +209,8 @@ file_FindEjectableOpticalMedia(const char *media) "Matching
using %s"
file_setup_cdrom(const char *partition) "Using %s as optical disc"
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"
# 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.0
- [PATCH v20 0/8] Add support for zoned device, Sam Li, 2023/05/08
- [PATCH v20 1/8] block/block-common: add zoned device structs, Sam Li, 2023/05/08
- [PATCH v20 2/8] block/file-posix: introduce helper functions for sysfs attributes, Sam Li, 2023/05/08
- [PATCH v20 3/8] block/block-backend: add block layer APIs resembling Linux ZonedBlockDevice ioctls, Sam Li, 2023/05/08
- [PATCH v20 4/8] block/raw-format: add zone operations to pass through requests, Sam Li, 2023/05/08
- [PATCH v20 5/8] block: add zoned BlockDriver check to block layer, Sam Li, 2023/05/08
- [PATCH v20 6/8] iotests: test new zone operations, Sam Li, 2023/05/08
- [PATCH v20 7/8] block: add some trace events for new block layer APIs,
Sam Li <=
- [PATCH v20 8/8] docs/zoned-storage: add zoned device documentation, Sam Li, 2023/05/08