Index: geom_io.c =================================================================== --- geom_io.c (wersja 195169) +++ geom_io.c (kopia robocza) @@ -480,14 +481,6 @@ KASSERT(bp != NULL, ("NULL bp in g_io_deliver")); pp = bp->bio_to; KASSERT(pp != NULL, ("NULL bio_to in g_io_deliver")); -#ifdef DIAGNOSTIC - KASSERT(bp->bio_caller1 == bp->_bio_caller1, - ("bio_caller1 used by the provider %s", pp->name)); - KASSERT(bp->bio_caller2 == bp->_bio_caller2, - ("bio_caller2 used by the provider %s", pp->name)); - KASSERT(bp->bio_cflags == bp->_bio_cflags, - ("bio_cflags used by the provider %s", pp->name)); -#endif cp = bp->bio_from; if (cp == NULL) { bp->bio_error = error; @@ -496,6 +489,20 @@ } KASSERT(cp != NULL, ("NULL bio_from in g_io_deliver")); KASSERT(cp->geom != NULL, ("NULL bio_from->geom in g_io_deliver")); +#ifdef DIAGNOSTIC + /* + * GJournal can modify bio's private fields while the bio is in + * transit and provider is not the one to blame. + */ + if (strcmp(bp->bio_from->geom->class->name, "JOURNAL") != 0) { + KASSERT(bp->bio_caller1 == bp->_bio_caller1, + ("bio_caller1 used by the provider %s", pp->name)); + KASSERT(bp->bio_caller2 == bp->_bio_caller2, + ("bio_caller2 used by the provider %s", pp->name)); + KASSERT(bp->bio_cflags == bp->_bio_cflags, + ("bio_cflags used by the provider %s", pp->name)); + } +#endif KASSERT(bp->bio_completed >= 0, ("bio_completed can't be less than 0")); KASSERT(bp->bio_completed <= bp->bio_length, ("bio_completed can't be greater than bio_length"));