fs/ext3/Makefile | 3
- fs/ext3/extents.c | 1573 +++++++++++++++++++++++++++++++++++++++++++++
+ fs/ext3/extents.c | 1572 +++++++++++++++++++++++++++++++++++++++++++++
fs/ext3/ialloc.c | 4
fs/ext3/inode.c | 26
- fs/ext3/super.c | 9
+ fs/ext3/super.c | 8
include/linux/ext3_fs.h | 18
include/linux/ext3_fs_i.h | 4
include/linux/ext3_fs_sb.h | 10
- 8 files changed, 1641 insertions(+), 6 deletions(-)
+ 8 files changed, 1639 insertions(+), 6 deletions(-)
-diff -puN /dev/null fs/ext3/extents.c
--- /dev/null 2003-01-30 13:24:37.000000000 +0300
-+++ linux-2.4.18-chaos-alexey/fs/ext3/extents.c 2003-08-25 21:11:58.000000000 +0400
-@@ -0,0 +1,1573 @@
++++ linux-2.4.18-chaos-uml-alexey/fs/ext3/extents.c 2003-09-14 00:42:28.000000000 +0400
+@@ -0,0 +1,1572 @@
+/*
+ *
+ * linux/fs/ext3/extents.c
+ ext3_ext_show_leaf(inode, path);
+ bh_result->b_dev = inode->i_dev;
+ bh_result->b_blocknr = newblock;
++ bh_result->b_state |= (1UL << BH_Mapped);
+out2:
+ ext3_ext_drop_refs(inode, path);
+ kfree(path);
+ handle_t *handle;
+ int i, depth, err = 0;
+
-+ down(&EXT3_I(inode)->i_ext_sem);
+ ext3_ext_collect_stats(inode);
+
+ /*
+ } else {
+ page = grab_cache_page(mapping,
+ inode->i_size >> PAGE_CACHE_SHIFT);
-+ if (!page) {
-+ up(&EXT3_I(inode)->i_ext_sem);
++ if (!page)
+ return;
-+ }
+ }
+
+ /*
+ unlock_page(page);
+ page_cache_release(page);
+ }
-+ up(&EXT3_I(inode)->i_ext_sem);
+ return;
+ }
+
+ ext3_block_truncate_page(handle, mapping, inode->i_size, page,
+ inode->i_sb->s_blocksize);
+
++ down(&EXT3_I(inode)->i_ext_sem);
++
+ /*
+ * TODO: optimization is possible here
+ * probably we need not scaning at all,
+ sbi->s_ext_blocks / sbi->s_ext_extents);
+}
+
-diff -puN fs/ext3/ialloc.c~ext3-extents fs/ext3/ialloc.c
---- linux-2.4.18-chaos/fs/ext3/ialloc.c~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/fs/ext3/ialloc.c 2003-08-25 21:12:14.000000000 +0400
-@@ -571,6 +571,10 @@ repeat:
+--- linux-2.4.18-chaos-uml/fs/ext3/ialloc.c~ext3-extents-2.4.18-chaos 2003-09-09 16:57:40.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/fs/ext3/ialloc.c 2003-09-14 00:23:18.000000000 +0400
+@@ -573,6 +573,10 @@ repeat:
ei->i_prealloc_count = 0;
#endif
ei->i_block_group = i;
if (ei->i_flags & EXT3_SYNC_FL)
inode->i_flags |= S_SYNC;
-diff -puN fs/ext3/inode.c~ext3-extents fs/ext3/inode.c
---- linux-2.4.18-chaos/fs/ext3/inode.c~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/fs/ext3/inode.c 2003-08-25 20:09:59.000000000 +0400
+--- linux-2.4.18-chaos-uml/fs/ext3/inode.c~ext3-extents-2.4.18-chaos 2003-09-09 16:57:41.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/fs/ext3/inode.c 2003-09-14 00:56:08.000000000 +0400
@@ -842,6 +842,15 @@ changed:
goto reread;
}
struct address_space *mapping, loff_t from,
struct page *page, unsigned blocksize)
{
-@@ -2040,6 +2049,9 @@ void ext3_truncate(struct inode * inode)
- */
- ei->i_disksize = inode->i_size;
+@@ -1998,6 +2007,9 @@ void ext3_truncate(struct inode * inode)
+
+ ext3_discard_prealloc(inode);
+ if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
+ return ext3_ext_truncate(inode);
+
- /*
- * From here we block out all ext3_get_block() callers who want to
- * modify the block allocation tree.
+ blocksize = inode->i_sb->s_blocksize;
+ last_block = (inode->i_size + blocksize-1)
+ >> EXT3_BLOCK_SIZE_BITS(inode->i_sb);
@@ -2436,6 +2448,8 @@ void ext3_read_inode(struct inode * inod
ei->i_prealloc_count = 0;
#endif
if (ext3_should_journal_data(inode))
ret = 3 * (bpp + indirects) + 2;
else
-diff -puN fs/ext3/Makefile~ext3-extents fs/ext3/Makefile
---- linux-2.4.18-chaos/fs/ext3/Makefile~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/fs/ext3/Makefile 2003-08-25 20:09:59.000000000 +0400
+--- linux-2.4.18-chaos-uml/fs/ext3/Makefile~ext3-extents-2.4.18-chaos 2003-09-09 16:57:40.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/fs/ext3/Makefile 2003-09-09 16:57:41.000000000 +0400
@@ -12,7 +12,8 @@ O_TARGET := ext3.o
export-objs := ext3-exports.o
obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
-diff -puN fs/ext3/super.c~ext3-extents fs/ext3/super.c
---- linux-2.4.18-chaos/fs/ext3/super.c~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/fs/ext3/super.c 2003-08-25 20:09:59.000000000 +0400
+--- linux-2.4.18-chaos-uml/fs/ext3/super.c~ext3-extents-2.4.18-chaos 2003-09-09 16:57:41.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/fs/ext3/super.c 2003-09-13 23:52:17.000000000 +0400
@@ -619,6 +619,7 @@ void ext3_put_super (struct super_block
kdev_t j_dev = sbi->s_journal->j_dev;
int i;
if (!strcmp (this_char, "bsddf"))
clear_opt (*mount_options, MINIX_DF);
else if (!strcmp (this_char, "nouid32")) {
-@@ -1711,6 +1718,8 @@ static int ext3_create_journal(struct su
- /* Make sure we flush the recovery flag to disk. */
- ext3_commit_super(sb, es, 1);
-
+@@ -1468,6 +1475,7 @@ struct super_block * ext3_read_super (st
+ test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal":
+ test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":
+ "writeback");
+ ext3_ext_init(sb);
-+
- return 0;
- }
-diff -puN include/linux/ext3_fs.h~ext3-extents include/linux/ext3_fs.h
---- linux-2.4.18-chaos/include/linux/ext3_fs.h~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/include/linux/ext3_fs.h 2003-08-25 21:12:14.000000000 +0400
+ return sb;
+
+--- linux-2.4.18-chaos-uml/include/linux/ext3_fs.h~ext3-extents-2.4.18-chaos 2003-09-09 16:57:40.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/include/linux/ext3_fs.h 2003-09-09 16:57:41.000000000 +0400
@@ -183,6 +183,7 @@ struct ext3_group_desc
#define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */
#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
#endif /* __KERNEL__ */
-diff -puN include/linux/ext3_fs_i.h~ext3-extents include/linux/ext3_fs_i.h
---- linux-2.4.18-chaos/include/linux/ext3_fs_i.h~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/include/linux/ext3_fs_i.h 2003-08-25 20:09:59.000000000 +0400
+--- linux-2.4.18-chaos-uml/include/linux/ext3_fs_i.h~ext3-extents-2.4.18-chaos 2001-11-22 22:46:19.000000000 +0300
++++ linux-2.4.18-chaos-uml-alexey/include/linux/ext3_fs_i.h 2003-09-09 16:57:41.000000000 +0400
@@ -73,6 +73,10 @@ struct ext3_inode_info {
* by other means, so we have truncate_sem.
*/
};
#endif /* _LINUX_EXT3_FS_I */
-diff -puN include/linux/ext3_fs_sb.h~ext3-extents include/linux/ext3_fs_sb.h
---- linux-2.4.18-chaos/include/linux/ext3_fs_sb.h~ext3-extents 2003-08-25 20:09:59.000000000 +0400
-+++ linux-2.4.18-chaos-alexey/include/linux/ext3_fs_sb.h 2003-08-25 20:09:59.000000000 +0400
+--- linux-2.4.18-chaos-uml/include/linux/ext3_fs_sb.h~ext3-extents-2.4.18-chaos 2003-09-09 16:57:40.000000000 +0400
++++ linux-2.4.18-chaos-uml-alexey/include/linux/ext3_fs_sb.h 2003-09-09 16:57:41.000000000 +0400
@@ -84,6 +84,16 @@ struct ext3_sb_info {
wait_queue_head_t s_delete_thread_queue;
wait_queue_head_t s_delete_waiter_queue;