Whamcloud - gitweb
e2fsck: add support for expanding the inode size
[tools/e2fsprogs.git] / e2fsck / e2fsck.h
index cd5cba2..63d5b96 100644 (file)
@@ -197,6 +197,7 @@ struct resource_track {
 #define E2F_FLAG_TIME_INSANE   0x2000 /* Time is insane */
 #define E2F_FLAG_PROBLEMS_FIXED        0x4000 /* At least one problem was fixed */
 #define E2F_FLAG_ALLOC_OK      0x8000 /* Can we allocate blocks? */
+#define E2F_FLAG_EXPAND_EISIZE 0x10000 /* Expand the inodes (i_extra_isize) */
 
 #define E2F_RESET_FLAGS (E2F_FLAG_TIME_INSANE | E2F_FLAG_PROBLEMS_FIXED)
 
@@ -210,6 +211,17 @@ struct resource_track {
 #define E2F_PASS_5     5
 #define E2F_PASS_1B    6
 
+enum shared_opt {
+       E2F_SHARED_PRESERVE = 0,
+       E2F_SHARED_DELETE,
+       E2F_SHARED_LPF
+};
+
+enum clone_opt {
+       E2F_CLONE_DUP = 0,
+       E2F_CLONE_ZERO
+};
+
 /*
  * Define the extended attribute refcount structure
  */
@@ -384,10 +396,21 @@ struct e2fsck_struct {
        time_t now;
        time_t time_fudge;      /* For working around buggy init scripts */
        int ext_attr_ver;
+       enum shared_opt shared;
+       enum clone_opt clone;
        profile_t       profile;
        int blocks_per_page;
        ext2_u32_list encrypted_dirs;
 
+       /* Expand large inodes to atleast these many bytes */
+       int want_extra_isize;
+       /* minimum i_extra_isize found in used inodes. Should not be lesser
+        * than s_min_extra_isize.
+        */
+       __u32 min_extra_isize;
+       int fs_unexpanded_inodes;
+       ext2fs_inode_bitmap expand_eisize_map;
+
        /* Reserve blocks for root and l+f re-creation */
        blk64_t root_repair_block, lnf_repair_block;