Lines Matching refs:bp

141 g_slice_finish_hot(struct bio *bp)
150 KASSERT(bp->bio_to != NULL,
151 ("NULL bio_to in g_slice_finish_hot(%p)", bp));
152 KASSERT(bp->bio_from != NULL,
153 ("NULL bio_from in g_slice_finish_hot(%p)", bp));
154 gp = bp->bio_to->geom;
157 KASSERT(cp != NULL, ("NULL consumer in g_slice_finish_hot(%p)", bp));
158 idx = bp->bio_to->index;
161 bp2 = g_clone_bio(bp);
163 g_io_deliver(bp, ENOMEM);
175 g_slice_done(struct bio *bp)
178 KASSERT(bp->bio_cmd == BIO_GETATTR &&
179 strcmp(bp->bio_attribute, "GEOM::ident") == 0,
180 ("bio_cmd=0x%x bio_attribute=%s", bp->bio_cmd, bp->bio_attribute));
182 if (bp->bio_error == 0 && bp->bio_data[0] != '\0') {
187 bp->bio_parent->bio_to->index);
188 if (strlcat(bp->bio_data, idx, bp->bio_length) >=
189 bp->bio_length) {
190 bp->bio_error = EFAULT;
193 g_std_done(bp);
197 g_slice_start(struct bio *bp)
210 pp = bp->bio_to;
216 switch(bp->bio_cmd) {
220 if (bp->bio_offset > gsl->length) {
221 g_io_deliver(bp, EINVAL); /* XXX: EWHAT ? */
228 t = bp->bio_offset + gsl->offset;
233 if (t + bp->bio_length <= ghp->offset)
235 switch(bp->bio_cmd) {
245 g_io_deliver(bp, EROFS);
248 error = gsp->start(bp);
250 g_io_deliver(bp, error);
253 error = g_post_event(gsp->hot, bp, M_NOWAIT,
256 g_io_deliver(bp, error);
261 bp2 = g_clone_bio(bp);
263 g_io_deliver(bp, ENOMEM);
274 if (gsp->start != NULL && gsp->start(bp))
276 if (!strcmp("GEOM::ident", bp->bio_attribute)) {
277 bp2 = g_clone_bio(bp);
279 g_io_deliver(bp, ENOMEM);
286 if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
289 gkd = (struct g_kerneldump *)bp->bio_data;
297 bp2 = g_clone_bio(bp);
299 g_io_deliver(bp, ENOMEM);
306 g_io_deliver(bp, EOPNOTSUPP);