[PATCH 21/21] blkparse: parse zone append completions

Johannes Thumshirn posted 21 patches 3 weeks, 2 days ago
There is a newer version of this series
[PATCH 21/21] blkparse: parse zone append completions
Posted by Johannes Thumshirn 3 weeks, 2 days ago
Parse completion of Zone Append commands in blkparse.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 blkparse_fmt.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/blkparse_fmt.c b/blkparse_fmt.c
index 467c8c5..725ddbe 100644
--- a/blkparse_fmt.c
+++ b/blkparse_fmt.c
@@ -331,6 +331,27 @@ static void process_zoned(char *act, struct blk_io_trace2 *t,
 			  unsigned long long elapsed, char *name)
 {
 	switch (act[1]) {
+	case 'A':	/* Zone Append */
+		if (elapsed != -1ULL) {
+			if (t_sec(t))
+				fprintf(ofp, "%llu + %u (%8llu) [%d]\n",
+					(unsigned long long) t->sector,
+					t_sec(t), elapsed, t->error);
+			else
+				fprintf(ofp, "%llu (%8llu) [%d]\n",
+					(unsigned long long) t->sector,
+					elapsed, t->error);
+		} else {
+			if (t_sec(t))
+				fprintf(ofp, "%llu + %u [%d]\n",
+					(unsigned long long) t->sector,
+					t_sec(t), t->error);
+			else
+				fprintf(ofp, "%llu [%d]\n",
+					(unsigned long long) t->sector,
+					t->error);
+		}
+		break;
 	case 'P': /* Zone Plug */
 		fprintf(ofp, "[%s]\n", name);
 		break;
-- 
2.51.0