* [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs
@ 2017-11-11 1:43 Darrick J. Wong
2017-11-11 9:02 ` Christoph Hellwig
2017-11-12 23:14 ` Dave Chinner
0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-11-11 1:43 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
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 e5e1523..2c98710 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;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs
2017-11-11 1:43 [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs Darrick J. Wong
@ 2017-11-11 9:02 ` Christoph Hellwig
2017-11-12 23:14 ` Dave Chinner
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-11-11 9:02 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Eric Sandeen, xfs
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs
2017-11-11 1:43 [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs Darrick J. Wong
2017-11-11 9:02 ` Christoph Hellwig
@ 2017-11-12 23:14 ` Dave Chinner
1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2017-11-12 23:14 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Eric Sandeen, xfs
On Fri, Nov 10, 2017 at 05:43:14PM -0800, Darrick J. Wong wrote:
> 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>
Looks good, will fix the merge problem I mentioned on #xfs.:)
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-12 23:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-11 1:43 [PATCH for 4.15] xfs_io: pull xfs errortag definitions from libxfs Darrick J. Wong
2017-11-11 9:02 ` Christoph Hellwig
2017-11-12 23:14 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).