reiserfs_fs_i.h 2.2 KB

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