From f81921b8bb0ede78a106d327c65f38442599ec44 Mon Sep 17 00:00:00 2001 From: wangdi Date: Wed, 4 Jun 2003 03:01:16 +0000 Subject: [PATCH] add ext3-2.4-ino_t-2.4.19.patch --- .../patches/ext3-2.4-ino_t-2.4.19.patch | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 lustre/kernel_patches/patches/ext3-2.4-ino_t-2.4.19.patch diff --git a/lustre/kernel_patches/patches/ext3-2.4-ino_t-2.4.19.patch b/lustre/kernel_patches/patches/ext3-2.4-ino_t-2.4.19.patch new file mode 100644 index 0000000..e86da61 --- /dev/null +++ b/lustre/kernel_patches/patches/ext3-2.4-ino_t-2.4.19.patch @@ -0,0 +1,137 @@ + 0 files changed + +--- linux/fs/ext3/ialloc.c~ext3-2.4-ino_t-2.4.19 2003-06-04 18:02:30.000000000 +0800 ++++ linux-root/fs/ext3/ialloc.c 2003-06-04 18:14:45.000000000 +0800 +@@ -65,8 +65,8 @@ static int read_inode_bitmap (struct sup + if (!bh) { + ext3_error (sb, "read_inode_bitmap", + "Cannot read inode bitmap - " +- "block_group = %lu, inode_bitmap = %lu", +- block_group, (unsigned long) gdp->bg_inode_bitmap); ++ "block_group = %lu, inode_bitmap = %u", ++ block_group, gdp->bg_inode_bitmap); + retval = -EIO; + } + /* +@@ -532,19 +532,19 @@ fail: + } + + /* Verify that we are loading a valid orphan from disk */ +-struct inode *ext3_orphan_get (struct super_block * sb, ino_t ino) ++struct inode *ext3_orphan_get(struct super_block *sb, unsigned long ino) + { +- ino_t max_ino = le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count); ++ unsigned long max_ino = le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count); + unsigned long block_group; + int bit; + int bitmap_nr; + struct buffer_head *bh; + struct inode *inode = NULL; +- ++ + /* Error cases - e2fsck has already cleaned up for us */ + if (ino > max_ino) { + ext3_warning(sb, __FUNCTION__, +- "bad orphan ino %ld! e2fsck was run?\n", ino); ++ "bad orphan ino %lu! e2fsck was run?\n", ino); + return NULL; + } + +@@ -553,7 +553,7 @@ struct inode *ext3_orphan_get (struct su + if ((bitmap_nr = load_inode_bitmap(sb, block_group)) < 0 || + !(bh = EXT3_SB(sb)->s_inode_bitmap[bitmap_nr])) { + ext3_warning(sb, __FUNCTION__, +- "inode bitmap error for orphan %ld\n", ino); ++ "inode bitmap error for orphan %lu\n", ino); + return NULL; + } + +@@ -564,16 +564,16 @@ struct inode *ext3_orphan_get (struct su + if (!ext3_test_bit(bit, bh->b_data) || !(inode = iget(sb, ino)) || + is_bad_inode(inode) || NEXT_ORPHAN(inode) > max_ino) { + ext3_warning(sb, __FUNCTION__, +- "bad orphan inode %ld! e2fsck was run?\n", ino); ++ "bad orphan inode %lu! e2fsck was run?\n", ino); + printk(KERN_NOTICE "ext3_test_bit(bit=%d, block=%ld) = %d\n", + bit, bh->b_blocknr, ext3_test_bit(bit, bh->b_data)); + printk(KERN_NOTICE "inode=%p\n", inode); + if (inode) { + printk(KERN_NOTICE "is_bad_inode(inode)=%d\n", + is_bad_inode(inode)); +- printk(KERN_NOTICE "NEXT_ORPHAN(inode)=%d\n", ++ printk(KERN_NOTICE "NEXT_ORPHAN(inode)=%u\n", + NEXT_ORPHAN(inode)); +- printk(KERN_NOTICE "max_ino=%ld\n", max_ino); ++ printk(KERN_NOTICE "max_ino=%lu\n", max_ino); + } + /* Avoid freeing blocks if we got a bad deleted inode */ + if (inode && inode->i_nlink == 0) +--- linux/fs/ext3/namei.c~ext3-2.4-ino_t-2.4.19 2003-06-04 18:06:06.000000000 +0800 ++++ linux-root/fs/ext3/namei.c 2003-06-04 18:16:42.000000000 +0800 +@@ -1810,7 +1810,7 @@ int ext3_orphan_del(handle_t *handle, st + struct list_head *prev; + struct ext3_inode_info *ei = EXT3_I(inode); + struct ext3_sb_info *sbi = EXT3_SB(inode->i_sb); +- ino_t ino_next; ++ unsigned long ino_next; + struct ext3_iloc iloc; + int err = 0; + +@@ -1823,7 +1823,7 @@ int ext3_orphan_del(handle_t *handle, st + ino_next = NEXT_ORPHAN(inode); + prev = ei->i_orphan.prev; + +- jbd_debug(4, "remove inode %ld from orphan list\n", inode->i_ino); ++ jbd_debug(4, "remove inode %lu from orphan list\n", inode->i_ino); + + list_del(&ei->i_orphan); + INIT_LIST_HEAD(&ei->i_orphan); +@@ -1834,13 +1834,13 @@ int ext3_orphan_del(handle_t *handle, st + * list in memory. */ + if (!handle) + goto out; +- ++ + err = ext3_reserve_inode_write(handle, inode, &iloc); + if (err) + goto out_err; + + if (prev == &sbi->s_orphan) { +- jbd_debug(4, "superblock will point to %ld\n", ino_next); ++ jbd_debug(4, "superblock will point to %lu\n", ino_next); + BUFFER_TRACE(sbi->s_sbh, "get_write_access"); + err = ext3_journal_get_write_access(handle, sbi->s_sbh); + if (err) +@@ -1851,8 +1851,8 @@ int ext3_orphan_del(handle_t *handle, st + struct ext3_iloc iloc2; + struct inode *i_prev = + list_entry(prev, struct inode, u.ext3_i.i_orphan); +- +- jbd_debug(4, "orphan inode %ld will point to %ld\n", ++ ++ jbd_debug(4, "orphan inode %lu will point to %lu\n", + i_prev->i_ino, ino_next); + err = ext3_reserve_inode_write(handle, i_prev, &iloc2); + if (err) +@@ -1867,7 +1867,7 @@ int ext3_orphan_del(handle_t *handle, st + if (err) + goto out_brelse; + +-out_err: ++out_err: + ext3_std_error(inode->i_sb, err); + out: + up(&sbi->s_orphan_lock); +--- linux/include/linux/ext3_fs.h~ext3-2.4-ino_t-2.4.19 2003-06-04 18:13:20.000000000 +0800 ++++ linux-root/include/linux/ext3_fs.h 2003-06-04 18:14:45.000000000 +0800 +@@ -675,7 +675,7 @@ extern int ext3fs_dirhash(const char *na + /* ialloc.c */ + extern struct inode * ext3_new_inode (handle_t *, const struct inode *, int); + extern void ext3_free_inode (handle_t *, struct inode *); +-extern struct inode * ext3_orphan_get (struct super_block *, ino_t); ++extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); + extern unsigned long ext3_count_free_inodes (struct super_block *); + extern void ext3_check_inodes_bitmap (struct super_block *); + extern unsigned long ext3_count_free (struct buffer_head *, unsigned); + +_ -- 1.8.3.1