From: Artem Bityutskiy <dedekind@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Adrian Hunter <ext-adrian.hunter@nokia.com>,
Zoltan Sogor <weth@inf.u-szeged.hu>,
Christoph Hellwig <hch@lst.de>
Subject: [PATCH] UBIFS: improve debugging
Date: Wed, 13 Aug 2008 13:17:33 +0300 [thread overview]
Message-ID: <1218622675-28853-5-git-send-email-dedekind@infradead.org> (raw)
In-Reply-To: <1218622675-28853-1-git-send-email-dedekind@infradead.org>
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
1. Print inode mode in some of debugging messages
2. Add few more useful assertions
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
fs/ubifs/file.c | 3 ++-
fs/ubifs/super.c | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 8565e58..01598f2 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -941,7 +941,8 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr)
struct inode *inode = dentry->d_inode;
struct ubifs_info *c = inode->i_sb->s_fs_info;
- dbg_gen("ino %lu, ia_valid %#x", inode->i_ino, attr->ia_valid);
+ dbg_gen("ino %lu, mode %#x, ia_valid %#x",
+ inode->i_ino, inode->i_mode, attr->ia_valid);
err = inode_change_ok(inode, attr);
if (err)
return err;
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 43af934..06e3b22 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -299,7 +299,7 @@ static int ubifs_write_inode(struct inode *inode, int wait)
return 0;
}
- dbg_gen("inode %lu", inode->i_ino);
+ dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode);
err = ubifs_jnl_write_inode(c, inode, 0);
if (err)
ubifs_err("can't write inode %lu, error %d", inode->i_ino, err);
@@ -323,9 +323,10 @@ static void ubifs_delete_inode(struct inode *inode)
*/
goto out;
- dbg_gen("inode %lu", inode->i_ino);
+ dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode);
ubifs_assert(!atomic_read(&inode->i_count));
ubifs_assert(inode->i_nlink == 0);
+ ubifs_assert(!ubifs_inode(inode)->dirty);
truncate_inode_pages(&inode->i_data, 0);
if (is_bad_inode(inode))
@@ -1469,6 +1470,7 @@ static void ubifs_put_super(struct super_block *sb)
*/
ubifs_assert(atomic_long_read(&c->dirty_pg_cnt) == 0);
ubifs_assert(c->budg_idx_growth == 0);
+ ubifs_assert(c->budg_dd_growth == 0);
ubifs_assert(c->budg_data_growth == 0);
/*
--
1.5.4.1
next prev parent reply other threads:[~2008-08-13 8:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 10:17 UBIFS updates for 2.6.27 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] Documentation: fix typo in ubifs.txt Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print volume name as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting calculations Artem Bityutskiy
2008-08-13 10:17 ` Artem Bityutskiy [this message]
2008-08-13 10:17 ` [PATCH] UBIFS: free budget in delete_inode as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix error return in failure mode Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: ensure UBIFS switches to read-only on error Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: make ubifs_ro_mode() not inline Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: do not write orphans back Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove unneeded function parameter Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove another " Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: increment commit number earlier Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: optimize deletions Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: do not union creat_sqnum and del_cmtno Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix typos in comments Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct orphan deletion order Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve budgeting checks Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: align inode data to eight Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print pid in dump function Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: reserve more space for index Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: minor tweaks in commit Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: support splice_write Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct spelling of "thrice" Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: always set i_generation to 0 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve arguments checking in debugging messages Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting request alignment in xattr code Artem Bityutskiy
2008-08-14 19:27 ` UBIFS updates for 2.6.27 Christoph Hellwig
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=1218622675-28853-5-git-send-email-dedekind@infradead.org \
--to=dedekind@infradead.org \
--cc=ext-adrian.hunter@nokia.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=weth@inf.u-szeged.hu \
/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
all inboxes | Powered by JetHome®