#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
#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 */
#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
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 */
/* super.c */
void check_super_block(e2fsck_t ctx);
int check_backup_super_block(e2fsck_t ctx);
+void check_resize_inode(e2fsck_t ctx);
/* util.c */
extern void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
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,