Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/md/md.c
| Show First 20 Lines • Show All 640 Lines • ▼ Show 20 Lines | mdstart_malloc(struct md_s *sc, struct bio *bp) | ||||
| off_t secno, nsec, uc; | off_t secno, nsec, uc; | ||||
| uintptr_t sp, osp; | uintptr_t sp, osp; | ||||
| switch (bp->bio_cmd) { | switch (bp->bio_cmd) { | ||||
| case BIO_READ: | case BIO_READ: | ||||
| case BIO_WRITE: | case BIO_WRITE: | ||||
| case BIO_DELETE: | case BIO_DELETE: | ||||
| break; | break; | ||||
| case BIO_FLUSH: | |||||
| return (0); | |||||
| default: | default: | ||||
| return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
| } | } | ||||
| notmapped = (bp->bio_flags & BIO_UNMAPPED) != 0; | notmapped = (bp->bio_flags & BIO_UNMAPPED) != 0; | ||||
| vlist = (bp->bio_flags & BIO_VLIST) != 0 ? | vlist = (bp->bio_flags & BIO_VLIST) != 0 ? | ||||
| (bus_dma_segment_t *)bp->bio_data : NULL; | (bus_dma_segment_t *)bp->bio_data : NULL; | ||||
| if (notmapped) { | if (notmapped) { | ||||
| ▲ Show 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | mdstart_swap(struct md_s *sc, struct bio *bp) | ||||
| bus_dma_segment_t *vlist; | bus_dma_segment_t *vlist; | ||||
| int rv, ma_offs, offs, len, lastend; | int rv, ma_offs, offs, len, lastend; | ||||
| switch (bp->bio_cmd) { | switch (bp->bio_cmd) { | ||||
| case BIO_READ: | case BIO_READ: | ||||
| case BIO_WRITE: | case BIO_WRITE: | ||||
| case BIO_DELETE: | case BIO_DELETE: | ||||
| break; | break; | ||||
| case BIO_FLUSH: | |||||
| return (0); | |||||
| default: | default: | ||||
| return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
| } | } | ||||
| p = bp->bio_data; | p = bp->bio_data; | ||||
| ma_offs = (bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0 ? | ma_offs = (bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0 ? | ||||
| bp->bio_ma_offset : 0; | bp->bio_ma_offset : 0; | ||||
| vlist = (bp->bio_flags & BIO_VLIST) != 0 ? | vlist = (bp->bio_flags & BIO_VLIST) != 0 ? | ||||
| ▲ Show 20 Lines • Show All 1,135 Lines • Show Last 20 Lines | |||||