jffs2_fs_i.h 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 * JFFS2 -- Journalling Flash File System, Version 2.
 *
 * Copyright © 2001-2007 Red Hat, Inc.
 *
 * Created by David Woodhouse <dwmw2@infradead.org>
 *
 * For licensing information, see the file 'LICENCE' in this directory.
 *
 */
L
Linus Torvalds 已提交
11 12 13 14 15 16

#ifndef _JFFS2_FS_I
#define _JFFS2_FS_I

#include <linux/version.h>
#include <linux/rbtree.h>
17
#include <linux/posix_acl.h>
18
#include <linux/semaphore.h>
L
Linus Torvalds 已提交
19 20

struct jffs2_inode_info {
21
	/* We need an internal mutex similar to inode->i_mutex.
L
Linus Torvalds 已提交
22 23 24
	   Unfortunately, we can't used the existing one, because
	   either the GC would deadlock, or we'd have to release it
	   before letting GC proceed. Or we'd have to put ugliness
25
	   into the GC code so it didn't attempt to obtain the i_mutex
L
Linus Torvalds 已提交
26
	   for the inode(s) which are already locked */
27
	struct mutex sem;
L
Linus Torvalds 已提交
28 29 30 31 32 33 34 35 36 37

	/* The highest (datanode) version number used for this ino */
	uint32_t highest_version;

	/* List of data fragments which make up the file */
	struct rb_root fragtree;

	/* There may be one datanode which isn't referenced by any of the
	   above fragments, if it contains a metadata update but no actual
	   data - or if this is a directory inode */
38
	/* This also holds the _only_ dnode for symlinks/device nodes,
L
Linus Torvalds 已提交
39 40 41 42 43 44
	   etc. */
	struct jffs2_full_dnode *metadata;

	/* Directory entries */
	struct jffs2_full_dirent *dents;

45 46 47
	/* The target path if this is the inode of a symlink */
	unsigned char *target;

L
Linus Torvalds 已提交
48 49 50 51 52 53
	/* Some stuff we just have to keep in-core at all times, for each inode. */
	struct jffs2_inode_cache *inocache;

	uint16_t flags;
	uint8_t usercompr;
	struct inode vfs_inode;
54 55 56 57
#ifdef CONFIG_JFFS2_FS_POSIX_ACL
	struct posix_acl *i_acl_access;
	struct posix_acl *i_acl_default;
#endif
L
Linus Torvalds 已提交
58 59 60
};

#endif /* _JFFS2_FS_I */