[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 04/12] block/file-posix: add trace event for fallocate() calls
From: |
Andrey Drobyshev |
Subject: |
[PATCH v3 04/12] block/file-posix: add trace event for fallocate() calls |
Date: |
Fri, 13 Sep 2024 19:39:34 +0300 |
This would ease debugging of write zeroes and discard operations.
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
---
block/file-posix.c | 1 +
block/trace-events | 1 +
2 files changed, 2 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index ff928b5e85..9016057926 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1862,6 +1862,7 @@ static int translate_err(int err)
static int do_fallocate(int fd, int mode, off_t offset, off_t len)
{
do {
+ trace_file_do_fallocate(fd, mode, offset, len);
if (fallocate(fd, mode, offset, len) == 0) {
return 0;
}
diff --git a/block/trace-events b/block/trace-events
index 8e789e1f12..2f7ad28996 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -203,6 +203,7 @@ curl_setup_preadv(uint64_t bytes, uint64_t start, const
char *range) "reading %"
curl_close(void) "close"
# file-posix.c
+file_do_fallocate(int fd, int mode, int64_t offset, int64_t len) "fd=%d
mode=0x%02x offset=%" PRIi64 " len=%" PRIi64
file_copy_file_range(void *bs, int src, int64_t src_off, int dst, int64_t
dst_off, int64_t bytes, int flags, int64_t ret) "bs %p src_fd %d offset
%"PRIu64" dst_fd %d offset %"PRIu64" bytes %"PRIu64" flags %d ret %"PRId64
file_FindEjectableOpticalMedia(const char *media) "Matching using %s"
file_setup_cdrom(const char *partition) "Using %s as optical disc"
--
2.39.3
- [PATCH v3 00/12] qcow2: make subclusters discardable, Andrey Drobyshev, 2024/09/13
- [PATCH v3 02/12] qcow2: simplify L2 entries accounting for discard-no-unref, Andrey Drobyshev, 2024/09/13
- [PATCH v3 04/12] block/file-posix: add trace event for fallocate() calls,
Andrey Drobyshev <=
- [PATCH v3 01/12] qcow2: make function update_refcount_discard() global, Andrey Drobyshev, 2024/09/13
- [PATCH v3 09/12] qcow2: make subclusters discardable, Andrey Drobyshev, 2024/09/13
- [PATCH v3 06/12] iotests/290: add test case to check 'discard-no-unref' option behavior, Andrey Drobyshev, 2024/09/13
- [PATCH v3 07/12] qcow2: add get_sc_range_info() helper for working with subcluster ranges, Andrey Drobyshev, 2024/09/13
- [PATCH v3 08/12] qcow2: zeroize the entire cluster when there're no non-zero subclusters, Andrey Drobyshev, 2024/09/13
- [PATCH v3 03/12] qcow2: put discard requests in the common queue when discard-no-unref enabled, Andrey Drobyshev, 2024/09/13
- [PATCH v3 05/12] iotests/common.rc: add disk_usage function, Andrey Drobyshev, 2024/09/13
- [PATCH v3 12/12] qcow2: add discard-subclusters option, Andrey Drobyshev, 2024/09/13
- [PATCH v3 10/12] qcow2: zero_l2_subclusters: fall through to discard operation when requested, Andrey Drobyshev, 2024/09/13