Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-2.4-ino_t.patch
1  fs/ext3/ialloc.c        |   20 ++++++++++----------
2  fs/ext3/namei.c         |   16 ++++++++--------
3  include/linux/ext3_fs.h |    2 +-
4  3 files changed, 19 insertions(+), 19 deletions(-)
5
6 --- linux-2.4.20/fs/ext3/ialloc.c~ext3-2.4-ino_t        2003-04-08 23:35:24.000000000 -0600
7 +++ linux-2.4.20-braam/fs/ext3/ialloc.c 2003-04-08 23:35:24.000000000 -0600
8 @@ -65,8 +65,8 @@ static int read_inode_bitmap (struct sup
9         if (!bh) {
10                 ext3_error (sb, "read_inode_bitmap",
11                             "Cannot read inode bitmap - "
12 -                           "block_group = %lu, inode_bitmap = %lu",
13 -                           block_group, (unsigned long) gdp->bg_inode_bitmap);
14 +                           "block_group = %lu, inode_bitmap = %u",
15 +                           block_group, gdp->bg_inode_bitmap);
16                 retval = -EIO;
17         }
18         /*
19 @@ -533,19 +533,19 @@ out:
20  }
21  
22  /* Verify that we are loading a valid orphan from disk */
23 -struct inode *ext3_orphan_get (struct super_block * sb, ino_t ino)
24 +struct inode *ext3_orphan_get(struct super_block *sb, unsigned long ino)
25  {
26 -       ino_t max_ino = le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count);
27 +       unsigned long max_ino = le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count);
28         unsigned long block_group;
29         int bit;
30         int bitmap_nr;
31         struct buffer_head *bh;
32         struct inode *inode = NULL;
33 -       
34 +
35         /* Error cases - e2fsck has already cleaned up for us */
36         if (ino > max_ino) {
37                 ext3_warning(sb, __FUNCTION__,
38 -                            "bad orphan ino %ld!  e2fsck was run?\n", ino);
39 +                            "bad orphan ino %lu!  e2fsck was run?\n", ino);
40                 return NULL;
41         }
42  
43 @@ -554,7 +554,7 @@ struct inode *ext3_orphan_get (struct su
44         if ((bitmap_nr = load_inode_bitmap(sb, block_group)) < 0 ||
45             !(bh = EXT3_SB(sb)->s_inode_bitmap[bitmap_nr])) {
46                 ext3_warning(sb, __FUNCTION__,
47 -                            "inode bitmap error for orphan %ld\n", ino);
48 +                            "inode bitmap error for orphan %lu\n", ino);
49                 return NULL;
50         }
51  
52 @@ -565,16 +565,16 @@ struct inode *ext3_orphan_get (struct su
53         if (!ext3_test_bit(bit, bh->b_data) || !(inode = iget(sb, ino)) ||
54             is_bad_inode(inode) || NEXT_ORPHAN(inode) > max_ino) {
55                 ext3_warning(sb, __FUNCTION__,
56 -                            "bad orphan inode %ld!  e2fsck was run?\n", ino);
57 +                            "bad orphan inode %lu!  e2fsck was run?\n", ino);
58                 printk(KERN_NOTICE "ext3_test_bit(bit=%d, block=%ld) = %d\n",
59                        bit, bh->b_blocknr, ext3_test_bit(bit, bh->b_data));
60                 printk(KERN_NOTICE "inode=%p\n", inode);
61                 if (inode) {
62                         printk(KERN_NOTICE "is_bad_inode(inode)=%d\n",
63                                is_bad_inode(inode));
64 -                       printk(KERN_NOTICE "NEXT_ORPHAN(inode)=%d\n",
65 +                       printk(KERN_NOTICE "NEXT_ORPHAN(inode)=%u\n",
66                                NEXT_ORPHAN(inode));
67 -                       printk(KERN_NOTICE "max_ino=%ld\n", max_ino);
68 +                       printk(KERN_NOTICE "max_ino=%lu\n", max_ino);
69                 }
70                 /* Avoid freeing blocks if we got a bad deleted inode */
71                 if (inode && inode->i_nlink == 0)
72 --- linux-2.4.20/fs/ext3/namei.c~ext3-2.4-ino_t 2003-04-08 23:35:24.000000000 -0600
73 +++ linux-2.4.20-braam/fs/ext3/namei.c  2003-04-08 23:35:24.000000000 -0600
74 @@ -1808,10 +1808,10 @@ int ext3_orphan_del(handle_t *handle, st
75         struct list_head *prev;
76         struct ext3_inode_info *ei = EXT3_I(inode);
77         struct ext3_sb_info *sbi;
78 -       ino_t ino_next; 
79 +       unsigned long ino_next;
80         struct ext3_iloc iloc;
81         int err = 0;
82 -       
83 +
84         lock_super(inode->i_sb);
85         if (list_empty(&ei->i_orphan)) {
86                 unlock_super(inode->i_sb);
87 @@ -1822,7 +1822,7 @@ int ext3_orphan_del(handle_t *handle, st
88         prev = ei->i_orphan.prev;
89         sbi = EXT3_SB(inode->i_sb);
90  
91 -       jbd_debug(4, "remove inode %ld from orphan list\n", inode->i_ino);
92 +       jbd_debug(4, "remove inode %lu from orphan list\n", inode->i_ino);
93  
94         list_del(&ei->i_orphan);
95         INIT_LIST_HEAD(&ei->i_orphan);
96 @@ -1833,13 +1833,13 @@ int ext3_orphan_del(handle_t *handle, st
97          * list in memory. */
98         if (!handle)
99                 goto out;
100 -       
101 +
102         err = ext3_reserve_inode_write(handle, inode, &iloc);
103         if (err)
104                 goto out_err;
105  
106         if (prev == &sbi->s_orphan) {
107 -               jbd_debug(4, "superblock will point to %ld\n", ino_next);
108 +               jbd_debug(4, "superblock will point to %lu\n", ino_next);
109                 BUFFER_TRACE(sbi->s_sbh, "get_write_access");
110                 err = ext3_journal_get_write_access(handle, sbi->s_sbh);
111                 if (err)
112 @@ -1850,8 +1850,8 @@ int ext3_orphan_del(handle_t *handle, st
113                 struct ext3_iloc iloc2;
114                 struct inode *i_prev =
115                         list_entry(prev, struct inode, u.ext3_i.i_orphan);
116 -               
117 -               jbd_debug(4, "orphan inode %ld will point to %ld\n",
118 +
119 +               jbd_debug(4, "orphan inode %lu will point to %lu\n",
120                           i_prev->i_ino, ino_next);
121                 err = ext3_reserve_inode_write(handle, i_prev, &iloc2);
122                 if (err)
123 @@ -1866,7 +1866,7 @@ int ext3_orphan_del(handle_t *handle, st
124         if (err)
125                 goto out_brelse;
126  
127 -out_err:       
128 +out_err: 
129         ext3_std_error(inode->i_sb, err);
130  out:
131         unlock_super(inode->i_sb);
132 --- linux-2.4.20/include/linux/ext3_fs.h~ext3-2.4-ino_t 2003-04-08 23:35:24.000000000 -0600
133 +++ linux-2.4.20-braam/include/linux/ext3_fs.h  2003-04-08 23:35:24.000000000 -0600
134 @@ -673,7 +673,7 @@ extern int ext3fs_dirhash(const char *na
135  /* ialloc.c */
136  extern struct inode * ext3_new_inode (handle_t *, const struct inode *, int);
137  extern void ext3_free_inode (handle_t *, struct inode *);
138 -extern struct inode * ext3_orphan_get (struct super_block *, ino_t);
139 +extern struct inode * ext3_orphan_get (struct super_block *, unsigned long);
140  extern unsigned long ext3_count_free_inodes (struct super_block *);
141  extern void ext3_check_inodes_bitmap (struct super_block *);
142  extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
143
144 _