linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
	Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 3/6] ext4: translate fallocate mode bits to strings
Date: Mon, 17 Feb 2014 16:08:20 +0100	[thread overview]
Message-ID: <1392649703-10772-4-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1392649703-10772-1-git-send-email-lczerner@redhat.com>

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 fs/ext4/ext4.h              | 1 +
 fs/ext4/extents.c           | 1 -
 include/trace/events/ext4.h | 9 +++++++--
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ece5556..3b9601c 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -31,6 +31,7 @@
 #include <linux/percpu_counter.h>
 #include <linux/ratelimit.h>
 #include <crypto/hash.h>
+#include <linux/falloc.h>
 #ifdef __KERNEL__
 #include <linux/compat.h>
 #endif
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2d68a46..4bfa870 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -37,7 +37,6 @@
 #include <linux/quotaops.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-#include <linux/falloc.h>
 #include <asm/uaccess.h>
 #include <linux/fiemap.h>
 #include "ext4_jbd2.h"
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 197d312..451e020 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -68,6 +68,11 @@ struct extent_status;
 	{ EXTENT_STATUS_DELAYED,	"D" },			\
 	{ EXTENT_STATUS_HOLE,		"H" })
 
+#define show_falloc_mode(mode) __print_flags(mode, "|",		\
+	{ FALLOC_FL_KEEP_SIZE,		"KEEP_SIZE"},		\
+	{ FALLOC_FL_PUNCH_HOLE,		"PUNCH_HOLE"},		\
+	{ FALLOC_FL_NO_HIDE_STALE,	"NO_HIDE_STALE"})
+
 
 TRACE_EVENT(ext4_free_inode,
 	TP_PROTO(struct inode *inode),
@@ -1349,10 +1354,10 @@ TRACE_EVENT(ext4_fallocate_enter,
 		__entry->mode	= mode;
 	),
 
-	TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
+	TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %s",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->pos,
-		  __entry->len, __entry->mode)
+		  __entry->len, show_falloc_mode(__entry->mode))
 );
 
 TRACE_EVENT(ext4_fallocate_exit,
-- 
1.8.3.1


  parent reply	other threads:[~2014-02-17 15:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 15:08 [PATCH 0/6][RFC] Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Lukas Czerner
2014-02-17 15:08 ` [PATCH 1/6] ext4: Update inode i_size after the preallocation Lukas Czerner
2014-02-17 23:12   ` Andreas Dilger
2014-02-17 23:21     ` Theodore Ts'o
2014-02-18  8:13       ` Lukáš Czerner
2014-02-17 15:08 ` [PATCH 2/6] ext4: refactor ext4_fallocate code Lukas Czerner
2014-02-18  8:25   ` jon ernst
2014-02-17 15:08 ` Lukas Czerner [this message]
2014-02-17 15:08 ` [PATCH 4/6] fs: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Lukas Czerner
2014-02-18  2:51   ` Dave Chinner
2014-02-18  8:10     ` Lukáš Czerner
2014-02-17 15:08 ` [PATCH 5/6] ext4: " Lukas Czerner
2014-02-18  8:27   ` jon ernst
2014-02-17 15:08 ` [PATCH 6/6] xfs: Add support for FALLOC_FL_ZERO_RANGE Lukas Czerner
2014-02-18  4:51   ` Dave Chinner
2014-02-18  1:01 ` [PATCH 0/6][RFC] Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Dave Chinner
2014-02-18  8:33   ` Dave Chinner
2014-02-18  9:09     ` Lukáš Czerner
2014-02-18  9:41       ` Dave Chinner
2014-02-18 12:04         ` Lukáš Czerner
2014-02-18 14:23           ` Theodore Ts'o
2014-02-18 14:42             ` Lukáš Czerner
2014-02-19  0:33               ` Theodore Ts'o
2014-02-19 14:52 ` Dongsu Park
2014-02-19 15:18   ` Lukáš Czerner
2014-02-19 15:51     ` Dongsu Park
2014-02-20 11:16       ` Lukáš Czerner
2014-02-24  1:07 ` Dave Chinner
2014-02-24 13:47   ` Lukáš Czerner
2014-04-16  6:36 ` Christoph Hellwig
     [not found]   ` <20140416063618.GA12498-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-04-16 10:43     ` Lukáš Czerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392649703-10772-4-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).