xfs
[Top] [All Lists]

[PATCH-v4 4/7] vfs: add lazytime tracepoints for better debugging

To: Linux Filesystem Development List <linux-fsdevel@xxxxxxxxxxxxxxx>
Subject: [PATCH-v4 4/7] vfs: add lazytime tracepoints for better debugging
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Wed, 26 Nov 2014 05:23:54 -0500
Cc: Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, Linux btrfs Developers List <linux-btrfs@xxxxxxxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=EbWjG5wpSb4tSD+FXyCRhFiDyObusS3j92QGMKfuP+Q=; b=EpsqF/2VGH2aYC7kFvWlE1DHejMH7z2ocuxqgWoJCFlGadR43wBcBC8fMC47rtxKyAiYSR4mTfYMiP/2oTNtPrEUzFHFxHaCpThGDLBcV2aiURWeas0YcMaZgkg0Ex1H09VnFQJStoUET4PgAYEwSSRb0EcaZe0TENcYbAFWU/w=;
In-reply-to: <1416997437-26092-1-git-send-email-tytso@xxxxxxx>
References: <1416997437-26092-1-git-send-email-tytso@xxxxxxx>
Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
---
 fs/fs-writeback.c | 1 +
 fs/inode.c        | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 529480a..3d87174 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -27,6 +27,7 @@
 #include <linux/backing-dev.h>
 #include <linux/tracepoint.h>
 #include <linux/device.h>
+#include <trace/events/fs.h>
 #include "internal.h"
 
 /*
diff --git a/fs/inode.c b/fs/inode.c
index 37c0429..b2fea60 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -20,6 +20,9 @@
 #include <linux/list_lru.h>
 #include "internal.h"
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/fs.h>
+
 /*
  * Inode locking rules:
  *
@@ -1443,6 +1446,7 @@ retry:
                                inode->i_op->write_time(inode);
                        else if (inode->i_sb->s_op->write_inode)
                                mark_inode_dirty_sync(inode);
+                       trace_fs_lazytime_iput(inode);
                        goto retry;
                }
                iput_final(inode);
@@ -1561,6 +1565,7 @@ static int update_time(struct inode *inode, struct 
timespec *time, int flags)
                inode->i_ts_dirty_day = days_since_boot;
                spin_unlock(&inode->i_lock);
                inode_requeue_dirtytime(inode);
+               trace_fs_lazytime_defer(inode);
                return 0;
        }
 force_dirty:
-- 
2.1.0

<Prev in Thread] Current Thread [Next in Thread>