Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
#ifndef _REISER_FS_I
2
#define _REISER_FS_I
3
 
4
#include <linux/list.h>
5
 
6
/** bitmasks for i_flags field in reiserfs-specific part of inode */
7
typedef enum {
8
    /** this says what format of key do all items (but stat data) of
9
      an object have.  If this is set, that format is 3.6 otherwise
10
      - 3.5 */
11
    i_item_key_version_mask    =  0x0001,
12
    /** If this is unset, object has 3.5 stat data, otherwise, it has
13
      3.6 stat data with 64bit size, 32bit nlink etc. */
14
    i_stat_data_version_mask   =  0x0002,
15
    /** file might need tail packing on close */
16
    i_pack_on_close_mask       =  0x0004,
17
    /** don't pack tail of file */
18
    i_nopack_mask              =  0x0008,
19
    /** If those is set, "safe link" was created for this file during
20
      truncate or unlink. Safe link is used to avoid leakage of disk
21
      space on crash with some files open, but unlinked. */
22
    i_link_saved_unlink_mask   =  0x0010,
23
    i_link_saved_truncate_mask =  0x0020
24
} reiserfs_inode_flags;
25
 
26
 
27
struct reiserfs_inode_info {
28
    __u32 i_key [4];/* key is still 4 32 bit integers */
29
    /** transient inode flags that are never stored on disk. Bitmasks
30
      for this field are defined above. */
31
    __u32 i_flags;
32
 
33
    __u32 i_first_direct_byte; // offset of first byte stored in direct item.
34
 
35
    /* copy of persistent inode flags read from sd_attrs. */
36
    __u32 i_attrs;
37
 
38
    int i_prealloc_block; /* first unused block of a sequence of unused blocks */
39
    int i_prealloc_count; /* length of that sequence */
40
    struct list_head i_prealloc_list; /* per-transaction list of inodes which
41
                                       * have preallocated blocks */
42
 
43
    int new_packing_locality:1;       /* new_packig_locality is created; new blocks
44
                                       * for the contents of this directory should be
45
                                       * displaced */
46
 
47
    /* we use these for fsync or O_SYNC to decide which transaction
48
    ** needs to be committed in order for this inode to be properly
49
    ** flushed */
50
    unsigned long i_trans_id ;
51
    unsigned long i_trans_index ;
52
    struct inode vfs_inode;
53
};
54
 
55
#endif