diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-27 22:17:07 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-27 22:17:07 -0400 |
commit | b30a72a7edfc64c8929104d5c2178aca489aa559 (patch) | |
tree | 2b26c155c318d08d946bd2d70cf815dcdb29a243 /fs/ubifs/debug.c | |
parent | f1c5d30e1d79bbfb60eaf189db862d3cb2bcac92 (diff) | |
parent | c1b362e3b4d331a63915b268a33207311a439d60 (diff) |
Merge branch 'x86/urgent' into x86/cpu
Conflicts:
arch/x86/kernel/cpu/cyrix.c
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 4e3aaeba4eca..b9cb77473758 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -568,8 +568,8 @@ void dbg_dump_budget_req(const struct ubifs_budget_req *req) | |||
568 | void dbg_dump_lstats(const struct ubifs_lp_stats *lst) | 568 | void dbg_dump_lstats(const struct ubifs_lp_stats *lst) |
569 | { | 569 | { |
570 | spin_lock(&dbg_lock); | 570 | spin_lock(&dbg_lock); |
571 | printk(KERN_DEBUG "Lprops statistics: empty_lebs %d, idx_lebs %d\n", | 571 | printk(KERN_DEBUG "(pid %d) Lprops statistics: empty_lebs %d, " |
572 | lst->empty_lebs, lst->idx_lebs); | 572 | "idx_lebs %d\n", current->pid, lst->empty_lebs, lst->idx_lebs); |
573 | printk(KERN_DEBUG "\ttaken_empty_lebs %d, total_free %lld, " | 573 | printk(KERN_DEBUG "\ttaken_empty_lebs %d, total_free %lld, " |
574 | "total_dirty %lld\n", lst->taken_empty_lebs, lst->total_free, | 574 | "total_dirty %lld\n", lst->taken_empty_lebs, lst->total_free, |
575 | lst->total_dirty); | 575 | lst->total_dirty); |
@@ -587,8 +587,8 @@ void dbg_dump_budg(struct ubifs_info *c) | |||
587 | struct ubifs_gced_idx_leb *idx_gc; | 587 | struct ubifs_gced_idx_leb *idx_gc; |
588 | 588 | ||
589 | spin_lock(&dbg_lock); | 589 | spin_lock(&dbg_lock); |
590 | printk(KERN_DEBUG "Budgeting info: budg_data_growth %lld, " | 590 | printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, " |
591 | "budg_dd_growth %lld, budg_idx_growth %lld\n", | 591 | "budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid, |
592 | c->budg_data_growth, c->budg_dd_growth, c->budg_idx_growth); | 592 | c->budg_data_growth, c->budg_dd_growth, c->budg_idx_growth); |
593 | printk(KERN_DEBUG "\tdata budget sum %lld, total budget sum %lld, " | 593 | printk(KERN_DEBUG "\tdata budget sum %lld, total budget sum %lld, " |
594 | "freeable_cnt %d\n", c->budg_data_growth + c->budg_dd_growth, | 594 | "freeable_cnt %d\n", c->budg_data_growth + c->budg_dd_growth, |
@@ -634,7 +634,7 @@ void dbg_dump_lprops(struct ubifs_info *c) | |||
634 | struct ubifs_lprops lp; | 634 | struct ubifs_lprops lp; |
635 | struct ubifs_lp_stats lst; | 635 | struct ubifs_lp_stats lst; |
636 | 636 | ||
637 | printk(KERN_DEBUG "Dumping LEB properties\n"); | 637 | printk(KERN_DEBUG "(pid %d) Dumping LEB properties\n", current->pid); |
638 | ubifs_get_lp_stats(c, &lst); | 638 | ubifs_get_lp_stats(c, &lst); |
639 | dbg_dump_lstats(&lst); | 639 | dbg_dump_lstats(&lst); |
640 | 640 | ||
@@ -655,7 +655,7 @@ void dbg_dump_leb(const struct ubifs_info *c, int lnum) | |||
655 | if (dbg_failure_mode) | 655 | if (dbg_failure_mode) |
656 | return; | 656 | return; |
657 | 657 | ||
658 | printk(KERN_DEBUG "Dumping LEB %d\n", lnum); | 658 | printk(KERN_DEBUG "(pid %d) Dumping LEB %d\n", current->pid, lnum); |
659 | 659 | ||
660 | sleb = ubifs_scan(c, lnum, 0, c->dbg_buf); | 660 | sleb = ubifs_scan(c, lnum, 0, c->dbg_buf); |
661 | if (IS_ERR(sleb)) { | 661 | if (IS_ERR(sleb)) { |
@@ -720,8 +720,8 @@ void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat) | |||
720 | { | 720 | { |
721 | int i; | 721 | int i; |
722 | 722 | ||
723 | printk(KERN_DEBUG "Dumping heap cat %d (%d elements)\n", | 723 | printk(KERN_DEBUG "(pid %d) Dumping heap cat %d (%d elements)\n", |
724 | cat, heap->cnt); | 724 | current->pid, cat, heap->cnt); |
725 | for (i = 0; i < heap->cnt; i++) { | 725 | for (i = 0; i < heap->cnt; i++) { |
726 | struct ubifs_lprops *lprops = heap->arr[i]; | 726 | struct ubifs_lprops *lprops = heap->arr[i]; |
727 | 727 | ||
@@ -736,7 +736,7 @@ void dbg_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
736 | { | 736 | { |
737 | int i; | 737 | int i; |
738 | 738 | ||
739 | printk(KERN_DEBUG "Dumping pnode:\n"); | 739 | printk(KERN_DEBUG "(pid %d) Dumping pnode:\n", current->pid); |
740 | printk(KERN_DEBUG "\taddress %zx parent %zx cnext %zx\n", | 740 | printk(KERN_DEBUG "\taddress %zx parent %zx cnext %zx\n", |
741 | (size_t)pnode, (size_t)parent, (size_t)pnode->cnext); | 741 | (size_t)pnode, (size_t)parent, (size_t)pnode->cnext); |
742 | printk(KERN_DEBUG "\tflags %lu iip %d level %d num %d\n", | 742 | printk(KERN_DEBUG "\tflags %lu iip %d level %d num %d\n", |
@@ -755,7 +755,7 @@ void dbg_dump_tnc(struct ubifs_info *c) | |||
755 | int level; | 755 | int level; |
756 | 756 | ||
757 | printk(KERN_DEBUG "\n"); | 757 | printk(KERN_DEBUG "\n"); |
758 | printk(KERN_DEBUG "Dumping the TNC tree\n"); | 758 | printk(KERN_DEBUG "(pid %d) Dumping the TNC tree\n", current->pid); |
759 | znode = ubifs_tnc_levelorder_next(c->zroot.znode, NULL); | 759 | znode = ubifs_tnc_levelorder_next(c->zroot.znode, NULL); |
760 | level = znode->level; | 760 | level = znode->level; |
761 | printk(KERN_DEBUG "== Level %d ==\n", level); | 761 | printk(KERN_DEBUG "== Level %d ==\n", level); |
@@ -2208,16 +2208,17 @@ int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset, | |||
2208 | int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf, | 2208 | int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf, |
2209 | int offset, int len, int dtype) | 2209 | int offset, int len, int dtype) |
2210 | { | 2210 | { |
2211 | int err; | 2211 | int err, failing; |
2212 | 2212 | ||
2213 | if (in_failure_mode(desc)) | 2213 | if (in_failure_mode(desc)) |
2214 | return -EIO; | 2214 | return -EIO; |
2215 | if (do_fail(desc, lnum, 1)) | 2215 | failing = do_fail(desc, lnum, 1); |
2216 | if (failing) | ||
2216 | cut_data(buf, len); | 2217 | cut_data(buf, len); |
2217 | err = ubi_leb_write(desc, lnum, buf, offset, len, dtype); | 2218 | err = ubi_leb_write(desc, lnum, buf, offset, len, dtype); |
2218 | if (err) | 2219 | if (err) |
2219 | return err; | 2220 | return err; |
2220 | if (in_failure_mode(desc)) | 2221 | if (failing) |
2221 | return -EIO; | 2222 | return -EIO; |
2222 | return 0; | 2223 | return 0; |
2223 | } | 2224 | } |