aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2014-02-22 06:18:17 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-02-22 06:18:17 -0500
commita633f5a319cf4116d977e25fea2830dce23a8e74 (patch)
tree0de41a25ba9e750458a72c195229375bc08a7400
parenta9b8241594adda0a7a4fb3b87bf29d2dff0d997d (diff)
ext4: translate fallocate mode bits to strings
Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/ext4.h1
-rw-r--r--fs/ext4/extents.c1
-rw-r--r--include/trace/events/ext4.h9
3 files changed, 8 insertions, 3 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index d3a534fdc5ff..b7207db3107c 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -31,6 +31,7 @@
31#include <linux/percpu_counter.h> 31#include <linux/percpu_counter.h>
32#include <linux/ratelimit.h> 32#include <linux/ratelimit.h>
33#include <crypto/hash.h> 33#include <crypto/hash.h>
34#include <linux/falloc.h>
34#ifdef __KERNEL__ 35#ifdef __KERNEL__
35#include <linux/compat.h> 36#include <linux/compat.h>
36#endif 37#endif
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ef4b535e0a02..2e0608e3be6e 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -37,7 +37,6 @@
37#include <linux/quotaops.h> 37#include <linux/quotaops.h>
38#include <linux/string.h> 38#include <linux/string.h>
39#include <linux/slab.h> 39#include <linux/slab.h>
40#include <linux/falloc.h>
41#include <asm/uaccess.h> 40#include <asm/uaccess.h>
42#include <linux/fiemap.h> 41#include <linux/fiemap.h>
43#include "ext4_jbd2.h" 42#include "ext4_jbd2.h"
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 197d3125df2a..451e0202aa69 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -68,6 +68,11 @@ struct extent_status;
68 { EXTENT_STATUS_DELAYED, "D" }, \ 68 { EXTENT_STATUS_DELAYED, "D" }, \
69 { EXTENT_STATUS_HOLE, "H" }) 69 { EXTENT_STATUS_HOLE, "H" })
70 70
71#define show_falloc_mode(mode) __print_flags(mode, "|", \
72 { FALLOC_FL_KEEP_SIZE, "KEEP_SIZE"}, \
73 { FALLOC_FL_PUNCH_HOLE, "PUNCH_HOLE"}, \
74 { FALLOC_FL_NO_HIDE_STALE, "NO_HIDE_STALE"})
75
71 76
72TRACE_EVENT(ext4_free_inode, 77TRACE_EVENT(ext4_free_inode,
73 TP_PROTO(struct inode *inode), 78 TP_PROTO(struct inode *inode),
@@ -1349,10 +1354,10 @@ TRACE_EVENT(ext4_fallocate_enter,
1349 __entry->mode = mode; 1354 __entry->mode = mode;
1350 ), 1355 ),
1351 1356
1352 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d", 1357 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %s",
1353 MAJOR(__entry->dev), MINOR(__entry->dev), 1358 MAJOR(__entry->dev), MINOR(__entry->dev),
1354 (unsigned long) __entry->ino, __entry->pos, 1359 (unsigned long) __entry->ino, __entry->pos,
1355 __entry->len, __entry->mode) 1360 __entry->len, show_falloc_mode(__entry->mode))
1356); 1361);
1357 1362
1358TRACE_EVENT(ext4_fallocate_exit, 1363TRACE_EVENT(ext4_fallocate_exit,