]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - io/inject.c
xfs_io: add buf_lru_ref tag to inject table
[thirdparty/xfsprogs-dev.git] / io / inject.c
index 9d0cf62ba127fccff8ed829ef6338586286bbcd5..fc3cf25639cc2fc1803bb89fa95cee2f6edb3a1e 100644 (file)
@@ -30,7 +30,7 @@ error_tag(char *name)
        static struct {
                int     tag;
                char    *name;
-       } *e, eflags[XFS_ERRTAG_MAX + 1] = {
+       } *e, eflags[] = {
                { XFS_ERRTAG_NOERROR,                   "noerror" },
                { XFS_ERRTAG_IFLUSH_1,                  "iflush1" },
                { XFS_ERRTAG_IFLUSH_2,                  "iflush2" },
@@ -62,10 +62,14 @@ error_tag(char *name)
                { XFS_ERRTAG_DROP_WRITES,               "drop_writes" },
                { XFS_ERRTAG_LOG_BAD_CRC,               "log_bad_crc" },
                { XFS_ERRTAG_LOG_ITEM_PIN,              "log_item_pin" },
+               { XFS_ERRTAG_BUF_LRU_REF,               "buf_lru_ref" },
                { XFS_ERRTAG_MAX,                       NULL }
        };
        int     count;
 
+       /* If this fails make sure every tag is defined in the array above */
+       BUILD_BUG_ON(sizeof(eflags) != (XFS_ERRTAG_MAX + 1) * sizeof(*e));
+
        /* Search for a name */
        if (name) {
                for (e = eflags; e->name; e++)