Skip to content
Snippets Groups Projects
Commit 3a6ac81b authored by alex's avatar alex
Browse files

- port of extents for 2.4.21-suse2 series

- bug in extents fixed: it could cause tree corruption
- minor bug in extents fixed: during tree growing it could possible
  to get suboptimal size for index block
parent f0e156a8
No related branches found
No related tags found
No related merge requests found
Index: linux-2.4.20/fs/ext3/extents.c
Index: linux-2.4.24/fs/ext3/extents.c
===================================================================
--- linux-2.4.20.orig/fs/ext3/extents.c 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.20/fs/ext3/extents.c 2004-01-24 14:19:29.000000000 +0300
@@ -0,0 +1,2224 @@
--- linux-2.4.24.orig/fs/ext3/extents.c 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.24/fs/ext3/extents.c 2004-01-26 20:52:25.000000000 +0300
@@ -0,0 +1,2260 @@
+/*
+ * Copyright (C) 2003 Alex Tomas <alex@clusterfs.com>
+ *
......@@ -268,6 +268,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ struct ext3_extent_idx *ix;
+ int l = 0, k, r;
+
+ EXT_ASSERT(eh->e_magic == EXT3_EXT_MAGIC);
+ EXT_ASSERT(eh->e_num <= eh->e_max);
+ EXT_ASSERT(eh->e_num > 0);
+
......@@ -303,6 +304,12 @@ Index: linux-2.4.20/fs/ext3/extents.c
+
+ chix = ix = EXT_FIRST_INDEX(eh);
+ for (k = 0; k < eh->e_num; k++, ix++) {
+ if (k != 0 && ix->e_block <= ix[-1].e_block) {
+ printk("k=%d, ix=0x%p, first=0x%p\n", k,
+ ix, EXT_FIRST_INDEX(eh));
+ printk("%u <= %u\n",
+ ix->e_block,ix[-1].e_block);
+ }
+ EXT_ASSERT(k == 0 || ix->e_block > ix[-1].e_block);
+ if (block < ix->e_block)
+ break;
......@@ -325,6 +332,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ struct ext3_extent *ex;
+ int l = 0, k, r;
+
+ EXT_ASSERT(eh->e_magic == EXT3_EXT_MAGIC);
+ EXT_ASSERT(eh->e_num <= eh->e_max);
+
+ if (eh->e_num == 0) {
......@@ -388,6 +396,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ eh = EXT_ROOT_HDR(tree);
+ eh->e_depth = 0;
+ eh->e_num = 0;
+ eh->e_magic = EXT3_EXT_MAGIC;
+ eh->e_max = ext3_ext_space_root(tree);
+ ext3_ext_mark_root_dirty(handle, tree);
+ return 0;
......@@ -408,6 +417,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ eh = EXT_ROOT_HDR(tree);
+ i = depth = EXT_DEPTH(tree);
+ EXT_ASSERT(eh->e_max);
+ EXT_ASSERT(eh->e_magic == EXT3_EXT_MAGIC);
+ EXT_ASSERT(i == 0 || eh->e_num > 0);
+
+ /* account possible depth increase */
......@@ -500,6 +510,9 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ ix->e_leaf = ptr;
+ curp->p_hdr->e_num++;
+
+ EXT_ASSERT(curp->p_hdr->e_num <= curp->p_hdr->e_max);
+ EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
+
+ err = ext3_ext_dirty(handle, tree, curp);
+ ext3_std_error(tree->inode->i_sb, err);
+
......@@ -534,7 +547,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+
+ /* if current leaf will be splitted, then we should use
+ * border from split point */
+
+ EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
+ if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
+ border = path[depth].p_ext[1].e_block;
+ ext_debug(tree, "leaf will be splitted."
......@@ -589,6 +602,8 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ neh = EXT_BLOCK_HDR(bh);
+ neh->e_num = 0;
+ neh->e_max = ext3_ext_space_block(tree);
+ neh->e_magic = EXT3_EXT_MAGIC;
+ neh->e_depth = 0;
+ ex = EXT_FIRST_EXTENT(neh);
+
+ /* move remain of path[depth] to the new leaf */
......@@ -649,33 +664,33 @@ Index: linux-2.4.20/fs/ext3/extents.c
+
+ neh = EXT_BLOCK_HDR(bh);
+ neh->e_num = 1;
+ neh->e_magic = EXT3_EXT_MAGIC;
+ neh->e_max = ext3_ext_space_block_idx(tree);
+ neh->e_depth = depth - i;
+ fidx = EXT_FIRST_INDEX(neh);
+ fidx->e_block = border;
+ fidx->e_leaf = oldblock;
+
+ ext_debug(tree, "int.index at %d (block %u): %d -> %d\n",
+ i, (unsigned) newblock,
+ (int) border,
+ (int) oldblock);
+ ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
+ i, newblock, border, oldblock);
+ /* copy indexes */
+ m = 0;
+ path[i].p_idx++;
+
+ ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
+ EXT_MAX_INDEX(path[i].p_hdr));
+ EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
+ EXT_LAST_INDEX(path[i].p_hdr));
+ while (path[i].p_idx <=
+ EXT_MAX_INDEX(path[i].p_hdr)) {
+ while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
+ ext_debug(tree, "%d: move %d:%d in new index\n",
+ i, path[i].p_idx->e_block,
+ path[i].p_idx->e_leaf);
+ memmove(++fidx, path[i].p_idx++,
+ sizeof(struct ext3_extent_idx));
+ neh->e_num++;
+ EXT_ASSERT(neh->e_num <= neh->e_max);
+ m++;
+ }
+
+ mark_buffer_uptodate(bh, 1);
+ unlock_buffer(bh);
+
......@@ -734,12 +749,12 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ struct ext3_ext_path *path,
+ struct ext3_extent *newext)
+{
+ struct buffer_head *bh;
+ struct ext3_ext_path *curp = path;
+ struct ext3_extent_header *neh;
+ struct ext3_extent_idx *fidx;
+ int len, err = 0;
+ struct buffer_head *bh;
+ unsigned long newblock;
+ int err = 0;
+
+ newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
+ if (newblock == 0)
......@@ -759,14 +774,17 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ }
+
+ /* move top-level index/leaf into new block */
+ len = sizeof(struct ext3_extent_header) +
+ sizeof(struct ext3_extent) * curp->p_hdr->e_max;
+ EXT_ASSERT(len >= 0 && len < 4096);
+ memmove(bh->b_data, curp->p_hdr, len);
+ memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
+
+ /* set size of new block */
+ neh = EXT_BLOCK_HDR(bh);
+ neh->e_max = ext3_ext_space_block(tree);
+ /* old root could have indexes or leaves
+ * so calculate e_max right way */
+ if (EXT_DEPTH(tree))
+ neh->e_max = ext3_ext_space_block_idx(tree);
+ else
+ neh->e_max = ext3_ext_space_block(tree);
+ neh->e_magic = EXT3_EXT_MAGIC;
+ mark_buffer_uptodate(bh, 1);
+ unlock_buffer(bh);
+
......@@ -777,9 +795,11 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ if ((err = ext3_ext_get_access(handle, tree, curp)))
+ goto out;
+
+ curp->p_hdr->e_magic = EXT3_EXT_MAGIC;
+ curp->p_hdr->e_max = ext3_ext_space_root_idx(tree);
+ curp->p_hdr->e_num = 1;
+ curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
+ /* FIXME: it works, but actually path[0] can be index */
+ curp->p_idx->e_block = EXT_FIRST_EXTENT(path[0].p_hdr)->e_block;
+ curp->p_idx->e_leaf = newblock;
+
......@@ -839,7 +859,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ path = ext3_ext_find_extent(tree, newext->e_block, path);
+ if (IS_ERR(path))
+ err = PTR_ERR(path);
+
+
+ /*
+ * only first (depth 0 -> 1) produces free space
+ * in all other cases we have to split growed tree
......@@ -1003,12 +1023,11 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ struct ext3_ext_path *path,
+ struct ext3_extent *newext)
+{
+ int depth, len;
+ struct ext3_extent_header * eh;
+ struct ext3_extent *ex;
+ struct ext3_extent *ex, *fex;
+ struct ext3_extent *nearex; /* nearest extent */
+ struct ext3_ext_path *npath = NULL;
+ int err;
+ int depth, len, err, next;
+
+ depth = EXT_DEPTH(tree);
+ ex = path[depth].p_ext;
......@@ -1028,36 +1047,41 @@ Index: linux-2.4.20/fs/ext3/extents.c
+repeat:
+ depth = EXT_DEPTH(tree);
+ eh = path[depth].p_hdr;
+ if (eh->e_num == eh->e_max) {
+ /* probably next leaf has space for us? */
+ int next = ext3_ext_next_leaf_block(tree, path);
+ if (next != 0xffffffff) {
+ ext_debug(tree, "next leaf block - %d\n", next);
+ EXT_ASSERT(!npath);
+ npath = ext3_ext_find_extent(tree, next, NULL);
+ if (IS_ERR(npath))
+ return PTR_ERR(npath);
+ EXT_ASSERT(npath->p_depth == path->p_depth);
+ eh = npath[depth].p_hdr;
+ if (eh->e_num < eh->e_max) {
+ ext_debug(tree, "next leaf isnt full(%d)\n",
+ eh->e_num);
+ path = npath;
+ goto repeat;
+ }
+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
+ eh->e_num, eh->e_max);
+ if (eh->e_num < eh->e_max)
+ goto has_space;
+
+ /* probably next leaf has space for us? */
+ fex = EXT_LAST_EXTENT(eh);
+ next = ext3_ext_next_leaf_block(tree, path);
+ if (newext->e_block > fex->e_block && next != 0xffffffff) {
+ ext_debug(tree, "next leaf block - %d\n", next);
+ EXT_ASSERT(!npath);
+ npath = ext3_ext_find_extent(tree, next, NULL);
+ if (IS_ERR(npath))
+ return PTR_ERR(npath);
+ EXT_ASSERT(npath->p_depth == path->p_depth);
+ eh = npath[depth].p_hdr;
+ if (eh->e_num < eh->e_max) {
+ ext_debug(tree, "next leaf isnt full(%d)\n",
+ eh->e_num);
+ path = npath;
+ goto repeat;
+ }
+ /*
+ * there is no free space in found leaf
+ * we're gonna add new leaf in the tree
+ */
+ err = ext3_ext_create_new_leaf(handle, tree, path, newext);
+ if (err)
+ goto cleanup;
+ goto repeat;
+ ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
+ eh->e_num, eh->e_max);
+ }
+
+ /*
+ * there is no free space in found leaf
+ * we're gonna add new leaf in the tree
+ */
+ err = ext3_ext_create_new_leaf(handle, tree, path, newext);
+ if (err)
+ goto cleanup;
+ depth = EXT_DEPTH(tree);
+ eh = path[depth].p_hdr;
+
+has_space:
+ nearex = path[depth].p_ext;
+
+ if ((err = ext3_ext_get_access(handle, tree, path + depth)))
......@@ -1091,21 +1115,20 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ "move %d from 0x%p to 0x%p\n",
+ newext->e_block, newext->e_start, newext->e_num,
+ nearex, len, nearex + 1, nearex + 2);
+
+ memmove(nearex + 1, nearex, len);
+ path[depth].p_ext = nearex;
+ }
+
+ if (!err) {
+ eh->e_num++;
+ nearex = path[depth].p_ext;
+ nearex->e_block = newext->e_block;
+ nearex->e_start = newext->e_start;
+ nearex->e_num = newext->e_num;
+ eh->e_num++;
+ nearex = path[depth].p_ext;
+ nearex->e_block = newext->e_block;
+ nearex->e_start = newext->e_start;
+ nearex->e_num = newext->e_num;
+
+ /* time to correct all indexes above */
+ err = ext3_ext_correct_indexes(handle, tree, path);
+ }
+ /* time to correct all indexes above */
+ err = ext3_ext_correct_indexes(handle, tree, path);
+ if (err)
+ goto cleanup;
+
+ err = ext3_ext_dirty(handle, tree, path + depth);
+
......@@ -1241,6 +1264,9 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ int depth = EXT_DEPTH(tree);
+ struct ext3_extent *ex, gex;
+
+ if (!tree->cex)
+ return;
+
+ ex = path[depth].p_ext;
+ if (ex == NULL) {
+ /* there is no extent yet, so gap is [0;-] */
......@@ -1291,7 +1317,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ ex->e_block = cex->e_block;
+ ex->e_start = cex->e_start;
+ ex->e_num = cex->e_num;
+ ext_debug(tree, "%lu cached by %lu:%lu:%lu(gap)\n",
+ ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
+ (unsigned long) block,
+ (unsigned long) ex->e_block,
+ (unsigned long) ex->e_num,
......@@ -1437,6 +1463,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ eh = path[depth].p_hdr;
+ EXT_ASSERT(eh);
+ EXT_ASSERT(eh->e_num <= eh->e_max);
+ EXT_ASSERT(eh->e_magic == EXT3_EXT_MAGIC);
+
+ /* find where to start removing */
+ le = ex = EXT_LAST_EXTENT(eh);
......@@ -1638,6 +1665,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ }
+
+ EXT_ASSERT(path[i].p_hdr->e_num <= path[i].p_hdr->e_max);
+ EXT_ASSERT(path[i].p_hdr->e_magic == EXT3_EXT_MAGIC);
+
+ if (!path[i].p_idx) {
+ /* this level hasn't touched yet */
......@@ -1712,8 +1740,16 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ * possible initialization would be here
+ */
+
+ if (test_opt(sb, EXTENTS))
+ printk("EXT3-fs: file extents enabled\n");
+ if (test_opt(sb, EXTENTS)) {
+ printk("EXT3-fs: file extents enabled");
+#ifdef AGRESSIVE_TEST
+ printk(", agressive tests");
+#endif
+#ifdef CHECK_BINSEARCH
+ printk(", check binsearch");
+#endif
+ printk("\n");
+ }
+}
+
+/*
......@@ -1864,7 +1900,7 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ tree->remove_extent_credits = ext3_remove_blocks_credits;
+ tree->buffer = (void *) inode;
+ tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
+ tree->cex = NULL; /* FIXME: add cache store later */
+ tree->cex = (struct ext3_extent *) &EXT3_I(inode)->i_cached_extent;
+}
+
+#if 0
......@@ -2227,11 +2263,11 @@ Index: linux-2.4.20/fs/ext3/extents.c
+ return err;
+}
+
Index: linux-2.4.20/fs/ext3/ialloc.c
Index: linux-2.4.24/fs/ext3/ialloc.c
===================================================================
--- linux-2.4.20.orig/fs/ext3/ialloc.c 2004-01-23 19:00:25.000000000 +0300
+++ linux-2.4.20/fs/ext3/ialloc.c 2004-01-24 00:45:20.000000000 +0300
@@ -593,11 +593,13 @@
--- linux-2.4.24.orig/fs/ext3/ialloc.c 2004-01-14 02:58:45.000000000 +0300
+++ linux-2.4.24/fs/ext3/ialloc.c 2004-01-24 16:58:08.000000000 +0300
@@ -592,11 +592,13 @@
iloc.bh = NULL;
goto fail;
}
......@@ -2247,10 +2283,10 @@ Index: linux-2.4.20/fs/ext3/ialloc.c
unlock_super (sb);
if(DQUOT_ALLOC_INODE(inode)) {
DQUOT_DROP(inode);
Index: linux-2.4.20/fs/ext3/inode.c
Index: linux-2.4.24/fs/ext3/inode.c
===================================================================
--- linux-2.4.20.orig/fs/ext3/inode.c 2004-01-23 19:00:25.000000000 +0300
+++ linux-2.4.20/fs/ext3/inode.c 2004-01-24 04:34:04.000000000 +0300
--- linux-2.4.24.orig/fs/ext3/inode.c 2004-01-14 02:58:45.000000000 +0300
+++ linux-2.4.24/fs/ext3/inode.c 2004-01-24 16:58:08.000000000 +0300
@@ -848,6 +848,15 @@
goto reread;
}
......@@ -2304,7 +2340,7 @@ Index: linux-2.4.20/fs/ext3/inode.c
handle = start_transaction(inode);
if (IS_ERR(handle))
return; /* AKPM: return what? */
@@ -2537,6 +2549,9 @@
@@ -2536,6 +2548,9 @@
int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
int ret;
......@@ -2314,7 +2350,7 @@ Index: linux-2.4.20/fs/ext3/inode.c
if (ext3_should_journal_data(inode))
ret = 3 * (bpp + indirects) + 2;
else
@@ -2973,7 +2988,7 @@
@@ -2972,7 +2987,7 @@
/* alloc blocks one by one */
for (i = 0; i < nblocks; i++) {
......@@ -2323,7 +2359,7 @@ Index: linux-2.4.20/fs/ext3/inode.c
&bh_tmp, 1);
if (ret)
break;
@@ -3049,7 +3064,7 @@
@@ -3048,7 +3063,7 @@
if (blocks[i] != 0)
continue;
......@@ -2332,10 +2368,10 @@ Index: linux-2.4.20/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.20/fs/ext3/Makefile
Index: linux-2.4.24/fs/ext3/Makefile
===================================================================
--- linux-2.4.20.orig/fs/ext3/Makefile 2004-01-23 19:00:42.000000000 +0300
+++ linux-2.4.20/fs/ext3/Makefile 2004-01-24 00:45:20.000000000 +0300
--- linux-2.4.24.orig/fs/ext3/Makefile 2004-01-14 02:58:45.000000000 +0300
+++ linux-2.4.24/fs/ext3/Makefile 2004-01-24 16:58:08.000000000 +0300
@@ -13,7 +13,7 @@
obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
......@@ -2345,11 +2381,11 @@ Index: linux-2.4.20/fs/ext3/Makefile
obj-m := $(O_TARGET)
export-objs += xattr.o
Index: linux-2.4.20/fs/ext3/super.c
Index: linux-2.4.24/fs/ext3/super.c
===================================================================
--- linux-2.4.20.orig/fs/ext3/super.c 2004-01-23 19:00:25.000000000 +0300
+++ linux-2.4.20/fs/ext3/super.c 2004-01-24 04:30:14.000000000 +0300
@@ -623,6 +623,7 @@
--- linux-2.4.24.orig/fs/ext3/super.c 2004-01-14 02:58:45.000000000 +0300
+++ linux-2.4.24/fs/ext3/super.c 2004-01-24 16:58:08.000000000 +0300
@@ -530,6 +530,7 @@
int i;
J_ASSERT(sbi->s_delete_inodes == 0);
......@@ -2357,7 +2393,7 @@ Index: linux-2.4.20/fs/ext3/super.c
ext3_xattr_put_super(sb);
journal_destroy(sbi->s_journal);
if (!(sb->s_flags & MS_RDONLY)) {
@@ -796,6 +797,10 @@
@@ -702,6 +703,10 @@
return 0;
}
}
......@@ -2368,7 +2404,7 @@ Index: linux-2.4.20/fs/ext3/super.c
else if (!strcmp (this_char, "grpid") ||
!strcmp (this_char, "bsdgroups"))
set_opt (*mount_options, GRPID);
@@ -1485,6 +1490,8 @@
@@ -1392,6 +1397,8 @@
test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":
"writeback");
......@@ -2377,11 +2413,11 @@ Index: linux-2.4.20/fs/ext3/super.c
return sb;
failed_mount3:
Index: linux-2.4.20/fs/ext3/ioctl.c
Index: linux-2.4.24/fs/ext3/ioctl.c
===================================================================
--- linux-2.4.20.orig/fs/ext3/ioctl.c 2004-01-13 17:00:09.000000000 +0300
+++ linux-2.4.20/fs/ext3/ioctl.c 2004-01-24 14:54:31.000000000 +0300
@@ -189,6 +189,10 @@
--- linux-2.4.24.orig/fs/ext3/ioctl.c 2004-01-14 02:58:42.000000000 +0300
+++ linux-2.4.24/fs/ext3/ioctl.c 2004-01-24 16:58:08.000000000 +0300
@@ -174,6 +174,10 @@
return ret;
}
#endif
......@@ -2392,10 +2428,10 @@ Index: linux-2.4.20/fs/ext3/ioctl.c
default:
return -ENOTTY;
}
Index: linux-2.4.20/include/linux/ext3_fs.h
Index: linux-2.4.24/include/linux/ext3_fs.h
===================================================================
--- linux-2.4.20.orig/include/linux/ext3_fs.h 2004-01-23 19:00:25.000000000 +0300
+++ linux-2.4.20/include/linux/ext3_fs.h 2004-01-24 01:28:06.000000000 +0300
--- linux-2.4.24.orig/include/linux/ext3_fs.h 2004-01-14 02:58:45.000000000 +0300
+++ linux-2.4.24/include/linux/ext3_fs.h 2004-01-24 16:58:08.000000000 +0300
@@ -184,6 +184,7 @@
#define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */
#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
......@@ -2423,7 +2459,7 @@ Index: linux-2.4.20/include/linux/ext3_fs.h
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
#ifndef _LINUX_EXT2_FS_H
@@ -687,6 +693,7 @@
@@ -688,6 +694,7 @@
extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
/* inode.c */
......@@ -2431,7 +2467,7 @@ Index: linux-2.4.20/include/linux/ext3_fs.h
extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
@@ -767,6 +774,14 @@
@@ -769,6 +776,14 @@
extern struct inode_operations ext3_symlink_inode_operations;
extern struct inode_operations ext3_fast_symlink_inode_operations;
......@@ -2446,11 +2482,11 @@ Index: linux-2.4.20/include/linux/ext3_fs.h
#endif /* __KERNEL__ */
Index: linux-2.4.20/include/linux/ext3_extents.h
Index: linux-2.4.24/include/linux/ext3_extents.h
===================================================================
--- linux-2.4.20.orig/include/linux/ext3_extents.h 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.20/include/linux/ext3_extents.h 2004-01-24 15:15:11.000000000 +0300
@@ -0,0 +1,207 @@
--- linux-2.4.24.orig/include/linux/ext3_extents.h 2003-01-30 13:24:37.000000000 +0300
+++ linux-2.4.24/include/linux/ext3_extents.h 2004-01-24 19:28:54.000000000 +0300
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2003 Alex Tomas <alex@clusterfs.com>
+ *
......@@ -2468,6 +2504,8 @@ Index: linux-2.4.20/include/linux/ext3_extents.h
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
+ */
+
+#ifndef _LINUX_EXT3_EXTENTS
+#define _LINUX_EXT3_EXTENTS
+
+/*
+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
......@@ -2544,6 +2582,8 @@ Index: linux-2.4.20/include/linux/ext3_extents.h
+ __u16 e_depth; /* has tree real underlaying blocks? */
+};
+
+#define EXT3_EXT_MAGIC 0xf301
+
+/*
+ * array of ext3_ext_path contains path to some extent
+ * creation/lookup routines use it for traversal/splitting/etc
......@@ -2657,4 +2697,18 @@ Index: linux-2.4.20/include/linux/ext3_extents.h
+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
+
+#endif /* _LINUX_EXT3_EXTENTS */
+
Index: linux-2.4.24/include/linux/ext3_fs_i.h
===================================================================
--- linux-2.4.24.orig/include/linux/ext3_fs_i.h 2004-01-24 19:30:22.000000000 +0300
+++ linux-2.4.24/include/linux/ext3_fs_i.h 2004-01-24 19:54:39.000000000 +0300
@@ -76,6 +76,8 @@
* by other means, so we have truncate_sem.
*/
struct rw_semaphore truncate_sem;
+
+ __u32 i_cached_extent[3];
};
#endif /* _LINUX_EXT3_FS_I */
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment