--- linux-2.6.16-rc4/fs/jfs/jfs_inode.h 2005-08-29 22:25:32 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_inode.h 2006-02-17 23:26:32 +0100 @@ -20,6 +20,8 @@ extern struct inode *ialloc(struct inode *, umode_t); extern int jfs_fsync(struct file *, struct dentry *, int); +extern int jfs_ioctl(struct inode *, struct file *, + unsigned int, unsigned long); extern void jfs_read_inode(struct inode *); extern int jfs_commit_inode(struct inode *, int); extern int jfs_write_inode(struct inode*, int); --- linux-2.6.16-rc4/fs/jfs/Makefile 2004-08-14 12:56:09 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/Makefile 2006-02-17 23:26:32 +0100 @@ -8,7 +8,8 @@ jfs-y := super.o file.o inode.o namei jfs_xtree.o jfs_imap.o jfs_debug.o jfs_dmap.o \ jfs_unicode.o jfs_dtree.o jfs_inode.o \ jfs_extent.o symlink.o jfs_metapage.o \ - jfs_logmgr.o jfs_txnmgr.o jfs_uniupr.o resize.o xattr.o + jfs_logmgr.o jfs_txnmgr.o jfs_uniupr.o \ + resize.o xattr.o ioctl.o jfs-$(CONFIG_JFS_POSIX_ACL) += acl.o --- linux-2.6.16-rc4/fs/jfs/namei.c 2006-01-03 17:29:57 +0100 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/namei.c 2006-02-17 23:26:32 +0100 @@ -1517,6 +1519,7 @@ struct inode_operations jfs_dir_inode_op .setattr = jfs_setattr, .permission = jfs_permission, #endif + .sync_flags = jfs_sync_flags, }; struct file_operations jfs_dir_operations = { --- linux-2.6.16-rc4/fs/jfs/namei.c 2006-01-03 17:29:57 +0100 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/namei.c 2006-02-17 23:26:32 +0100 @@ -1523,6 +1526,7 @@ ***** .read = generic_read_dir, .readdir = jfs_readdir, .fsync = jfs_fsync, + .ioctl = jfs_ioctl, }; static int jfs_ci_hash(struct dentry *dir, struct qstr *this) --- linux-2.6.16-rc4/fs/jfs/inode.c 2005-10-28 20:49:44 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/inode.c 2006-02-17 23:26:32 +0100 @@ -55,6 +56,7 @@ void jfs_read_inode(struct inode *inode) inode->i_op = &jfs_file_inode_operations; init_special_inode(inode, inode->i_mode, inode->i_rdev); } + jfs_set_inode_flags(inode); } /* --- linux-2.6.16-rc4/fs/jfs/jfs_inode.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_inode.c 2006-02-17 23:26:32 +0100 @@ -74,10 +143,20 @@ struct inode *ialloc(struct inode *paren } inode->i_mode = mode; - if (S_ISDIR(mode)) - jfs_inode->mode2 = IDIRECTORY | mode; + /* inherit flags from parent */ + jfs_inode->mode2 = JFS_IP(parent)->mode2 & JFS_FL_INHERIT; + + if (S_ISDIR(mode)) { + jfs_inode->mode2 |= IDIRECTORY; + jfs_inode->mode2 &= ~JFS_DIRSYNC_FL; + } + else if (S_ISLNK(mode)) + jfs_inode->mode2 &= + ~(JFS_IMMUTABLE_FL|JFS_APPEND_FL); else - jfs_inode->mode2 = INLINEEA | ISPARSE | mode; + jfs_inode->mode2 |= INLINEEA | ISPARSE; + jfs_inode->mode2 |= mode; + inode->i_blksize = sb->s_blocksize; inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; --- linux-2.6.16-rc4/fs/jfs/jfs_inode.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_inode.c 2006-02-17 23:26:32 +0100 @@ -98,6 +177,7 @@ struct inode *ialloc(struct inode *paren jfs_inode->atlhead = 0; jfs_inode->atltail = 0; jfs_inode->xtlid = 0; + jfs_set_inode_flags(inode); jfs_info("ialloc returns inode = 0x%p\n", inode); --- linux-2.6.16-rc4/fs/jfs/file.c 2005-08-29 22:25:31 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/file.c 2006-02-17 23:26:32 +0100 @@ -98,6 +98,7 @@ struct inode_operations jfs_file_inode_o .setattr = jfs_setattr, .permission = jfs_permission, #endif + .sync_flags = jfs_sync_flags, }; --- linux-2.6.16-rc4/fs/jfs/jfs_dtree.c 2005-08-29 22:25:31 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_dtree.c 2006-02-17 23:26:32 +0100 @@ -930,7 +937,8 @@ int dtInsert(tid_t tid, struct inode *ip static int dtSplitUp(tid_t tid, struct inode *ip, struct dtsplit * split, struct btstack * btstack) { - struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); + struct super_block *sb = ip->i_sb; + struct jfs_sb_info *sbi = JFS_SBI(sb); int rc = 0; struct metapage *smp; dtpage_t *sp; /* split page */ --- linux-2.6.16-rc4/fs/jfs/jfs_inode.h 2005-08-29 22:25:32 +0200 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_inode.h 2006-02-17 23:26:32 +0100 @@ -29,6 +31,8 @@ extern void jfs_truncate(struct inode *) extern void jfs_truncate_nolock(struct inode *, loff_t); extern void jfs_free_zero_link(struct inode *); extern struct dentry *jfs_get_parent(struct dentry *dentry); +extern int jfs_sync_flags(struct inode *); +extern void jfs_set_inode_flags(struct inode *); extern struct address_space_operations jfs_aops; extern struct inode_operations jfs_dir_inode_operations; --- linux-2.6.16-rc4/fs/jfs/jfs_dinode.h 2004-12-25 01:55:20 +0100 +++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/jfs/jfs_dinode.h 2006-02-17 23:26:32 +0100 @@ -139,12 +139,14 @@ struct dinode { /* more extended mode bits: attributes for OS/2 */ #define IREADONLY 0x02000000 /* no write access to file */ -#define IARCHIVE 0x40000000 /* file archive bit */ -#define ISYSTEM 0x08000000 /* system file */ #define IHIDDEN 0x04000000 /* hidden file */ -#define IRASH 0x4E000000 /* mask for changeable attributes */ -#define INEWNAME 0x80000000 /* non-8.3 filename format */ +#define ISYSTEM 0x08000000 /* system file */ + #define IDIRECTORY 0x20000000 /* directory (shadow of real bit) */ +#define IARCHIVE 0x40000000 /* file archive bit */ +#define INEWNAME 0x80000000 /* non-8.3 filename format */ + +#define IRASH 0x4E000000 /* mask for changeable attributes */ #define ATTRSHIFT 25 /* bits to shift to move attribute specification to mode position */