From: zab Date: Tue, 20 Jul 2004 18:32:59 +0000 (+0000) Subject: - land b1_4_smallfix on b1_4 (20040720_1122) X-Git-Tag: v1_7_110~2^11~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=fc84b4a4bb0b5c032e59c4db131fd0ff4dd8ec54;p=fs%2Flustre-release.git - land b1_4_smallfix on b1_4 (20040720_1122) --- diff --git a/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch b/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch index 99a5a6d..739c915 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch @@ -1,8 +1,8 @@ -Index: linux-2.4.24-mb34/fs/ext3/extents.c +Index: linux-2.4.24/fs/ext3/extents.c =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/extents.c 1969-12-31 16:00:00.000000000 -0800 -+++ linux-2.4.24-mb34/fs/ext3/extents.c 2004-05-05 14:27:07.000000000 -0700 -@@ -0,0 +1,2346 @@ +--- linux-2.4.24.orig/fs/ext3/extents.c 2004-05-18 12:34:48.000000000 -0700 ++++ linux-2.4.24/fs/ext3/extents.c 2004-05-18 12:43:40.000000000 -0700 +@@ -0,0 +1,2354 @@ +/* + * Copyright (C) 2003 Alex Tomas + * @@ -411,6 +411,7 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + eh->e_magic = EXT3_EXT_MAGIC; + eh->e_max = ext3_ext_space_root(tree); + ext3_ext_mark_root_dirty(handle, tree); ++ ext3_ext_invalidate_cache(tree); + return 0; +} + @@ -741,10 +742,11 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + + if (err) { + /* free all allocated blocks in error case */ -+ for (i = 0; i < depth; i++) ++ for (i = 0; i < depth; i++) { + if (!ablocks[i]) + continue; + ext3_free_blocks(handle, tree->inode, ablocks[i], 1); ++ } + } + kfree(ablocks); + @@ -1172,6 +1174,7 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + kfree(npath); + } + ext3_ext_tree_changed(tree); ++ ext3_ext_invalidate_cache(tree); + return err; +} + @@ -1761,6 +1764,7 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + err = ext3_ext_get_access(handle, tree, path); + if (err == 0) { + EXT_ROOT_HDR(tree)->e_depth = 0; ++ EXT_ROOT_HDR(tree)->e_max = ext3_ext_space_root(tree); + err = ext3_ext_dirty(handle, tree, path); + } + } @@ -1832,7 +1836,7 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + int needed; + + /* at present, extent can't cross block group */; -+ needed = 3; /* bitmap + group desc + sb */ ++ needed = 4; /* bitmap + group desc + sb + inode */ + +#ifdef CONFIG_QUOTA + needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; @@ -2063,10 +2067,14 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c + + /* check in cache */ + if (ext3_ext_in_cache(&tree, iblock, &newex)) { -+ if (newex.e_start == 0xffffffff && !create) { -+ /* block isn't allocated yet and -+ * user don't want to allocate it */ -+ goto out2; ++ if (newex.e_start == 0xffffffff) { ++ /* this is cached gap */ ++ if (!create) { ++ /* block isn't allocated yet and ++ * user don't want to allocate it */ ++ goto out2; ++ } ++ /* we should allocate requested block */ + } else if (newex.e_start) { + /* block is already allocated */ + newblock = iblock - newex.e_block + newex.e_start; @@ -2349,10 +2357,10 @@ Index: linux-2.4.24-mb34/fs/ext3/extents.c +EXPORT_SYMBOL(ext3_ext_find_goal); +EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert); + -Index: linux-2.4.24-mb34/fs/ext3/ialloc.c +Index: linux-2.4.24/fs/ext3/ialloc.c =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/ialloc.c 2004-05-05 13:47:40.000000000 -0700 -+++ linux-2.4.24-mb34/fs/ext3/ialloc.c 2004-05-05 13:51:27.000000000 -0700 +--- linux-2.4.24.orig/fs/ext3/ialloc.c 2004-05-18 12:33:55.000000000 -0700 ++++ linux-2.4.24/fs/ext3/ialloc.c 2004-05-18 12:34:48.000000000 -0700 @@ -592,10 +592,14 @@ iloc.bh = NULL; goto fail; @@ -2370,10 +2378,10 @@ Index: linux-2.4.24-mb34/fs/ext3/ialloc.c unlock_super (sb); if(DQUOT_ALLOC_INODE(inode)) { -Index: linux-2.4.24-mb34/fs/ext3/inode.c +Index: linux-2.4.24/fs/ext3/inode.c =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/inode.c 2004-05-05 13:47:41.000000000 -0700 -+++ linux-2.4.24-mb34/fs/ext3/inode.c 2004-05-05 13:49:40.000000000 -0700 +--- linux-2.4.24.orig/fs/ext3/inode.c 2004-05-18 12:33:56.000000000 -0700 ++++ linux-2.4.24/fs/ext3/inode.c 2004-05-18 12:34:48.000000000 -0700 @@ -848,6 +848,15 @@ goto reread; } @@ -2455,10 +2463,10 @@ Index: linux-2.4.24-mb34/fs/ext3/inode.c if (rc) { printk(KERN_INFO "ext3_map_inode_page: error %d " "allocating block %ld\n", rc, iblock); -Index: linux-2.4.24-mb34/fs/ext3/Makefile +Index: linux-2.4.24/fs/ext3/Makefile =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/Makefile 2004-05-05 13:47:40.000000000 -0700 -+++ linux-2.4.24-mb34/fs/ext3/Makefile 2004-05-05 13:49:40.000000000 -0700 +--- linux-2.4.24.orig/fs/ext3/Makefile 2004-05-18 12:33:55.000000000 -0700 ++++ linux-2.4.24/fs/ext3/Makefile 2004-05-18 12:43:00.000000000 -0700 @@ -13,7 +13,9 @@ obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ @@ -2470,10 +2478,10 @@ Index: linux-2.4.24-mb34/fs/ext3/Makefile obj-m := $(O_TARGET) export-objs += xattr.o -Index: linux-2.4.24-mb34/fs/ext3/super.c +Index: linux-2.4.24/fs/ext3/super.c =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/super.c 2004-05-05 13:47:40.000000000 -0700 -+++ linux-2.4.24-mb34/fs/ext3/super.c 2004-05-05 13:49:40.000000000 -0700 +--- linux-2.4.24.orig/fs/ext3/super.c 2004-05-18 12:33:55.000000000 -0700 ++++ linux-2.4.24/fs/ext3/super.c 2004-05-18 12:34:48.000000000 -0700 @@ -530,6 +530,7 @@ int i; @@ -2502,10 +2510,10 @@ Index: linux-2.4.24-mb34/fs/ext3/super.c return sb; failed_mount3: -Index: linux-2.4.24-mb34/fs/ext3/ioctl.c +Index: linux-2.4.24/fs/ext3/ioctl.c =================================================================== ---- linux-2.4.24-mb34.orig/fs/ext3/ioctl.c 2004-05-05 13:47:38.000000000 -0700 -+++ linux-2.4.24-mb34/fs/ext3/ioctl.c 2004-05-05 13:49:40.000000000 -0700 +--- linux-2.4.24.orig/fs/ext3/ioctl.c 2004-05-18 12:33:53.000000000 -0700 ++++ linux-2.4.24/fs/ext3/ioctl.c 2004-05-18 12:34:48.000000000 -0700 @@ -174,6 +174,10 @@ return ret; } @@ -2517,10 +2525,10 @@ Index: linux-2.4.24-mb34/fs/ext3/ioctl.c default: return -ENOTTY; } -Index: linux-2.4.24-mb34/include/linux/ext3_fs.h +Index: linux-2.4.24/include/linux/ext3_fs.h =================================================================== ---- linux-2.4.24-mb34.orig/include/linux/ext3_fs.h 2004-05-05 13:47:40.000000000 -0700 -+++ linux-2.4.24-mb34/include/linux/ext3_fs.h 2004-05-05 13:49:40.000000000 -0700 +--- linux-2.4.24.orig/include/linux/ext3_fs.h 2004-05-18 12:33:55.000000000 -0700 ++++ linux-2.4.24/include/linux/ext3_fs.h 2004-05-18 12:43:00.000000000 -0700 @@ -184,6 +184,7 @@ #define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */ #define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */ @@ -2571,10 +2579,10 @@ Index: linux-2.4.24-mb34/include/linux/ext3_fs.h #endif /* __KERNEL__ */ -Index: linux-2.4.24-mb34/include/linux/ext3_extents.h +Index: linux-2.4.24/include/linux/ext3_extents.h =================================================================== ---- linux-2.4.24-mb34.orig/include/linux/ext3_extents.h 1969-12-31 16:00:00.000000000 -0800 -+++ linux-2.4.24-mb34/include/linux/ext3_extents.h 2004-05-05 14:27:50.000000000 -0700 +--- linux-2.4.24.orig/include/linux/ext3_extents.h 2004-05-18 12:34:48.000000000 -0700 ++++ linux-2.4.24/include/linux/ext3_extents.h 2004-05-18 12:34:48.000000000 -0700 @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2003 Alex Tomas @@ -2795,10 +2803,10 @@ Index: linux-2.4.24-mb34/include/linux/ext3_extents.h +void ext3_ext_invalidate_cache(struct ext3_extents_tree *tree); + +#endif /* _LINUX_EXT3_EXTENTS */ -Index: linux-2.4.24-mb34/include/linux/ext3_fs_i.h +Index: linux-2.4.24/include/linux/ext3_fs_i.h =================================================================== ---- linux-2.4.24-mb34.orig/include/linux/ext3_fs_i.h 2004-05-05 13:47:40.000000000 -0700 -+++ linux-2.4.24-mb34/include/linux/ext3_fs_i.h 2004-05-05 13:53:43.000000000 -0700 +--- linux-2.4.24.orig/include/linux/ext3_fs_i.h 2004-05-18 12:33:55.000000000 -0700 ++++ linux-2.4.24/include/linux/ext3_fs_i.h 2004-05-18 12:34:48.000000000 -0700 @@ -76,6 +76,8 @@ * by other means, so we have truncate_sem. */