Lines Matching defs:cbp

305 	struct bio *cbp;
315 cbp = g_clone_bio(bp);
316 if (cbp == NULL) {
320 TAILQ_INSERT_TAIL(&queue, cbp, bio_queue);
325 cbp->bio_done = g_stripe_done;
326 cbp->bio_offset = offset;
327 cbp->bio_data = addr;
328 cbp->bio_caller1 = NULL;
329 cbp->bio_length = length;
330 cbp->bio_caller2 = sc->sc_disks[no];
342 cbp = TAILQ_NEXT(cbp, bio_queue);
343 if (cbp == NULL)
344 cbp = TAILQ_FIRST(&queue);
353 cbp->bio_length += MIN(stripesize, length);
354 if (cbp->bio_caller1 == NULL) {
355 cbp->bio_caller1 = cbp->bio_data;
356 cbp->bio_data = NULL;
367 cbp = g_clone_bio(bp);
368 if (cbp == NULL) {
372 TAILQ_INSERT_TAIL(&queue, cbp, bio_queue);
377 cbp->bio_done = g_stripe_done;
378 cbp->bio_offset = offset;
379 cbp->bio_data = addr;
380 cbp->bio_caller1 = NULL;
385 cbp->bio_length = MIN(stripesize, length);
386 cbp->bio_caller2 = sc->sc_disks[no];
394 while ((cbp = TAILQ_FIRST(&queue)) != NULL) {
397 TAILQ_REMOVE(&queue, cbp, bio_queue);
398 cp = cbp->bio_caller2;
399 cbp->bio_caller2 = NULL;
400 cbp->bio_to = cp->provider;
401 if (cbp->bio_caller1 != NULL) {
402 cbp->bio_data = data;
404 g_stripe_copy(sc, cbp->bio_caller1, data,
405 cbp->bio_offset, cbp->bio_length, 0);
407 data += cbp->bio_length;
409 G_STRIPE_LOGREQ(cbp, "Sending request.");
410 g_io_request(cbp, cp);
416 while ((cbp = TAILQ_FIRST(&queue)) != NULL) {
417 TAILQ_REMOVE(&queue, cbp, bio_queue);
418 if (cbp->bio_caller1 != NULL) {
419 cbp->bio_data = cbp->bio_caller1;
420 cbp->bio_caller1 = NULL;
423 g_destroy_bio(cbp);
434 struct bio *cbp;
442 cbp = g_clone_bio(bp);
443 if (cbp == NULL) {
447 TAILQ_INSERT_TAIL(&queue, cbp, bio_queue);
452 cbp->bio_done = g_std_done; /* Optimized lockless case. */
454 cbp->bio_done = g_stripe_done;
455 cbp->bio_offset = offset;
456 cbp->bio_length = length;
463 cbp->bio_caller2 = sc->sc_disks[no];
475 cbp = g_clone_bio(bp);
476 if (cbp == NULL) {
480 TAILQ_INSERT_TAIL(&queue, cbp, bio_queue);
485 cbp->bio_done = g_stripe_done;
486 cbp->bio_offset = offset;
491 cbp->bio_length = MIN(stripesize, length);
493 cbp->bio_ma_offset += (uintptr_t)addr;
494 cbp->bio_ma += cbp->bio_ma_offset / PAGE_SIZE;
495 cbp->bio_ma_offset %= PAGE_SIZE;
496 cbp->bio_ma_n = round_page(cbp->bio_ma_offset +
497 cbp->bio_length) / PAGE_SIZE;
499 cbp->bio_data = addr;
501 cbp->bio_caller2 = sc->sc_disks[no];
509 while ((cbp = TAILQ_FIRST(&queue)) != NULL) {
512 TAILQ_REMOVE(&queue, cbp, bio_queue);
513 cp = cbp->bio_caller2;
514 cbp->bio_caller2 = NULL;
515 cbp->bio_to = cp->provider;
516 G_STRIPE_LOGREQ(cbp, "Sending request.");
517 g_io_request(cbp, cp);
521 while ((cbp = TAILQ_FIRST(&queue)) != NULL) {
522 TAILQ_REMOVE(&queue, cbp, bio_queue);
524 g_destroy_bio(cbp);
534 struct bio *cbp;
539 cbp = g_clone_bio(bp);
540 if (cbp == NULL) {
541 for (cbp = bioq_first(&queue); cbp != NULL;
542 cbp = bioq_first(&queue)) {
543 bioq_remove(&queue, cbp);
544 g_destroy_bio(cbp);
551 bioq_insert_tail(&queue, cbp);
552 cbp->bio_done = g_stripe_done;
553 cbp->bio_caller2 = sc->sc_disks[no];
554 cbp->bio_to = sc->sc_disks[no]->provider;
556 for (cbp = bioq_first(&queue); cbp != NULL; cbp = bioq_first(&queue)) {
557 bioq_remove(&queue, cbp);
558 G_STRIPE_LOGREQ(cbp, "Sending request.");
559 cp = cbp->bio_caller2;
560 cbp->bio_caller2 = NULL;
561 g_io_request(cbp, cp);