diff options
Diffstat (limited to 'fs/reiserfs/item_ops.c')
-rw-r--r-- | fs/reiserfs/item_ops.c | 68 |
1 files changed, 37 insertions, 31 deletions
diff --git a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c index 9475557ab499..72cb1cc51b87 100644 --- a/fs/reiserfs/item_ops.c +++ b/fs/reiserfs/item_ops.c | |||
@@ -97,7 +97,8 @@ static int sd_unit_num(struct virtual_item *vi) | |||
97 | 97 | ||
98 | static void sd_print_vi(struct virtual_item *vi) | 98 | static void sd_print_vi(struct virtual_item *vi) |
99 | { | 99 | { |
100 | reiserfs_warning(NULL, "STATDATA, index %d, type 0x%x, %h", | 100 | reiserfs_warning(NULL, "reiserfs-16100", |
101 | "STATDATA, index %d, type 0x%x, %h", | ||
101 | vi->vi_index, vi->vi_type, vi->vi_ih); | 102 | vi->vi_index, vi->vi_type, vi->vi_ih); |
102 | } | 103 | } |
103 | 104 | ||
@@ -190,7 +191,8 @@ static int direct_unit_num(struct virtual_item *vi) | |||
190 | 191 | ||
191 | static void direct_print_vi(struct virtual_item *vi) | 192 | static void direct_print_vi(struct virtual_item *vi) |
192 | { | 193 | { |
193 | reiserfs_warning(NULL, "DIRECT, index %d, type 0x%x, %h", | 194 | reiserfs_warning(NULL, "reiserfs-16101", |
195 | "DIRECT, index %d, type 0x%x, %h", | ||
194 | vi->vi_index, vi->vi_type, vi->vi_ih); | 196 | vi->vi_index, vi->vi_type, vi->vi_ih); |
195 | } | 197 | } |
196 | 198 | ||
@@ -278,7 +280,7 @@ static void indirect_print_item(struct item_head *ih, char *item) | |||
278 | unp = (__le32 *) item; | 280 | unp = (__le32 *) item; |
279 | 281 | ||
280 | if (ih_item_len(ih) % UNFM_P_SIZE) | 282 | if (ih_item_len(ih) % UNFM_P_SIZE) |
281 | reiserfs_warning(NULL, "indirect_print_item: invalid item len"); | 283 | reiserfs_warning(NULL, "reiserfs-16102", "invalid item len"); |
282 | 284 | ||
283 | printk("%d pointers\n[ ", (int)I_UNFM_NUM(ih)); | 285 | printk("%d pointers\n[ ", (int)I_UNFM_NUM(ih)); |
284 | for (j = 0; j < I_UNFM_NUM(ih); j++) { | 286 | for (j = 0; j < I_UNFM_NUM(ih); j++) { |
@@ -334,7 +336,8 @@ static int indirect_unit_num(struct virtual_item *vi) | |||
334 | 336 | ||
335 | static void indirect_print_vi(struct virtual_item *vi) | 337 | static void indirect_print_vi(struct virtual_item *vi) |
336 | { | 338 | { |
337 | reiserfs_warning(NULL, "INDIRECT, index %d, type 0x%x, %h", | 339 | reiserfs_warning(NULL, "reiserfs-16103", |
340 | "INDIRECT, index %d, type 0x%x, %h", | ||
338 | vi->vi_index, vi->vi_type, vi->vi_ih); | 341 | vi->vi_index, vi->vi_type, vi->vi_ih); |
339 | } | 342 | } |
340 | 343 | ||
@@ -359,7 +362,7 @@ static struct item_operations indirect_ops = { | |||
359 | 362 | ||
360 | static int direntry_bytes_number(struct item_head *ih, int block_size) | 363 | static int direntry_bytes_number(struct item_head *ih, int block_size) |
361 | { | 364 | { |
362 | reiserfs_warning(NULL, "vs-16090: direntry_bytes_number: " | 365 | reiserfs_warning(NULL, "vs-16090", |
363 | "bytes number is asked for direntry"); | 366 | "bytes number is asked for direntry"); |
364 | return 0; | 367 | return 0; |
365 | } | 368 | } |
@@ -514,8 +517,9 @@ static int direntry_create_vi(struct virtual_node *vn, | |||
514 | ((is_affected | 517 | ((is_affected |
515 | && (vn->vn_mode == M_PASTE | 518 | && (vn->vn_mode == M_PASTE |
516 | || vn->vn_mode == M_CUT)) ? insert_size : 0)) { | 519 | || vn->vn_mode == M_CUT)) ? insert_size : 0)) { |
517 | reiserfs_panic(NULL, | 520 | reiserfs_panic(NULL, "vs-8025", "(mode==%c, " |
518 | "vs-8025: set_entry_sizes: (mode==%c, insert_size==%d), invalid length of directory item", | 521 | "insert_size==%d), invalid length of " |
522 | "directory item", | ||
519 | vn->vn_mode, insert_size); | 523 | vn->vn_mode, insert_size); |
520 | } | 524 | } |
521 | } | 525 | } |
@@ -546,7 +550,8 @@ static int direntry_check_left(struct virtual_item *vi, int free, | |||
546 | } | 550 | } |
547 | 551 | ||
548 | if (entries == dir_u->entry_count) { | 552 | if (entries == dir_u->entry_count) { |
549 | reiserfs_panic(NULL, "free space %d, entry_count %d\n", free, | 553 | reiserfs_panic(NULL, "item_ops-1", |
554 | "free space %d, entry_count %d", free, | ||
550 | dir_u->entry_count); | 555 | dir_u->entry_count); |
551 | } | 556 | } |
552 | 557 | ||
@@ -614,7 +619,8 @@ static void direntry_print_vi(struct virtual_item *vi) | |||
614 | int i; | 619 | int i; |
615 | struct direntry_uarea *dir_u = vi->vi_uarea; | 620 | struct direntry_uarea *dir_u = vi->vi_uarea; |
616 | 621 | ||
617 | reiserfs_warning(NULL, "DIRENTRY, index %d, type 0x%x, %h, flags 0x%x", | 622 | reiserfs_warning(NULL, "reiserfs-16104", |
623 | "DIRENTRY, index %d, type 0x%x, %h, flags 0x%x", | ||
618 | vi->vi_index, vi->vi_type, vi->vi_ih, dir_u->flags); | 624 | vi->vi_index, vi->vi_type, vi->vi_ih, dir_u->flags); |
619 | printk("%d entries: ", dir_u->entry_count); | 625 | printk("%d entries: ", dir_u->entry_count); |
620 | for (i = 0; i < dir_u->entry_count; i++) | 626 | for (i = 0; i < dir_u->entry_count; i++) |
@@ -642,43 +648,43 @@ static struct item_operations direntry_ops = { | |||
642 | // | 648 | // |
643 | static int errcatch_bytes_number(struct item_head *ih, int block_size) | 649 | static int errcatch_bytes_number(struct item_head *ih, int block_size) |
644 | { | 650 | { |
645 | reiserfs_warning(NULL, | 651 | reiserfs_warning(NULL, "green-16001", |
646 | "green-16001: Invalid item type observed, run fsck ASAP"); | 652 | "Invalid item type observed, run fsck ASAP"); |
647 | return 0; | 653 | return 0; |
648 | } | 654 | } |
649 | 655 | ||
650 | static void errcatch_decrement_key(struct cpu_key *key) | 656 | static void errcatch_decrement_key(struct cpu_key *key) |
651 | { | 657 | { |
652 | reiserfs_warning(NULL, | 658 | reiserfs_warning(NULL, "green-16002", |
653 | "green-16002: Invalid item type observed, run fsck ASAP"); | 659 | "Invalid item type observed, run fsck ASAP"); |
654 | } | 660 | } |
655 | 661 | ||
656 | static int errcatch_is_left_mergeable(struct reiserfs_key *key, | 662 | static int errcatch_is_left_mergeable(struct reiserfs_key *key, |
657 | unsigned long bsize) | 663 | unsigned long bsize) |
658 | { | 664 | { |
659 | reiserfs_warning(NULL, | 665 | reiserfs_warning(NULL, "green-16003", |
660 | "green-16003: Invalid item type observed, run fsck ASAP"); | 666 | "Invalid item type observed, run fsck ASAP"); |
661 | return 0; | 667 | return 0; |
662 | } | 668 | } |
663 | 669 | ||
664 | static void errcatch_print_item(struct item_head *ih, char *item) | 670 | static void errcatch_print_item(struct item_head *ih, char *item) |
665 | { | 671 | { |
666 | reiserfs_warning(NULL, | 672 | reiserfs_warning(NULL, "green-16004", |
667 | "green-16004: Invalid item type observed, run fsck ASAP"); | 673 | "Invalid item type observed, run fsck ASAP"); |
668 | } | 674 | } |
669 | 675 | ||
670 | static void errcatch_check_item(struct item_head *ih, char *item) | 676 | static void errcatch_check_item(struct item_head *ih, char *item) |
671 | { | 677 | { |
672 | reiserfs_warning(NULL, | 678 | reiserfs_warning(NULL, "green-16005", |
673 | "green-16005: Invalid item type observed, run fsck ASAP"); | 679 | "Invalid item type observed, run fsck ASAP"); |
674 | } | 680 | } |
675 | 681 | ||
676 | static int errcatch_create_vi(struct virtual_node *vn, | 682 | static int errcatch_create_vi(struct virtual_node *vn, |
677 | struct virtual_item *vi, | 683 | struct virtual_item *vi, |
678 | int is_affected, int insert_size) | 684 | int is_affected, int insert_size) |
679 | { | 685 | { |
680 | reiserfs_warning(NULL, | 686 | reiserfs_warning(NULL, "green-16006", |
681 | "green-16006: Invalid item type observed, run fsck ASAP"); | 687 | "Invalid item type observed, run fsck ASAP"); |
682 | return 0; // We might return -1 here as well, but it won't help as create_virtual_node() from where | 688 | return 0; // We might return -1 here as well, but it won't help as create_virtual_node() from where |
683 | // this operation is called from is of return type void. | 689 | // this operation is called from is of return type void. |
684 | } | 690 | } |
@@ -686,36 +692,36 @@ static int errcatch_create_vi(struct virtual_node *vn, | |||
686 | static int errcatch_check_left(struct virtual_item *vi, int free, | 692 | static int errcatch_check_left(struct virtual_item *vi, int free, |
687 | int start_skip, int end_skip) | 693 | int start_skip, int end_skip) |
688 | { | 694 | { |
689 | reiserfs_warning(NULL, | 695 | reiserfs_warning(NULL, "green-16007", |
690 | "green-16007: Invalid item type observed, run fsck ASAP"); | 696 | "Invalid item type observed, run fsck ASAP"); |
691 | return -1; | 697 | return -1; |
692 | } | 698 | } |
693 | 699 | ||
694 | static int errcatch_check_right(struct virtual_item *vi, int free) | 700 | static int errcatch_check_right(struct virtual_item *vi, int free) |
695 | { | 701 | { |
696 | reiserfs_warning(NULL, | 702 | reiserfs_warning(NULL, "green-16008", |
697 | "green-16008: Invalid item type observed, run fsck ASAP"); | 703 | "Invalid item type observed, run fsck ASAP"); |
698 | return -1; | 704 | return -1; |
699 | } | 705 | } |
700 | 706 | ||
701 | static int errcatch_part_size(struct virtual_item *vi, int first, int count) | 707 | static int errcatch_part_size(struct virtual_item *vi, int first, int count) |
702 | { | 708 | { |
703 | reiserfs_warning(NULL, | 709 | reiserfs_warning(NULL, "green-16009", |
704 | "green-16009: Invalid item type observed, run fsck ASAP"); | 710 | "Invalid item type observed, run fsck ASAP"); |
705 | return 0; | 711 | return 0; |
706 | } | 712 | } |
707 | 713 | ||
708 | static int errcatch_unit_num(struct virtual_item *vi) | 714 | static int errcatch_unit_num(struct virtual_item *vi) |
709 | { | 715 | { |
710 | reiserfs_warning(NULL, | 716 | reiserfs_warning(NULL, "green-16010", |
711 | "green-16010: Invalid item type observed, run fsck ASAP"); | 717 | "Invalid item type observed, run fsck ASAP"); |
712 | return 0; | 718 | return 0; |
713 | } | 719 | } |
714 | 720 | ||
715 | static void errcatch_print_vi(struct virtual_item *vi) | 721 | static void errcatch_print_vi(struct virtual_item *vi) |
716 | { | 722 | { |
717 | reiserfs_warning(NULL, | 723 | reiserfs_warning(NULL, "green-16011", |
718 | "green-16011: Invalid item type observed, run fsck ASAP"); | 724 | "Invalid item type observed, run fsck ASAP"); |
719 | } | 725 | } |
720 | 726 | ||
721 | static struct item_operations errcatch_ops = { | 727 | static struct item_operations errcatch_ops = { |