diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-18 11:54:29 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-13 04:20:07 -0400 |
commit | 7d32c2bb143fa1ca3b0c420feb08a832d65395be (patch) | |
tree | 2929bc914c8e70b2e14d451fa70c1c4273c24ac9 /fs | |
parent | 182854b46f9feb6f1b03abe747bb2beeebf2adb0 (diff) |
UBIFS: improve debugging
1. Print inode mode in some of debugging messages
2. Add few more useful assertions
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/file.c | 3 | ||||
-rw-r--r-- | 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 8565e586e533..01598f28020b 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -941,7 +941,8 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr) | |||
941 | struct inode *inode = dentry->d_inode; | 941 | struct inode *inode = dentry->d_inode; |
942 | struct ubifs_info *c = inode->i_sb->s_fs_info; | 942 | struct ubifs_info *c = inode->i_sb->s_fs_info; |
943 | 943 | ||
944 | dbg_gen("ino %lu, ia_valid %#x", inode->i_ino, attr->ia_valid); | 944 | dbg_gen("ino %lu, mode %#x, ia_valid %#x", |
945 | inode->i_ino, inode->i_mode, attr->ia_valid); | ||
945 | err = inode_change_ok(inode, attr); | 946 | err = inode_change_ok(inode, attr); |
946 | if (err) | 947 | if (err) |
947 | return err; | 948 | return err; |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 43af934a7558..06e3b22a0c1b 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) | |||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | 301 | ||
302 | dbg_gen("inode %lu", inode->i_ino); | 302 | dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode); |
303 | err = ubifs_jnl_write_inode(c, inode, 0); | 303 | err = ubifs_jnl_write_inode(c, inode, 0); |
304 | if (err) | 304 | if (err) |
305 | ubifs_err("can't write inode %lu, error %d", inode->i_ino, err); | 305 | 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) | |||
323 | */ | 323 | */ |
324 | goto out; | 324 | goto out; |
325 | 325 | ||
326 | dbg_gen("inode %lu", inode->i_ino); | 326 | dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode); |
327 | ubifs_assert(!atomic_read(&inode->i_count)); | 327 | ubifs_assert(!atomic_read(&inode->i_count)); |
328 | ubifs_assert(inode->i_nlink == 0); | 328 | ubifs_assert(inode->i_nlink == 0); |
329 | ubifs_assert(!ubifs_inode(inode)->dirty); | ||
329 | 330 | ||
330 | truncate_inode_pages(&inode->i_data, 0); | 331 | truncate_inode_pages(&inode->i_data, 0); |
331 | if (is_bad_inode(inode)) | 332 | if (is_bad_inode(inode)) |
@@ -1469,6 +1470,7 @@ static void ubifs_put_super(struct super_block *sb) | |||
1469 | */ | 1470 | */ |
1470 | ubifs_assert(atomic_long_read(&c->dirty_pg_cnt) == 0); | 1471 | ubifs_assert(atomic_long_read(&c->dirty_pg_cnt) == 0); |
1471 | ubifs_assert(c->budg_idx_growth == 0); | 1472 | ubifs_assert(c->budg_idx_growth == 0); |
1473 | ubifs_assert(c->budg_dd_growth == 0); | ||
1472 | ubifs_assert(c->budg_data_growth == 0); | 1474 | ubifs_assert(c->budg_data_growth == 0); |
1473 | 1475 | ||
1474 | /* | 1476 | /* |