2005-04-17 06:20:36 +08:00
|
|
|
#ifndef _REISER_FS_I
|
|
|
|
#define _REISER_FS_I
|
|
|
|
|
|
|
|
#include <linux/list.h>
|
|
|
|
|
|
|
|
struct reiserfs_journal_list;
|
|
|
|
|
|
|
|
/** bitmasks for i_flags field in reiserfs-specific part of inode */
|
|
|
|
typedef enum {
|
|
|
|
/** this says what format of key do all items (but stat data) of
|
|
|
|
an object have. If this is set, that format is 3.6 otherwise
|
|
|
|
- 3.5 */
|
2005-07-13 11:21:28 +08:00
|
|
|
i_item_key_version_mask = 0x0001,
|
2005-04-17 06:20:36 +08:00
|
|
|
/** If this is unset, object has 3.5 stat data, otherwise, it has
|
|
|
|
3.6 stat data with 64bit size, 32bit nlink etc. */
|
2005-07-13 11:21:28 +08:00
|
|
|
i_stat_data_version_mask = 0x0002,
|
2005-04-17 06:20:36 +08:00
|
|
|
/** file might need tail packing on close */
|
2005-07-13 11:21:28 +08:00
|
|
|
i_pack_on_close_mask = 0x0004,
|
2005-04-17 06:20:36 +08:00
|
|
|
/** don't pack tail of file */
|
2005-07-13 11:21:28 +08:00
|
|
|
i_nopack_mask = 0x0008,
|
2005-04-17 06:20:36 +08:00
|
|
|
/** If those is set, "safe link" was created for this file during
|
|
|
|
truncate or unlink. Safe link is used to avoid leakage of disk
|
|
|
|
space on crash with some files open, but unlinked. */
|
2005-07-13 11:21:28 +08:00
|
|
|
i_link_saved_unlink_mask = 0x0010,
|
|
|
|
i_link_saved_truncate_mask = 0x0020,
|
|
|
|
i_has_xattr_dir = 0x0040,
|
|
|
|
i_data_log = 0x0080,
|
2007-01-23 12:40:46 +08:00
|
|
|
i_ever_mapped = 0x0100
|
2005-04-17 06:20:36 +08:00
|
|
|
} reiserfs_inode_flags;
|
|
|
|
|
|
|
|
struct reiserfs_inode_info {
|
2005-07-13 11:21:28 +08:00
|
|
|
__u32 i_key[4]; /* key is still 4 32 bit integers */
|
2005-04-17 06:20:36 +08:00
|
|
|
/** transient inode flags that are never stored on disk. Bitmasks
|
|
|
|
for this field are defined above. */
|
2005-07-13 11:21:28 +08:00
|
|
|
__u32 i_flags;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-07-13 11:21:28 +08:00
|
|
|
__u32 i_first_direct_byte; // offset of first byte stored in direct item.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-07-13 11:21:28 +08:00
|
|
|
/* copy of persistent inode flags read from sd_attrs. */
|
|
|
|
__u32 i_attrs;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-07-13 11:21:28 +08:00
|
|
|
int i_prealloc_block; /* first unused block of a sequence of unused blocks */
|
|
|
|
int i_prealloc_count; /* length of that sequence */
|
|
|
|
struct list_head i_prealloc_list; /* per-transaction list of inodes which
|
|
|
|
* have preallocated blocks */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-07-13 11:21:28 +08:00
|
|
|
unsigned new_packing_locality:1; /* new_packig_locality is created; new blocks
|
|
|
|
* for the contents of this directory should be
|
|
|
|
* displaced */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-07-13 11:21:28 +08:00
|
|
|
/* we use these for fsync or O_SYNC to decide which transaction
|
|
|
|
** needs to be committed in order for this inode to be properly
|
|
|
|
** flushed */
|
2009-03-31 02:02:17 +08:00
|
|
|
unsigned int i_trans_id;
|
2005-07-13 11:21:28 +08:00
|
|
|
struct reiserfs_journal_list *i_jl;
|
2007-01-23 12:40:46 +08:00
|
|
|
struct mutex i_mmap;
|
2006-09-29 16:59:58 +08:00
|
|
|
#ifdef CONFIG_REISERFS_FS_XATTR
|
2009-03-31 02:02:36 +08:00
|
|
|
struct rw_semaphore i_xattr_sem;
|
2006-09-29 16:59:58 +08:00
|
|
|
#endif
|
2005-07-13 11:21:28 +08:00
|
|
|
struct inode vfs_inode;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|