* [PATCH 1/2] Btrfs/tracepoint: fix to report right flags for ordered extent
@ 2013-11-06 4:04 Liu Bo
2013-11-06 4:04 ` [PATCH 2/2] Btrfs/tracepoint: update new flags for ordered extent TP Liu Bo
0 siblings, 1 reply; 2+ messages in thread
From: Liu Bo @ 2013-11-06 4:04 UTC (permalink / raw)
To: linux-btrfs
We use set_bit() to assign ordered extent's flags, but in the related
tracepoint we don't do the same thing, which makes the trace output
not to parse flags correctly.
Also, since the flags are bits stuff, we change to use __print_flags with
a 'delim' instead of __print_symbolic.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
include/trace/events/btrfs.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index f18b3b7..4fbe10a 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -206,17 +206,17 @@ TRACE_EVENT(btrfs_get_extent,
__entry->refs, __entry->compress_type)
);
-#define show_ordered_flags(flags) \
- __print_symbolic(flags, \
- { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \
- { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \
- { BTRFS_ORDERED_NOCOW, "NOCOW" }, \
- { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \
- { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \
- { BTRFS_ORDERED_DIRECT, "DIRECT" }, \
- { BTRFS_ORDERED_IOERR, "IOERR" }, \
- { BTRFS_ORDERED_UPDATED_ISIZE, "UPDATED_ISIZE" }, \
- { BTRFS_ORDERED_LOGGED_CSUM, "LOGGED_CSUM" })
+#define show_ordered_flags(flags) \
+ __print_flags(flags, "|", \
+ { (1 << BTRFS_ORDERED_IO_DONE), "IO_DONE" }, \
+ { (1 << BTRFS_ORDERED_COMPLETE), "COMPLETE" }, \
+ { (1 << BTRFS_ORDERED_NOCOW), "NOCOW" }, \
+ { (1 << BTRFS_ORDERED_COMPRESSED), "COMPRESSED" }, \
+ { (1 << BTRFS_ORDERED_PREALLOC), "PREALLOC" }, \
+ { (1 << BTRFS_ORDERED_DIRECT), "DIRECT" }, \
+ { (1 << BTRFS_ORDERED_IOERR), "IOERR" }, \
+ { (1 << BTRFS_ORDERED_UPDATED_ISIZE), "UPDATED_ISIZE" }, \
+ { (1 << BTRFS_ORDERED_LOGGED_CSUM), "LOGGED_CSUM" })
DECLARE_EVENT_CLASS(btrfs__ordered_extent,
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] Btrfs/tracepoint: update new flags for ordered extent TP
2013-11-06 4:04 [PATCH 1/2] Btrfs/tracepoint: fix to report right flags for ordered extent Liu Bo
@ 2013-11-06 4:04 ` Liu Bo
0 siblings, 0 replies; 2+ messages in thread
From: Liu Bo @ 2013-11-06 4:04 UTC (permalink / raw)
To: linux-btrfs
Flag BTRFS_ORDERED_TRUNCATED is a new one, update the tracepoint to
support it.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
include/trace/events/btrfs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 4fbe10a..55c3829 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -216,7 +216,8 @@ TRACE_EVENT(btrfs_get_extent,
{ (1 << BTRFS_ORDERED_DIRECT), "DIRECT" }, \
{ (1 << BTRFS_ORDERED_IOERR), "IOERR" }, \
{ (1 << BTRFS_ORDERED_UPDATED_ISIZE), "UPDATED_ISIZE" }, \
- { (1 << BTRFS_ORDERED_LOGGED_CSUM), "LOGGED_CSUM" })
+ { (1 << BTRFS_ORDERED_LOGGED_CSUM), "LOGGED_CSUM" }, \
+ { (1 << BTRFS_ORDERED_TRUNCATED), "TRUNCATED" })
DECLARE_EVENT_CLASS(btrfs__ordered_extent,
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-06 4:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 4:04 [PATCH 1/2] Btrfs/tracepoint: fix to report right flags for ordered extent Liu Bo
2013-11-06 4:04 ` [PATCH 2/2] Btrfs/tracepoint: update new flags for ordered extent TP Liu Bo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).