From 3ace1b7be9c83c1156a6bda637efa3210956236b Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 8 May 2002 20:35:39 +0000 Subject: [PATCH] Add ext3 extended attributes patch to extN. This needed some massaging in order to get it to fit with htree. Note that the ext3 EA patch has been stripped of all the syscall stuff to avoid intruding into the kernel too much (we still need the VFS xattr methods, but those are really small. --- lustre/extN/Makefile.am | 8 ++--- lustre/extN/ext3-2.4.18-ino_sb_macro.diff | 54 ++++++++----------------------- 2 files changed, 17 insertions(+), 45 deletions(-) diff --git a/lustre/extN/Makefile.am b/lustre/extN/Makefile.am index 84934a1..c993510 100644 --- a/lustre/extN/Makefile.am +++ b/lustre/extN/Makefile.am @@ -8,13 +8,13 @@ MODULE = extN modulefs_DATA = extN.o EXTRA_PROGRAMS = extN -EXTNP = htree-ext3-2.4.18.diff ext3-2.4.18-ino_sb_macro.diff -EXTNP+= extN-misc-fixup.diff +EXTNP = htree-ext3-2.4.18.diff linux-2.4.18ea-0.8.26.diff +EXTNP+= ext3-2.4.18-ino_sb_macro.diff extN-misc-fixup.diff EXTNC = balloc.c bitmap.c dir.c file.c fsync.c ialloc.c inode.c ioctl.c EXTNC+= namei.c super.c symlink.c EXTNI = extN_fs.h extN_fs_i.h extN_fs_sb.h extN_jbd.h -extN_SOURCES = $(EXTNC) $(EXTNI) # punch.c -EXTRA_DIST = $(EXTNP) +extN_SOURCES = $(EXTNC) $(EXTNI) xattr.c # punch.c +EXTRA_DIST = $(EXTNP) extN-2.4.18-ino_sb_fixup.diff extN-2.4.18-exports.diff DISTCLEANFILES = $(EXTNC) $(EXTNI) patch-stamp *.orig *.rej SUB=-e "s/ext3/extN/g" -e "s/EXT3/EXTN/g" diff --git a/lustre/extN/ext3-2.4.18-ino_sb_macro.diff b/lustre/extN/ext3-2.4.18-ino_sb_macro.diff index 1d1e4ac..4edc9f3 100644 --- a/lustre/extN/ext3-2.4.18-ino_sb_macro.diff +++ b/lustre/extN/ext3-2.4.18-ino_sb_macro.diff @@ -967,13 +967,7 @@ struct buffer_head *bh = 0; unsigned long block; unsigned long block_group; -@@ -1990,30 +1995,26 @@ int ext3_get_inode_loc (struct inode *in - unsigned long desc; - unsigned long offset; - struct ext3_group_desc * gdp; -- -+ - if ((inode->i_ino != EXT3_ROOT_INO && +@@ -1995,25 +2000,21 @@ int ext3_get_inode_loc (struct inode *in inode->i_ino != EXT3_ACL_IDX_INO && inode->i_ino != EXT3_ACL_DATA_INO && inode->i_ino != EXT3_JOURNAL_INO && @@ -1113,9 +1107,7 @@ brelse (iloc.bh); -@@ -2141,19 +2143,19 @@ void ext3_read_inode(struct inode * inod - init_special_inode(inode, inode->i_mode, - le32_to_cpu(iloc.raw_inode->i_block[0])); +@@ -2143,17 +2145,17 @@ void ext3_read_inode(struct inode * inod /* inode->i_attr_flags = 0; unused */ - if (inode->u.ext3_i.i_flags & EXT3_SYNC_FL) { + if (ii->i_flags & EXT3_SYNC_FL) { @@ -1316,15 +1308,15 @@ ret = bh; goto cleanup_and_exit; } else { -@@ -1286,7 +1286,7 @@ static int ext3_mkdir(struct inode * dir - - inode->i_op = &ext3_dir_inode_operations; - inode->i_fop = &ext3_dir_operations; -- inode->i_size = inode->u.ext3_i.i_disksize = inode->i_sb->s_blocksize; -+ inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - inode->i_blocks = 0; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { +@@ -1320,7 +1320,7 @@ static int ext3_mkdir(struct inode * dir + if (err) + goto out_no_entry; + dir->i_nlink++; +- dir->u.extN_i.i_flags &= ~EXTN_INDEX_FL; ++ EXT3_I(dir)->i_flags &= ~EXTN_INDEX_FL; + extN_mark_inode_dirty(handle, dir); + d_instantiate(dentry, inode); + out_stop: @@ -1419,7 +1419,7 @@ int ext3_orphan_add(handle_t *handle, st int err = 0, rc; @@ -1399,15 +1391,6 @@ jbd_debug(4, "orphan inode %ld will point to %ld\n", i_prev->i_ino, ino_next); err = ext3_reserve_inode_write(handle, i_prev, &iloc2); -@@ -1682,7 +1682,7 @@ static int ext3_symlink (struct inode * - if (IS_ERR(inode)) - goto out_stop; - -- if (l > sizeof (inode->u.ext3_i.i_data)) { -+ if (l > sizeof (EXT3_I(inode)->i_data)) { - inode->i_op = &page_symlink_inode_operations; - inode->i_mapping->a_ops = &ext3_aops; - /* @@ -1695,10 +1695,10 @@ static int ext3_symlink (struct inode * goto out_no_entry; } else { @@ -1490,15 +1473,6 @@ es->s_state |= cpu_to_le16(EXT3_ERROR_FS); ext3_commit_super (sb, es, 1); -@@ -1744,7 +1746,7 @@ static void __exit exit_ext3_fs(void) - unregister_filesystem(&ext3_fs_type); - } - --EXPORT_NO_SYMBOLS; -+EXPORT_SYMBOL(ext3_bread); - - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); - MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); --- ./fs/ext3/symlink.c.orig Fri Apr 12 10:27:49 2002 +++ ./fs/ext3/symlink.c Tue May 7 15:25:39 2002 @@ -23,13 +23,13 @@ @@ -1519,7 +1493,7 @@ --- ./include/linux/ext3_fs.h.orig Tue Apr 16 14:27:25 2002 +++ ./include/linux/ext3_fs.h Tue May 7 16:47:36 2002 -@@ -84,23 +84,25 @@ +@@ -84,22 +84,25 @@ #define EXT3_MIN_BLOCK_SIZE 1024 #define EXT3_MAX_BLOCK_SIZE 4096 #define EXT3_MIN_BLOCK_LOG_SIZE 10 @@ -1529,7 +1503,6 @@ -#else -# define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size) -#endif --#define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry)) -#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32)) -#ifdef __KERNEL__ -# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) @@ -1560,11 +1533,10 @@ #define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \ EXT3_GOOD_OLD_INODE_SIZE : \ (s)->s_inode_size) -@@ -108,6 +110,8 @@ +@@ -108,6 +110,7 @@ EXT3_GOOD_OLD_FIRST_INO : \ (s)->s_first_ino) #endif -+#define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry)) +#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32)) /* -- 1.8.3.1