--- linux-2.6.20/fs/jffs2/dir.c 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/dir.c 2007-02-09 02:43:40 +0100 @@ -37,6 +37,8 @@ static int jffs2_mknod (struct inode *,s static int jffs2_rename (struct inode *, struct dentry *, struct inode *, struct dentry *); +extern int jffs2_sync_flags(struct inode *); + const struct file_operations jffs2_dir_operations = { .read = generic_read_dir, @@ -59,6 +61,7 @@ struct inode_operations jffs2_dir_inode_ .rename = jffs2_rename, .permission = jffs2_permission, .setattr = jffs2_setattr, + .sync_flags = jffs2_sync_flags, .setxattr = jffs2_setxattr, .getxattr = jffs2_getxattr, .listxattr = jffs2_listxattr, --- linux-2.6.20/fs/jffs2/file.c 2006-11-30 21:19:25 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/file.c 2007-02-09 02:43:40 +0100 @@ -27,6 +27,9 @@ static int jffs2_prepare_write (struct f unsigned start, unsigned end); static int jffs2_readpage (struct file *filp, struct page *pg); +extern int jffs2_sync_flags(struct inode *); + + int jffs2_fsync(struct file *filp, struct dentry *dentry, int datasync) { struct inode *inode = dentry->d_inode; @@ -58,6 +61,7 @@ struct inode_operations jffs2_file_inode { .permission = jffs2_permission, .setattr = jffs2_setattr, + .sync_flags = jffs2_sync_flags, .setxattr = jffs2_setxattr, .getxattr = jffs2_getxattr, .listxattr = jffs2_listxattr, @@ -159,12 +163,14 @@ static int jffs2_prepare_write (struct f ri.mode = cpu_to_jemode(inode->i_mode); ri.uid = cpu_to_je16(inode->i_uid); ri.gid = cpu_to_je16(inode->i_gid); + ri.tag = cpu_to_je16(inode->i_tag); ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs)); ri.atime = ri.ctime = ri.mtime = cpu_to_je32(get_seconds()); ri.offset = cpu_to_je32(inode->i_size); ri.dsize = cpu_to_je32(pageofs - inode->i_size); ri.csize = cpu_to_je32(0); ri.compr = JFFS2_COMPR_ZERO; + ri.flags = cpu_to_je16(f->flags); ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); ri.data_crc = cpu_to_je32(0); @@ -250,8 +256,10 @@ static int jffs2_commit_write (struct fi ri->mode = cpu_to_jemode(inode->i_mode); ri->uid = cpu_to_je16(inode->i_uid); ri->gid = cpu_to_je16(inode->i_gid); + ri->tag = cpu_to_je16(inode->i_tag); ri->isize = cpu_to_je32((uint32_t)inode->i_size); ri->atime = ri->ctime = ri->mtime = cpu_to_je32(get_seconds()); + ri->flags = cpu_to_je16(f->flags); /* In 2.4, it was already kmapped by generic_file_write(). Doesn't hurt to do it again. The alternative is ifdefs, which are ugly. */ --- linux-2.6.20/fs/jffs2/fs.c 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/fs.c 2007-02-09 02:43:40 +0100 @@ -22,6 +22,7 @@ #include #include #include +#include #include "nodelist.h" static int jffs2_flash_setup(struct jffs2_sb_info *c); @@ -99,6 +100,7 @@ static int jffs2_do_setattr (struct inod ri->uid = cpu_to_je16((ivalid & ATTR_UID)?iattr->ia_uid:inode->i_uid); ri->gid = cpu_to_je16((ivalid & ATTR_GID)?iattr->ia_gid:inode->i_gid); + ri->tag = cpu_to_je16((ivalid & ATTR_TAG)?iattr->ia_tag:inode->i_tag); if (ivalid & ATTR_MODE) if (iattr->ia_mode & S_ISGID && @@ -118,6 +120,8 @@ static int jffs2_do_setattr (struct inod ri->offset = cpu_to_je32(0); ri->csize = ri->dsize = cpu_to_je32(mdatalen); ri->compr = JFFS2_COMPR_NONE; + ri->flags = cpu_to_je16(f->flags); + if (ivalid & ATTR_SIZE && inode->i_size < iattr->ia_size) { /* It's an extension. Make it a hole node */ ri->compr = JFFS2_COMPR_ZERO; @@ -147,6 +151,7 @@ static int jffs2_do_setattr (struct inod inode->i_mode = jemode_to_cpu(ri->mode); inode->i_uid = je16_to_cpu(ri->uid); inode->i_gid = je16_to_cpu(ri->gid); + inode->i_tag = je16_to_cpu(ri->tag); old_metadata = f->metadata; @@ -181,6 +186,48 @@ static int jffs2_do_setattr (struct inod return 0; } +void jffs2_set_inode_flags(struct inode *inode) +{ + struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); + unsigned int flags = f->flags; + + inode->i_flags &= ~(JFFS2_INO_FLAG_IMMUTABLE | + JFFS2_INO_FLAG_IUNLINK | JFFS2_INO_FLAG_BARRIER); + + if (flags & JFFS2_INO_FLAG_IMMUTABLE) + inode->i_flags |= S_IMMUTABLE; + if (flags & JFFS2_INO_FLAG_IUNLINK) + inode->i_flags |= S_IUNLINK; + if (flags & JFFS2_INO_FLAG_BARRIER) + inode->i_flags |= S_BARRIER; +} + +int jffs2_sync_flags(struct inode *inode) +{ + struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); + unsigned int oldflags, newflags; + + oldflags = f->flags; + newflags = oldflags & ~(JFFS2_INO_FLAG_IMMUTABLE | + JFFS2_INO_FLAG_IUNLINK | JFFS2_INO_FLAG_BARRIER); + + if (IS_IMMUTABLE(inode)) + newflags |= JFFS2_INO_FLAG_IMMUTABLE; + if (IS_IUNLINK(inode)) + newflags |= JFFS2_INO_FLAG_IUNLINK; + if (IS_BARRIER(inode)) + newflags |= JFFS2_INO_FLAG_BARRIER; + + if (oldflags ^ newflags) { + f->flags = newflags; + inode->i_ctime = CURRENT_TIME; + /* strange requirement, see jffs2_dirty_inode() */ + inode->i_state |= I_DIRTY_DATASYNC; + mark_inode_dirty(inode); + } + return 0; +} + int jffs2_setattr(struct dentry *dentry, struct iattr *iattr) { int rc; @@ -256,6 +303,7 @@ void jffs2_read_inode (struct inode *ino inode->i_mode = jemode_to_cpu(latest_node.mode); inode->i_uid = je16_to_cpu(latest_node.uid); inode->i_gid = je16_to_cpu(latest_node.gid); + inode->i_tag = je16_to_cpu(latest_node.tag); inode->i_size = je32_to_cpu(latest_node.isize); inode->i_atime = ITIME(je32_to_cpu(latest_node.atime)); inode->i_mtime = ITIME(je32_to_cpu(latest_node.mtime)); @@ -287,6 +335,7 @@ void jffs2_read_inode (struct inode *ino inode->i_op = &jffs2_dir_inode_operations; inode->i_fop = &jffs2_dir_operations; + f->flags = je16_to_cpu(latest_node.flags); break; } case S_IFREG: @@ -294,6 +343,7 @@ void jffs2_read_inode (struct inode *ino inode->i_fop = &jffs2_file_operations; inode->i_mapping->a_ops = &jffs2_file_address_operations; inode->i_mapping->nrpages = 0; + f->flags = je16_to_cpu(latest_node.flags); break; case S_IFBLK: @@ -330,7 +380,7 @@ void jffs2_read_inode (struct inode *ino default: printk(KERN_WARNING "jffs2_read_inode(): Bogus imode %o for ino %lu\n", inode->i_mode, (unsigned long)inode->i_ino); } - + jffs2_set_inode_flags(inode); up(&f->sem); D1(printk(KERN_DEBUG "jffs2_read_inode() returning\n")); @@ -347,10 +397,11 @@ void jffs2_dirty_inode(struct inode *ino D1(printk(KERN_DEBUG "jffs2_dirty_inode() calling setattr() for ino #%lu\n", inode->i_ino)); - iattr.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_MTIME|ATTR_CTIME; + iattr.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_MTIME|ATTR_CTIME|ATTR_TAG; iattr.ia_mode = inode->i_mode; iattr.ia_uid = inode->i_uid; iattr.ia_gid = inode->i_gid; + iattr.ia_tag = inode->i_tag; iattr.ia_atime = inode->i_atime; iattr.ia_mtime = inode->i_mtime; iattr.ia_ctime = inode->i_ctime; @@ -424,6 +475,7 @@ struct inode *jffs2_new_inode (struct in memset(ri, 0, sizeof(*ri)); /* Set OS-specific defaults for new inodes */ + ri->tag = cpu_to_je16(dx_current_tag()); ri->uid = cpu_to_je16(current->fsuid); if (dir_i->i_mode & S_ISGID) { @@ -445,14 +497,16 @@ struct inode *jffs2_new_inode (struct in inode->i_mode = jemode_to_cpu(ri->mode); inode->i_gid = je16_to_cpu(ri->gid); inode->i_uid = je16_to_cpu(ri->uid); + inode->i_tag = je16_to_cpu(ri->tag); inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; ri->atime = ri->mtime = ri->ctime = cpu_to_je32(I_SEC(inode->i_mtime)); inode->i_blocks = 0; inode->i_size = 0; + f->flags = je16_to_cpu(ri->flags); + jffs2_set_inode_flags(inode); insert_inode_hash(inode); - return inode; } --- linux-2.6.20/fs/jffs2/gc.c 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/gc.c 2007-02-09 02:43:40 +0100 @@ -736,6 +736,7 @@ static int jffs2_garbage_collect_metadat ri.mode = cpu_to_jemode(JFFS2_F_I_MODE(f)); ri.uid = cpu_to_je16(JFFS2_F_I_UID(f)); ri.gid = cpu_to_je16(JFFS2_F_I_GID(f)); + ri.tag = cpu_to_je16(JFFS2_F_I_TAG(f)); ri.isize = cpu_to_je32(ilen); ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ri.ctime = cpu_to_je32(JFFS2_F_I_CTIME(f)); @@ -999,6 +1000,7 @@ static int jffs2_garbage_collect_hole(st ri.mode = cpu_to_jemode(JFFS2_F_I_MODE(f)); ri.uid = cpu_to_je16(JFFS2_F_I_UID(f)); ri.gid = cpu_to_je16(JFFS2_F_I_GID(f)); + ri.tag = cpu_to_je16(JFFS2_F_I_TAG(f)); ri.isize = cpu_to_je32(ilen); ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ri.ctime = cpu_to_je32(JFFS2_F_I_CTIME(f)); @@ -1257,6 +1259,7 @@ static int jffs2_garbage_collect_dnode(s ri.mode = cpu_to_jemode(JFFS2_F_I_MODE(f)); ri.uid = cpu_to_je16(JFFS2_F_I_UID(f)); ri.gid = cpu_to_je16(JFFS2_F_I_GID(f)); + ri.tag = cpu_to_je16(JFFS2_F_I_TAG(f)); ri.isize = cpu_to_je32(JFFS2_F_I_SIZE(f)); ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f)); ri.ctime = cpu_to_je32(JFFS2_F_I_CTIME(f)); --- linux-2.6.20/fs/jffs2/ioctl.c 2006-01-03 17:29:56 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/ioctl.c 2007-02-09 02:43:40 +0100 @@ -12,12 +12,66 @@ */ #include +#include +#include +#include +#include +#include "jffs2_fs_sb.h" +#include "jffs2_fs_i.h" +#include "acl.h" +#include "os-linux.h" + +extern void jffs2_set_inode_flags(struct inode *); int jffs2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { - /* Later, this will provide for lsattr.jffs2 and chattr.jffs2, which - will include compression support etc. */ - return -ENOTTY; + struct jffs2_inode_info *j = JFFS2_INODE_INFO(inode); + unsigned int flags, oldflags, newflags; + + switch (cmd) { + case JFFS2_IOC_GETFLAGS: + flags = j->flags & JFFS2_USER_VISIBLE; + return put_user(flags, (int __user *) arg); + + case JFFS2_IOC_SETFLAGS: + if (IS_RDONLY(inode) || + (filp && MNT_IS_RDONLY(filp->f_vfsmnt))) + return -EROFS; + + if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) + return -EACCES; + + if (get_user(flags, (int __user *) arg)) + return -EFAULT; + + oldflags = j->flags; + newflags = flags & JFFS2_USER_MODIFIABLE; + newflags |= oldflags & ~JFFS2_USER_MODIFIABLE; + + /* + * The IMMUTABLE flags can only be changed by + * the relevant capability. + */ + if (((oldflags ^ newflags) & + (JFFS2_INO_FLAG_IMMUTABLE | JFFS2_INO_FLAG_IUNLINK)) || + (oldflags & JFFS2_INO_FLAG_IMMUTABLE)) { + if (!capable(CAP_LINUX_IMMUTABLE)) + return -EPERM; + } + + if (oldflags ^ newflags) { + j->flags = newflags; + inode->i_ctime = CURRENT_TIME; + /* strange requirement, see jffs2_dirty_inode() */ + inode->i_state |= I_DIRTY_DATASYNC; + mark_inode_dirty(inode); + jffs2_set_inode_flags(inode); + } + return 0; + + default: + return -ENOTTY; + } } --- linux-2.6.20/fs/jffs2/jffs2_fs_sb.h 2006-09-20 16:58:35 +0200 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/jffs2_fs_sb.h 2007-02-09 02:43:40 +0100 @@ -30,6 +30,7 @@ struct jffs2_sb_info { uint32_t checked_ino; unsigned int flags; + unsigned int s_mount_opt; struct task_struct *gc_task; /* GC task struct */ struct completion gc_thread_start; /* GC thread start completion */ --- linux-2.6.20/fs/jffs2/nodelist.h 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/nodelist.h 2007-02-09 02:43:40 +0100 @@ -46,19 +46,19 @@ #elif defined(JFFS2_BIG_ENDIAN) #define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) -#define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) +#define cpu_to_jemode(x) ((jmode_t){cpu_to_be16(os_to_jffs2_mode(x))}) #define je16_to_cpu(x) (be16_to_cpu(x.v16)) #define je32_to_cpu(x) (be32_to_cpu(x.v32)) -#define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) +#define jemode_to_cpu(x) (be16_to_cpu(jffs2_to_os_mode((x).m))) #elif defined(JFFS2_LITTLE_ENDIAN) #define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) -#define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) +#define cpu_to_jemode(x) ((jmode_t){cpu_to_le16(os_to_jffs2_mode(x))}) #define je16_to_cpu(x) (le16_to_cpu(x.v16)) #define je32_to_cpu(x) (le32_to_cpu(x.v32)) -#define jemode_to_cpu(x) (le32_to_cpu(jffs2_to_os_mode((x).m))) +#define jemode_to_cpu(x) (le16_to_cpu(jffs2_to_os_mode((x).m))) #else #error wibble #endif --- linux-2.6.20/fs/jffs2/os-linux.h 2006-09-20 16:58:35 +0200 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/os-linux.h 2007-02-09 02:43:40 +0100 @@ -31,6 +31,7 @@ struct kvec; #define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode) #define JFFS2_F_I_UID(f) (OFNI_EDONI_2SFFJ(f)->i_uid) #define JFFS2_F_I_GID(f) (OFNI_EDONI_2SFFJ(f)->i_gid) +#define JFFS2_F_I_TAG(f) (OFNI_EDONI_2SFFJ(f)->i_tag) #define JFFS2_F_I_RDEV(f) (OFNI_EDONI_2SFFJ(f)->i_rdev) #define ITIME(sec) ((struct timespec){sec, 0}) @@ -200,6 +201,9 @@ int jffs2_flash_direct_writev(struct jff int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char *buf); +#define JFFS2_IOC_GETFLAGS FS_IOC_GETFLAGS +#define JFFS2_IOC_SETFLAGS FS_IOC_SETFLAGS + #endif /* __JFFS2_OS_LINUX_H__ */ --- linux-2.6.20/fs/jffs2/readinode.c 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/readinode.c 2007-02-09 02:43:40 +0100 @@ -759,6 +759,8 @@ static int jffs2_do_read_inode_internal( latest_node->isize = cpu_to_je32(0); latest_node->gid = cpu_to_je16(0); latest_node->uid = cpu_to_je16(0); + latest_node->tag = cpu_to_je16(0); + latest_node->flags = cpu_to_je16(0); if (f->inocache->state == INO_STATE_READING) jffs2_set_inocache_state(c, f->inocache, INO_STATE_PRESENT); return 0; --- linux-2.6.20/fs/jffs2/super.c 2007-02-06 03:01:23 +0100 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/super.c 2007-02-09 02:43:40 +0100 @@ -24,6 +24,7 @@ #include #include #include +#include #include "compr.h" #include "nodelist.h" @@ -111,6 +112,58 @@ static int jffs2_sb_set(struct super_blo return 0; } +enum { + Opt_tag, Opt_notag, Opt_tagid, Opt_ignore, Opt_err +}; + +static match_table_t tokens = { + {Opt_tag, "tag"}, + {Opt_notag, "notag"}, + {Opt_tagid, "tagid=%u"}, + {Opt_tag, "tagxid"}, + {Opt_err, NULL} +}; + +static int parse_options (char * options, + struct jffs2_sb_info *sbi) +{ + char * p; + substring_t args[MAX_OPT_ARGS]; + + if (!options) + return 1; + + while ((p = strsep (&options, ",")) != NULL) { + int token; + if (!*p) + continue; + + token = match_token(p, tokens, args); + switch (token) { +#ifndef CONFIG_TAGGING_NONE + case Opt_tag: + set_opt (sbi->s_mount_opt, TAGGED); + break; + case Opt_notag: + clear_opt (sbi->s_mount_opt, TAGGED); + break; +#endif +#ifdef CONFIG_PROPAGATE + case Opt_tagid: + /* use args[0] */ + set_opt (sbi->s_mount_opt, TAGGED); + break; +#endif + case Opt_ignore: + break; + default: + return 0; + } + } + return 1; +} + + static int jffs2_get_sb_mtd(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct mtd_info *mtd, @@ -156,25 +209,32 @@ static int jffs2_get_sb_mtd(struct file_ #ifdef CONFIG_JFFS2_FS_POSIX_ACL sb->s_flags |= MS_POSIXACL; #endif - ret = jffs2_do_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); + ret = -EINVAL; + if (!parse_options ((char *) data, c)) + goto failed_mount; - if (ret) { - /* Failure case... */ - up_write(&sb->s_umount); - deactivate_super(sb); - return ret; - } + ret = jffs2_do_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); + if (ret) + goto failed_mount; + if (c->s_mount_opt & JFFS2_MOUNT_TAGGED) + sb->s_flags |= MS_TAGGED; sb->s_flags |= MS_ACTIVE; return simple_set_mnt(mnt, sb); out_error: ret = PTR_ERR(sb); - out_put: +out_put: kfree(c); put_mtd_device(mtd); return ret; + +failed_mount: + /* Failure case... */ + up_write(&sb->s_umount); + deactivate_super(sb); + return ret; } static int jffs2_get_sb_mtdnr(struct file_system_type *fs_type, --- linux-2.6.20/fs/jffs2/write.c 2006-09-20 16:58:35 +0200 +++ linux-2.6.20-vs2.3.0.10.1/fs/jffs2/write.c 2007-02-09 02:43:40 +0100 @@ -46,6 +46,7 @@ int jffs2_do_new_inode(struct jffs2_sb_i ri->totlen = cpu_to_je32(PAD(sizeof(*ri))); ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); ri->mode = cpu_to_jemode(mode); + ri->flags = cpu_to_je16(0); f->highest_version = 1; ri->version = cpu_to_je32(f->highest_version); --- linux-2.6.20/include/linux/jffs2.h 2006-11-30 21:19:38 +0100 +++ linux-2.6.20-vs2.3.0.10.1/include/linux/jffs2.h 2007-02-09 02:43:40 +0100 @@ -82,12 +82,36 @@ //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) -#define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at +#define JFFS2_INO_FLAG_PREREAD 0x01 /* Do read_inode() for this one at mount time, don't wait for it to happen later */ -#define JFFS2_INO_FLAG_USERCOMPR 2 /* User has requested a specific +#define JFFS2_INO_FLAG_USERCOMPR 0x02 /* User has requested a specific compression type */ +#define JFFS2_INO_FLAG_IMMUTABLE 0x10 /* immutable node */ +#define JFFS2_INO_FLAG_IUNLINK 0x20 /* immutable unlink */ +#define JFFS2_INO_FLAG_BARRIER 0x40 /* barrier */ + +#define JFFS2_USER_VISIBLE 0x10 +#define JFFS2_USER_MODIFIABLE 0x10 + +/* + * Mount flags + */ +#define JFFS2_MOUNT_TAGGED (1<<24) /* Enable Context Tags */ + +#define clear_opt(o, opt) o &= ~JFFS2_MOUNT_##opt +#define set_opt(o, opt) o |= JFFS2_MOUNT_##opt + +/* + * Maximal mount counts between two filesystem checks + */ +#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */ +#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */ + +/* + * Behaviour when detecting errors + */ /* These can go once we've made sure we've caught all uses without byteswapping */ @@ -97,7 +121,7 @@ typedef struct { } __attribute__((packed)) jint32_t; typedef struct { - uint32_t m; + uint16_t m; } __attribute__((packed)) jmode_t; typedef struct { @@ -145,7 +169,8 @@ struct jffs2_raw_inode jint32_t hdr_crc; jint32_t ino; /* Inode number. */ jint32_t version; /* Version number. */ - jmode_t mode; /* The file's type or mode. */ + jmode_t mode; /* The file's type or mode. */ + jint16_t tag; /* context tagging */ jint16_t uid; /* The file's owner. */ jint16_t gid; /* The file's group. */ jint32_t isize; /* Total resultant size of this inode (used for truncations) */