Whamcloud - gitweb
e2fsck: add support for checking the built-in quota files
[tools/e2fsprogs.git] / e2fsck / e2fsck.h
index 4e7fc72..1c1603b 100644 (file)
@@ -61,6 +61,8 @@
 #define P_(singular, plural, n) ((n) == 1 ? (singular) : (plural))
 #endif
 
+#include "quota/mkquota.h"
+
 /*
  * Exit codes used by fsck-type programs
  */
@@ -156,6 +158,7 @@ struct resource_track {
 #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
@@ -211,10 +214,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 */
+       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 */
 
@@ -302,6 +307,10 @@ struct e2fsck_struct {
        io_channel      journal_io;
        char    *journal_name;
 
+       /*
+        * Ext4 quota support
+        */
+       quota_ctx_t qctx;
 #ifdef RESOURCE_TRACK
        /*
         * For timing purposes
@@ -438,6 +447,9 @@ extern int e2fsck_run_ext3_journal(e2fsck_t ctx);
 extern void e2fsck_move_ext3_journal(e2fsck_t ctx);
 extern int e2fsck_fix_ext3_journal_hint(e2fsck_t ctx);
 
+/* quota.c */
+extern void e2fsck_hide_quota(e2fsck_t ctx);
+
 /* pass1.c */
 extern void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
                                    ext2_icount_t *ret);
@@ -472,6 +484,9 @@ extern int region_allocate(region_t region, region_addr_t start, int n);
 errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino);
 void e2fsck_rehash_directories(e2fsck_t ctx);
 
+/* sigcatcher.c */
+void sigcatcher_setup(void);
+
 /* super.c */
 void check_super_block(e2fsck_t ctx);
 int check_backup_super_block(e2fsck_t ctx);