From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@redhat.com, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 3/5] xfs_io: pull xfs errortag definitions from libxfs
Date: Fri, 17 Nov 2017 11:56:59 -0800 [thread overview]
Message-ID: <151094861922.27182.7656317389319451444.stgit@magnolia> (raw)
In-Reply-To: <151094860143.27182.12022983202520916281.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Use the libxfs definitions, don't provide our own.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
include/libxfs.h | 1 +
io/inject.c | 35 ++---------------------------------
2 files changed, 3 insertions(+), 33 deletions(-)
diff --git a/include/libxfs.h b/include/libxfs.h
index 6d08da4..abb01cb 100644
--- a/include/libxfs.h
+++ b/include/libxfs.h
@@ -61,6 +61,7 @@ extern uint32_t crc32c_le(uint32_t crc, unsigned char const *p, size_t len);
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
+#include "xfs_errortag.h"
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
#include "xfs_dir2.h"
diff --git a/io/inject.c b/io/inject.c
index 964ebfe..9d0cf62 100644
--- a/io/inject.c
+++ b/io/inject.c
@@ -20,6 +20,7 @@
#include "input.h"
#include "init.h"
#include "io.h"
+#include "xfs_errortag.h"
static cmdinfo_t inject_cmd;
@@ -29,70 +30,38 @@ error_tag(char *name)
static struct {
int tag;
char *name;
- } *e, eflags[] = {
-#define XFS_ERRTAG_NOERROR 0
+ } *e, eflags[XFS_ERRTAG_MAX + 1] = {
{ XFS_ERRTAG_NOERROR, "noerror" },
-#define XFS_ERRTAG_IFLUSH_1 1
{ XFS_ERRTAG_IFLUSH_1, "iflush1" },
-#define XFS_ERRTAG_IFLUSH_2 2
{ XFS_ERRTAG_IFLUSH_2, "iflush2" },
-#define XFS_ERRTAG_IFLUSH_3 3
{ XFS_ERRTAG_IFLUSH_3, "iflush3" },
-#define XFS_ERRTAG_IFLUSH_4 4
{ XFS_ERRTAG_IFLUSH_4, "iflush4" },
-#define XFS_ERRTAG_IFLUSH_5 5
{ XFS_ERRTAG_IFLUSH_5, "iflush5" },
-#define XFS_ERRTAG_IFLUSH_6 6
{ XFS_ERRTAG_IFLUSH_6, "iflush6" },
-#define XFS_ERRTAG_DA_READ_BUF 7
{ XFS_ERRTAG_DA_READ_BUF, "dareadbuf" },
-#define XFS_ERRTAG_BTREE_CHECK_LBLOCK 8
{ XFS_ERRTAG_BTREE_CHECK_LBLOCK, "btree_chk_lblk" },
-#define XFS_ERRTAG_BTREE_CHECK_SBLOCK 9
{ XFS_ERRTAG_BTREE_CHECK_SBLOCK, "btree_chk_sblk" },
-#define XFS_ERRTAG_ALLOC_READ_AGF 10
{ XFS_ERRTAG_ALLOC_READ_AGF, "readagf" },
-#define XFS_ERRTAG_IALLOC_READ_AGI 11
{ XFS_ERRTAG_IALLOC_READ_AGI, "readagi" },
-#define XFS_ERRTAG_ITOBP_INOTOBP 12
{ XFS_ERRTAG_ITOBP_INOTOBP, "itobp" },
-#define XFS_ERRTAG_IUNLINK 13
{ XFS_ERRTAG_IUNLINK, "iunlink" },
-#define XFS_ERRTAG_IUNLINK_REMOVE 14
{ XFS_ERRTAG_IUNLINK_REMOVE, "iunlinkrm" },
-#define XFS_ERRTAG_DIR_INO_VALIDATE 15
{ XFS_ERRTAG_DIR_INO_VALIDATE, "dirinovalid" },
-#define XFS_ERRTAG_BULKSTAT_READ_CHUNK 16
{ XFS_ERRTAG_BULKSTAT_READ_CHUNK, "bulkstat" },
-#define XFS_ERRTAG_IODONE_IOERR 17
{ XFS_ERRTAG_IODONE_IOERR, "logiodone" },
-#define XFS_ERRTAG_STRATREAD_IOERR 18
{ XFS_ERRTAG_STRATREAD_IOERR, "stratread" },
-#define XFS_ERRTAG_STRATCMPL_IOERR 19
{ XFS_ERRTAG_STRATCMPL_IOERR, "stratcmpl" },
-#define XFS_ERRTAG_DIOWRITE_IOERR 20
{ XFS_ERRTAG_DIOWRITE_IOERR, "diowrite" },
-#define XFS_ERRTAG_BMAPIFORMAT 21
{ XFS_ERRTAG_BMAPIFORMAT, "bmapifmt" },
-#define XFS_ERRTAG_FREE_EXTENT 22
{ XFS_ERRTAG_FREE_EXTENT, "free_extent" },
-#define XFS_ERRTAG_RMAP_FINISH_ONE 23
{ XFS_ERRTAG_RMAP_FINISH_ONE, "rmap_finish_one" },
-#define XFS_ERRTAG_REFCOUNT_CONTINUE_UPDATE 24
{ XFS_ERRTAG_REFCOUNT_CONTINUE_UPDATE, "refcount_continue_update" },
-#define XFS_ERRTAG_REFCOUNT_FINISH_ONE 25
{ XFS_ERRTAG_REFCOUNT_FINISH_ONE, "refcount_finish_one" },
-#define XFS_ERRTAG_BMAP_FINISH_ONE 26
{ XFS_ERRTAG_BMAP_FINISH_ONE, "bmap_finish_one" },
-#define XFS_ERRTAG_AG_RESV_CRITICAL 27
{ XFS_ERRTAG_AG_RESV_CRITICAL, "ag_resv_critical" },
-#define XFS_ERRTAG_DROP_WRITES 28
{ XFS_ERRTAG_DROP_WRITES, "drop_writes" },
-#define XFS_ERRTAG_LOG_BAD_CRC 29
{ XFS_ERRTAG_LOG_BAD_CRC, "log_bad_crc" },
-#define XFS_ERRTAG_LOG_ITEM_PIN 30
{ XFS_ERRTAG_LOG_ITEM_PIN, "log_item_pin" },
-#define XFS_ERRTAG_MAX 31
{ XFS_ERRTAG_MAX, NULL }
};
int count;
next prev parent reply other threads:[~2017-11-17 19:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 19:56 [PATCH 0/5] xfsprogs: 4.15 rollup Darrick J. Wong
2017-11-17 19:56 ` [PATCH 1/5] xfs_db: print structure padding fields consistently Darrick J. Wong
2017-11-30 21:37 ` Eric Sandeen
2017-11-30 21:51 ` Darrick J. Wong
2017-11-30 21:57 ` Eric Sandeen
2017-11-30 22:01 ` Darrick J. Wong
2017-12-04 23:54 ` [PATCH 1/5 V2] " Eric Sandeen
2017-12-04 23:56 ` Darrick J. Wong
2017-11-17 19:56 ` [PATCH 2/5] xfs_db: add missing padding fields Darrick J. Wong
2017-12-04 23:54 ` [PATCH 2/5 V2] " Eric Sandeen
2017-12-04 23:56 ` Darrick J. Wong
2017-11-17 19:56 ` Darrick J. Wong [this message]
2017-11-30 21:40 ` [PATCH 3/5] xfs_io: pull xfs errortag definitions from libxfs Eric Sandeen
2017-11-17 19:57 ` [PATCH 4/5] xfs_io: provide an interface to the scrub ioctls Darrick J. Wong
2017-12-01 3:46 ` Eric Sandeen
2017-12-01 17:02 ` Darrick J. Wong
2017-12-01 16:06 ` Eric Sandeen
2017-12-01 17:03 ` Darrick J. Wong
2017-12-01 19:02 ` [PATCH v2 " Darrick J. Wong
2017-12-04 21:19 ` Eric Sandeen
2017-11-17 19:57 ` [PATCH 5/5] man: describe the metadata scrubbing ioctl Darrick J. Wong
2017-12-01 4:34 ` Eric Sandeen
2017-12-01 5:00 ` Eric Sandeen
2017-12-01 18:12 ` Darrick J. Wong
2017-12-01 19:03 ` [PATCH v2 " Darrick J. Wong
2017-12-04 21:19 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=151094861922.27182.7656317389319451444.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.