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