]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: force summary counter recalc at next mount
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 5 Oct 2018 02:36:10 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:10 +0000 (21:36 -0500)
Source kernel commit: f467cad95f5e3814fda408dea76eb962ab19685d

Use the "bad summary count" mount flag from the previous patch to skip
writing the unmount record to force log recovery at the next mount,
which will recalculate the summary counters for us.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/inject.c
libxfs/xfs_errortag.h

index 54913cce28d12ed300c93e005ab3cf009f2cc243..2061c95771a0182b91e24b3ae69946720468203f 100644 (file)
@@ -52,11 +52,15 @@ error_tag(char *name)
                { XFS_ERRTAG_LOG_ITEM_PIN,              "log_item_pin" },
                { XFS_ERRTAG_BUF_LRU_REF,               "buf_lru_ref" },
                { XFS_ERRTAG_FORCE_SCRUB_REPAIR,        "force_repair" },
+               { XFS_ERRTAG_FORCE_SUMMARY_RECALC,      "bad_summary" },
                { XFS_ERRTAG_MAX,                       NULL }
        };
        int     count;
 
-       /* If this fails make sure every tag is defined in the array above */
+       /*
+        * If this fails make sure every tag is defined in the array above,
+        * see xfs_errortag_attrs in kernelspace.
+        */
        BUILD_BUG_ON(sizeof(eflags) != (XFS_ERRTAG_MAX + 1) * sizeof(*e));
 
        /* Search for a name */
index b9974e7a8e6eaa76b8e01063ca49db5eafa01814..66077a105cbb7408131a6b9d5580e6a0c12599ca 100644 (file)
@@ -53,7 +53,8 @@
 #define XFS_ERRTAG_LOG_ITEM_PIN                                30
 #define XFS_ERRTAG_BUF_LRU_REF                         31
 #define XFS_ERRTAG_FORCE_SCRUB_REPAIR                  32
-#define XFS_ERRTAG_MAX                                 33
+#define XFS_ERRTAG_FORCE_SUMMARY_RECALC                        33
+#define XFS_ERRTAG_MAX                                 34
 
 /*
  * Random factors for above tags, 1 means always, 2 means 1/2 time, etc.
@@ -91,5 +92,6 @@
 #define XFS_RANDOM_LOG_ITEM_PIN                                1
 #define XFS_RANDOM_BUF_LRU_REF                         2
 #define XFS_RANDOM_FORCE_SCRUB_REPAIR                  1
+#define XFS_RANDOM_FORCE_SUMMARY_RECALC                        1
 
 #endif /* __XFS_ERRORTAG_H_ */