Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250421
b: refs/heads/master
c: 8ff8308
h: refs/heads/master
i:
  250419: 30f9317
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 13, 2011
1 parent 36fa47c commit 986d223
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b137545c44fc0c80fb778abb0c582bda5601e8f8
refs/heads/master: 8ff83089f8bcbd9a2e898b68f1a46487c8b6e38c
12 changes: 4 additions & 8 deletions trunk/fs/ubifs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void dbg_dump_budg(struct ubifs_info *c)
struct ubifs_gced_idx_leb *idx_gc;
long long available, outstanding, free;

ubifs_assert(spin_is_locked(&c->space_lock));
spin_lock(&c->space_lock);
spin_lock(&dbg_lock);
printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, "
"budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid,
Expand Down Expand Up @@ -655,6 +655,7 @@ void dbg_dump_budg(struct ubifs_info *c)
printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n",
available, outstanding, free);
spin_unlock(&dbg_lock);
spin_unlock(&c->space_lock);
}

void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp)
Expand Down Expand Up @@ -1046,10 +1047,7 @@ int dbg_check_space_info(struct ubifs_info *c)

ubifs_msg("current lprops statistics dump");
dbg_dump_lstats(&lst);

spin_lock(&c->space_lock);
dbg_dump_budg(c);
spin_unlock(&c->space_lock);
dump_stack();
return -EINVAL;
}
Expand Down Expand Up @@ -2796,11 +2794,9 @@ static ssize_t write_debugfs_file(struct file *file, const char __user *buf,

if (file->f_path.dentry == d->dfs_dump_lprops)
dbg_dump_lprops(c);
else if (file->f_path.dentry == d->dfs_dump_budg) {
spin_lock(&c->space_lock);
else if (file->f_path.dentry == d->dfs_dump_budg)
dbg_dump_budg(c);
spin_unlock(&c->space_lock);
} else if (file->f_path.dentry == d->dfs_dump_tnc) {
else if (file->f_path.dentry == d->dfs_dump_tnc) {
mutex_lock(&c->tnc_mutex);
dbg_dump_tnc(c);
mutex_unlock(&c->tnc_mutex);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/ubifs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,8 @@ static int make_reservation(struct ubifs_info *c, int jhead, int len)
if (err == -ENOSPC) {
/* This are some budgeting problems, print useful information */
down_write(&c->commit_sem);
spin_lock(&c->space_lock);
dbg_dump_stack();
dbg_dump_budg(c);
spin_unlock(&c->space_lock);
dbg_dump_lprops(c);
cmt_retries = dbg_check_lprops(c);
up_write(&c->commit_sem);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/ubifs/tnc_commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt)
* option which forces in-the-gaps is enabled.
*/
ubifs_err("out of space");
spin_lock(&c->space_lock);
dbg_dump_budg(c);
spin_unlock(&c->space_lock);
dbg_dump_lprops(c);
}
/* Try to commit anyway */
Expand Down

0 comments on commit 986d223

Please sign in to comment.