From patchwork Tue Nov 25 05:34:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 5371621 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 695039F319 for ; Tue, 25 Nov 2014 05:35:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92BC92015D for ; Tue, 25 Nov 2014 05:35:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2D4B20136 for ; Tue, 25 Nov 2014 05:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbaKYFev (ORCPT ); Tue, 25 Nov 2014 00:34:51 -0500 Received: from imap.thunk.org ([74.207.234.97]:49129 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800AbaKYFet (ORCPT ); Tue, 25 Nov 2014 00:34:49 -0500 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=flECDwlgMD1+CIypAeeoIIjNDCgUqcT8QH3Ifrl0Rs4=; b=Z5eKIliM/TU74JgT45jpuPemE691hch2SkfdioQnZAw361fzrbUhz814HyjyiFdW2xmTaLM9XFUcteHrgU1z1dxoPjcCsXcHb6G7pZouCj3Lj3WzXonBIA26lhGycC3Eh6PuPG4X2rLFSu73YVOsdZL0L7O9LZ2c95sAmEtHsKk=; Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1Xt8lz-0005eW-VR; Tue, 25 Nov 2014 05:34:48 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 5F86958028E; Tue, 25 Nov 2014 00:34:45 -0500 (EST) From: Theodore Ts'o To: Linux Filesystem Development List Cc: Ext4 Developers List , Linux btrfs Developers List , XFS Developers , Theodore Ts'o Subject: [PATCH-v3 4/6] vfs: add lazytime tracepoints for better debugging Date: Tue, 25 Nov 2014 00:34:32 -0500 Message-Id: <1416893674-419-5-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1416893674-419-1-git-send-email-tytso@mit.edu> References: <1416893674-419-1-git-send-email-tytso@mit.edu> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Theodore Ts'o --- fs/fs-writeback.c | 5 ++++- fs/inode.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index eb04277..cab2d6d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "internal.h" /* @@ -1304,8 +1305,10 @@ static void flush_sb_dirty_time(struct super_block *sb) iput(old_inode); old_inode = inode; - if (dirty_time) + if (dirty_time) { + trace_fs_lazytime_flush(inode); mark_inode_dirty(inode); + } cond_resched(); spin_lock(&inode_sb_list_lock); } diff --git a/fs/inode.c b/fs/inode.c index 34a443f..6319ead 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -20,6 +20,9 @@ #include #include "internal.h" +#define CREATE_TRACE_POINTS +#include + /* * Inode locking rules: * @@ -544,6 +547,7 @@ static void evict(struct inode *inode) mark_inode_dirty(inode); inode->i_sb->s_op->write_inode(inode, &wbc); } + trace_fs_lazytime_evict(inode); } if (!list_empty(&inode->i_wb_list)) @@ -1550,6 +1554,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) inode->i_state |= I_DIRTY_TIME; spin_unlock(&inode->i_lock); inode->i_ts_dirty_day = daycode; + trace_fs_lazytime_defer(inode); return 0; } }