Whamcloud - gitweb
Merge branch 'maint' into next
[tools/e2fsprogs.git] / e2fsck / e2fsck.h
index 553a8c4..b4a1a88 100644 (file)
@@ -155,6 +155,8 @@ struct resource_track {
 #define E2F_OPT_WRITECHECK     0x0200
 #define E2F_OPT_COMPRESS_DIRS  0x0400
 #define E2F_OPT_FRAGCHECK      0x0800
+#define E2F_OPT_JOURNAL_ONLY   0x1000 /* only replay the journal */
+#define E2F_OPT_DISCARD                0x2000
 
 /*
  * E2fsck flags
@@ -163,6 +165,7 @@ struct resource_track {
 #define E2F_FLAG_CANCEL                0x0002 /* Cancel signaled */
 #define E2F_FLAG_SIGNAL_MASK   0x0003
 #define E2F_FLAG_RESTART       0x0004 /* Restart signaled */
+#define E2F_FLAG_RESTART_LATER 0x0008 /* Restart after all iterations done */
 
 #define E2F_FLAG_SETJMP_OK     0x0010 /* Setjmp valid for abort */
 
@@ -175,6 +178,9 @@ struct resource_track {
 #define E2F_FLAG_RESIZE_INODE  0x0400 /* Request to recreate resize inode */
 #define E2F_FLAG_GOT_DEVSIZE   0x0800 /* Device size has been fetched */
 #define E2F_FLAG_EXITING       0x1000 /* E2fsck exiting due to errors */
+#define E2F_FLAG_TIME_INSANE   0x2000 /* Time is insane */
+
+#define E2F_RESET_FLAGS (E2F_FLAG_TIME_INSANE)
 
 /*
  * Defines for indicating the e2fsck pass number
@@ -206,10 +212,12 @@ struct e2fsck_struct {
        char *io_options;
        int     flags;          /* E2fsck internal flags */
        int     options;
-       blk_t   use_superblock; /* sb requested by user */
-       blk_t   superblock;     /* sb used to open fs */
        int     blocksize;      /* blocksize */
-       blk_t   num_blocks;     /* Total number of blocks */
+       blk64_t use_superblock; /* sb requested by user */
+       blk64_t superblock;     /* sb used to open fs */
+       blk64_t num_blocks;     /* Total number of blocks */
+       blk64_t free_blocks;
+       ino_t   free_inodes;
        int     mount_flags;
        blkid_cache blkid;      /* blkid cache */
 
@@ -487,11 +495,15 @@ extern errcode_t e2fsck_zero_blocks(ext2_filsys fs, blk_t blk, int num,
 extern int fs_proc_check(const char *fs_name);
 extern int check_for_modules(const char *fs_name);
 #ifdef RESOURCE_TRACK
-extern void print_resource_track(const char *desc,
+extern void print_resource_track(e2fsck_t ctx,
+                                const char *desc,
                                 struct resource_track *track,
                                 io_channel channel);
 extern void init_resource_track(struct resource_track *track,
                                io_channel channel);
+#else
+#define print_resource_track(ctx, desc, track, channel) do { } while (0)
+#define init_resource_track(track, channel) do { } while (0)
 #endif
 extern int inode_has_valid_blocks(struct ext2_inode *inode);
 extern void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,