* [PATCH] kill INDUCE_IO_ERROR
@ 2008-05-23 6:23 Christoph Hellwig
2008-06-16 10:14 ` Christoph Hellwig
2008-07-25 4:30 ` Niv Sardi
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2008-05-23 6:23 UTC (permalink / raw)
To: xfs
All the error injection is already enabled through ifdef DEBUG, so kill
the never set second cpp symbol to activate it without the rest of the
debugging infrastructure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/xfs_error.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_error.c 2008-05-22 18:55:04.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_error.c 2008-05-22 18:55:16.000000000 +0200
@@ -58,9 +58,6 @@ xfs_error_trap(int e)
}
return e;
}
-#endif
-
-#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
int xfs_etest[XFS_NUM_INJECT_ERROR];
int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR];
@@ -154,7 +151,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, i
return 0;
}
-#endif /* DEBUG || INDUCE_IO_ERROR */
+#endif /* DEBUG */
static void
xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
Index: linux-2.6-xfs/fs/xfs/xfs_error.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_error.h 2008-05-22 18:55:04.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_error.h 2008-05-22 18:55:16.000000000 +0200
@@ -125,22 +125,14 @@ extern void xfs_corruption_error(char *t
#define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10)
#define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT
-#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
+#ifdef DEBUG
extern int xfs_error_test(int, int *, char *, int, char *, unsigned long);
#define XFS_NUM_INJECT_ERROR 10
-
-#ifdef __ANSI_CPP__
-#define XFS_TEST_ERROR(expr, mp, tag, rf) \
- ((expr) || \
- xfs_error_test((tag), (mp)->m_fixedfsid, #expr, __LINE__, __FILE__, \
- (rf)))
-#else
#define XFS_TEST_ERROR(expr, mp, tag, rf) \
((expr) || \
xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \
(rf)))
-#endif /* __ANSI_CPP__ */
extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp);
extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud);
@@ -148,7 +140,7 @@ extern int xfs_errortag_clearall(xfs_mou
#define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
#define xfs_errortag_add(tag, mp) (ENOSYS)
#define xfs_errortag_clearall(mp, loud) (ENOSYS)
-#endif /* (DEBUG || INDUCE_IO_ERROR) */
+#endif /* DEBUG */
/*
* XFS panic tags -- allow a call to xfs_cmn_err() be turned into
Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2008-05-22 18:55:05.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2008-05-23 08:11:46.000000000 +0200
@@ -1322,7 +1322,7 @@ xfs_unmountfs(xfs_mount_t *mp)
if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0)
uuid_table_remove(&mp->m_sb.sb_uuid);
-#if defined(DEBUG) || defined(INDUCE_IO_ERROR)
+#if defined(DEBUG)
xfs_errortag_clearall(mp, 0);
#endif
xfs_mount_free(mp);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-05-23 6:23 [PATCH] kill INDUCE_IO_ERROR Christoph Hellwig
@ 2008-06-16 10:14 ` Christoph Hellwig
2008-06-18 4:45 ` Donald Douwsma
2008-07-25 4:30 ` Niv Sardi
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-06-16 10:14 UTC (permalink / raw)
To: xfs
On Fri, May 23, 2008 at 08:23:23AM +0200, Christoph Hellwig wrote:
> All the error injection is already enabled through ifdef DEBUG, so kill
> the never set second cpp symbol to activate it without the rest of the
> debugging infrastructure.
Can I get a review on this absolutely trivial patch?
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6-xfs/fs/xfs/xfs_error.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_error.c 2008-05-22 18:55:04.000000000 +0200
> +++ linux-2.6-xfs/fs/xfs/xfs_error.c 2008-05-22 18:55:16.000000000 +0200
> @@ -58,9 +58,6 @@ xfs_error_trap(int e)
> }
> return e;
> }
> -#endif
> -
> -#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
>
> int xfs_etest[XFS_NUM_INJECT_ERROR];
> int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR];
> @@ -154,7 +151,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, i
>
> return 0;
> }
> -#endif /* DEBUG || INDUCE_IO_ERROR */
> +#endif /* DEBUG */
>
> static void
> xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
> Index: linux-2.6-xfs/fs/xfs/xfs_error.h
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_error.h 2008-05-22 18:55:04.000000000 +0200
> +++ linux-2.6-xfs/fs/xfs/xfs_error.h 2008-05-22 18:55:16.000000000 +0200
> @@ -125,22 +125,14 @@ extern void xfs_corruption_error(char *t
> #define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10)
> #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT
>
> -#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
> +#ifdef DEBUG
> extern int xfs_error_test(int, int *, char *, int, char *, unsigned long);
>
> #define XFS_NUM_INJECT_ERROR 10
> -
> -#ifdef __ANSI_CPP__
> -#define XFS_TEST_ERROR(expr, mp, tag, rf) \
> - ((expr) || \
> - xfs_error_test((tag), (mp)->m_fixedfsid, #expr, __LINE__, __FILE__, \
> - (rf)))
> -#else
> #define XFS_TEST_ERROR(expr, mp, tag, rf) \
> ((expr) || \
> xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \
> (rf)))
> -#endif /* __ANSI_CPP__ */
>
> extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp);
> extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud);
> @@ -148,7 +140,7 @@ extern int xfs_errortag_clearall(xfs_mou
> #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
> #define xfs_errortag_add(tag, mp) (ENOSYS)
> #define xfs_errortag_clearall(mp, loud) (ENOSYS)
> -#endif /* (DEBUG || INDUCE_IO_ERROR) */
> +#endif /* DEBUG */
>
> /*
> * XFS panic tags -- allow a call to xfs_cmn_err() be turned into
> Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2008-05-22 18:55:05.000000000 +0200
> +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2008-05-23 08:11:46.000000000 +0200
> @@ -1322,7 +1322,7 @@ xfs_unmountfs(xfs_mount_t *mp)
> if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0)
> uuid_table_remove(&mp->m_sb.sb_uuid);
>
> -#if defined(DEBUG) || defined(INDUCE_IO_ERROR)
> +#if defined(DEBUG)
> xfs_errortag_clearall(mp, 0);
> #endif
> xfs_mount_free(mp);
---end quoted text---
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-06-16 10:14 ` Christoph Hellwig
@ 2008-06-18 4:45 ` Donald Douwsma
2008-06-18 12:05 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Donald Douwsma @ 2008-06-18 4:45 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> On Fri, May 23, 2008 at 08:23:23AM +0200, Christoph Hellwig wrote:
>> All the error injection is already enabled through ifdef DEBUG, so kill
>> the never set second cpp symbol to activate it without the rest of the
>> debugging infrastructure.
>
> Can I get a review on this absolutely trivial patch?
I'd like to keep INDUCE_IO_ERROR around so we have a way to introduce
ioerrors in release builds during testing.
We could add it to xfs.h with the commented out QUOTADEBUG so people
know we still want to use it.
Don
>>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>>
>> Index: linux-2.6-xfs/fs/xfs/xfs_error.c
>> ===================================================================
>> --- linux-2.6-xfs.orig/fs/xfs/xfs_error.c 2008-05-22 18:55:04.000000000 +0200
>> +++ linux-2.6-xfs/fs/xfs/xfs_error.c 2008-05-22 18:55:16.000000000 +0200
>> @@ -58,9 +58,6 @@ xfs_error_trap(int e)
>> }
>> return e;
>> }
>> -#endif
>> -
>> -#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
>>
>> int xfs_etest[XFS_NUM_INJECT_ERROR];
>> int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR];
>> @@ -154,7 +151,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, i
>>
>> return 0;
>> }
>> -#endif /* DEBUG || INDUCE_IO_ERROR */
>> +#endif /* DEBUG */
>>
>> static void
>> xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
>> Index: linux-2.6-xfs/fs/xfs/xfs_error.h
>> ===================================================================
>> --- linux-2.6-xfs.orig/fs/xfs/xfs_error.h 2008-05-22 18:55:04.000000000 +0200
>> +++ linux-2.6-xfs/fs/xfs/xfs_error.h 2008-05-22 18:55:16.000000000 +0200
>> @@ -125,22 +125,14 @@ extern void xfs_corruption_error(char *t
>> #define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10)
>> #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT
>>
>> -#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
>> +#ifdef DEBUG
>> extern int xfs_error_test(int, int *, char *, int, char *, unsigned long);
>>
>> #define XFS_NUM_INJECT_ERROR 10
>> -
>> -#ifdef __ANSI_CPP__
>> -#define XFS_TEST_ERROR(expr, mp, tag, rf) \
>> - ((expr) || \
>> - xfs_error_test((tag), (mp)->m_fixedfsid, #expr, __LINE__, __FILE__, \
>> - (rf)))
>> -#else
>> #define XFS_TEST_ERROR(expr, mp, tag, rf) \
>> ((expr) || \
>> xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \
>> (rf)))
>> -#endif /* __ANSI_CPP__ */
>>
>> extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp);
>> extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud);
>> @@ -148,7 +140,7 @@ extern int xfs_errortag_clearall(xfs_mou
>> #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
>> #define xfs_errortag_add(tag, mp) (ENOSYS)
>> #define xfs_errortag_clearall(mp, loud) (ENOSYS)
>> -#endif /* (DEBUG || INDUCE_IO_ERROR) */
>> +#endif /* DEBUG */
>>
>> /*
>> * XFS panic tags -- allow a call to xfs_cmn_err() be turned into
>> Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
>> ===================================================================
>> --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2008-05-22 18:55:05.000000000 +0200
>> +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2008-05-23 08:11:46.000000000 +0200
>> @@ -1322,7 +1322,7 @@ xfs_unmountfs(xfs_mount_t *mp)
>> if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0)
>> uuid_table_remove(&mp->m_sb.sb_uuid);
>>
>> -#if defined(DEBUG) || defined(INDUCE_IO_ERROR)
>> +#if defined(DEBUG)
>> xfs_errortag_clearall(mp, 0);
>> #endif
>> xfs_mount_free(mp);
> ---end quoted text---
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-06-18 4:45 ` Donald Douwsma
@ 2008-06-18 12:05 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2008-06-18 12:05 UTC (permalink / raw)
To: Donald Douwsma; +Cc: Christoph Hellwig, xfs
On Wed, Jun 18, 2008 at 02:45:11PM +1000, Donald Douwsma wrote:
> Christoph Hellwig wrote:
> >On Fri, May 23, 2008 at 08:23:23AM +0200, Christoph Hellwig wrote:
> >>All the error injection is already enabled through ifdef DEBUG, so kill
> >>the never set second cpp symbol to activate it without the rest of the
> >>debugging infrastructure.
> >
> >Can I get a review on this absolutely trivial patch?
>
> I'd like to keep INDUCE_IO_ERROR around so we have a way to introduce
> ioerrors in release builds during testing.
>
> We could add it to xfs.h with the commented out QUOTADEBUG so people
> know we still want to use it.
cpp symbols not exposed by Kconfig will never get tested. If you thing
it's really useful for release builds (which don't quite agree with) we
should just enable it unconditionally. It's just in a few places, and
any branch predictor worth it's name should take care of the additional
branches without visible cost.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-05-23 6:23 [PATCH] kill INDUCE_IO_ERROR Christoph Hellwig
2008-06-16 10:14 ` Christoph Hellwig
@ 2008-07-25 4:30 ` Niv Sardi
2008-07-25 4:32 ` Christoph Hellwig
1 sibling, 1 reply; 7+ messages in thread
From: Niv Sardi @ 2008-07-25 4:30 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
looks good, checking it in
--
Niv Sardi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-07-25 4:30 ` Niv Sardi
@ 2008-07-25 4:32 ` Christoph Hellwig
2008-07-25 5:10 ` Donald Douwsma
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-07-25 4:32 UTC (permalink / raw)
To: Niv Sardi; +Cc: Christoph Hellwig, xfs
On Fri, Jul 25, 2008 at 02:30:43PM +1000, Niv Sardi wrote:
> looks good, checking it in
Donald NACKed this one..
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kill INDUCE_IO_ERROR
2008-07-25 4:32 ` Christoph Hellwig
@ 2008-07-25 5:10 ` Donald Douwsma
0 siblings, 0 replies; 7+ messages in thread
From: Donald Douwsma @ 2008-07-25 5:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Niv Sardi, xfs
Christoph Hellwig wrote:
> On Fri, Jul 25, 2008 at 02:30:43PM +1000, Niv Sardi wrote:
>> looks good, checking it in
>
> Donald NACKed this one..
>
Yep, but I changed my mind on it a while ago, the blocklayer
error injection looks like a more useful framework for testing
with release builds.
Niv and I chatted about it and its fine by me.
Don
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-25 5:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-23 6:23 [PATCH] kill INDUCE_IO_ERROR Christoph Hellwig
2008-06-16 10:14 ` Christoph Hellwig
2008-06-18 4:45 ` Donald Douwsma
2008-06-18 12:05 ` Christoph Hellwig
2008-07-25 4:30 ` Niv Sardi
2008-07-25 4:32 ` Christoph Hellwig
2008-07-25 5:10 ` Donald Douwsma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox