Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/geom_io.c
Show First 20 Lines • Show All 498 Lines • ▼ Show 20 Lines | #ifdef DIAGNOSTIC | ||||
bp->_bio_caller1 = bp->bio_caller1; | bp->_bio_caller1 = bp->bio_caller1; | ||||
bp->_bio_caller2 = bp->bio_caller2; | bp->_bio_caller2 = bp->bio_caller2; | ||||
bp->_bio_cflags = bp->bio_cflags; | bp->_bio_cflags = bp->bio_cflags; | ||||
#endif | #endif | ||||
cmd = bp->bio_cmd; | cmd = bp->bio_cmd; | ||||
if (cmd == BIO_READ || cmd == BIO_WRITE || cmd == BIO_GETATTR) { | if (cmd == BIO_READ || cmd == BIO_WRITE || cmd == BIO_GETATTR) { | ||||
KASSERT(bp->bio_data != NULL, | KASSERT(bp->bio_data != NULL, | ||||
("NULL bp->data in g_io_request(cmd=%hhu)", bp->bio_cmd)); | ("NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd)); | ||||
} | } | ||||
if (cmd == BIO_DELETE || cmd == BIO_FLUSH) { | if (cmd == BIO_DELETE || cmd == BIO_FLUSH) { | ||||
KASSERT(bp->bio_data == NULL, | KASSERT(bp->bio_data == NULL, | ||||
("non-NULL bp->data in g_io_request(cmd=%hhu)", | ("non-NULL bp->data in g_io_request(cmd=%hu)", | ||||
bp->bio_cmd)); | bp->bio_cmd)); | ||||
} | } | ||||
if (cmd == BIO_READ || cmd == BIO_WRITE || cmd == BIO_DELETE) { | if (cmd == BIO_READ || cmd == BIO_WRITE || cmd == BIO_DELETE) { | ||||
KASSERT(bp->bio_offset % cp->provider->sectorsize == 0, | KASSERT(bp->bio_offset % cp->provider->sectorsize == 0, | ||||
("wrong offset %jd for sectorsize %u", | ("wrong offset %jd for sectorsize %u", | ||||
bp->bio_offset, cp->provider->sectorsize)); | bp->bio_offset, cp->provider->sectorsize)); | ||||
KASSERT(bp->bio_length % cp->provider->sectorsize == 0, | KASSERT(bp->bio_length % cp->provider->sectorsize == 0, | ||||
("wrong length %jd for sectorsize %u", | ("wrong length %jd for sectorsize %u", | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |