move the error report to a lower log level... Now you can see when it

returns an error without getting every single io that went through it..

MFC after:	1 week
This commit is contained in:
John-Mark Gurney 2013-04-13 19:02:58 +00:00
parent fcb29b9210
commit d7078f3ba0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249440
2 changed files with 5 additions and 4 deletions

View File

@ -124,7 +124,7 @@ g_nop_start(struct bio *bp)
rval = arc4random() % 100;
if (rval < failprob) {
G_NOP_LOGREQ(bp, "Returning error=%d.", sc->sc_error);
G_NOP_LOGREQLVL(1, bp, "Returning error=%d.", sc->sc_error);
g_io_deliver(bp, sc->sc_error);
return;
}

View File

@ -44,9 +44,10 @@
printf("\n"); \
} \
} while (0)
#define G_NOP_LOGREQ(bp, ...) do { \
if (g_nop_debug >= 2) { \
printf("GEOM_NOP[2]: "); \
#define G_NOP_LOGREQ(bp, ...) G_NOP_LOGREQLVL(2, bp, __VA_ARGS__)
#define G_NOP_LOGREQLVL(lvl, bp, ...) do { \
if (g_nop_debug >= (lvl)) { \
printf("GEOM_NOP[%d]: ", (lvl)); \
printf(__VA_ARGS__); \
printf(" "); \
g_print_bio(bp); \