Lines Matching refs:cbp

810 	struct bio *nbp, *cbp, *pbp;
819 GJQ_FOREACH(*head, cbp) {
820 cstart = cbp->bio_offset;
821 cend = cbp->bio_offset + cbp->bio_length;
852 nbp->bio_next = cbp;
877 g_journal_stats_bytes_skipped += cbp->bio_length;
878 cbp->bio_offset = nstart;
879 cbp->bio_joffset = joffset;
880 cbp->bio_length = cend - nstart;
881 if (cbp->bio_data != NULL) {
882 gj_free(cbp->bio_data, cend - cstart);
883 cbp->bio_data = NULL;
886 cbp->bio_data = gj_malloc(cbp->bio_length,
888 if (cbp->bio_data != NULL) {
889 bcopy(data, cbp->bio_data,
890 cbp->bio_length);
896 GJ_DEBUG(3, "INSERT(%p): 3 (cbp=%p)", *head, cbp);
911 nbp->bio_next = cbp->bio_next;
912 cbp->bio_next = nbp;
913 cbp->bio_length = nstart - cstart;
914 if (cbp->bio_data != NULL) {
915 cbp->bio_data = gj_realloc(cbp->bio_data,
916 cbp->bio_length, cend - cstart);
923 GJ_DEBUG(3, "INSERT(%p): 4 (cbp=%p)", *head, cbp);
938 nbp->bio_next = cbp->bio_next;
939 cbp->bio_next = nbp;
940 if (cbp->bio_data == NULL)
943 tmpdata = cbp->bio_data + nend - cstart;
945 cbp->bio_joffset + nend - cstart, tmpdata, flags);
946 nbp->bio_next = ((struct bio *)cbp->bio_next)->bio_next;
947 ((struct bio *)cbp->bio_next)->bio_next = nbp;
948 cbp->bio_length = nstart - cstart;
949 if (cbp->bio_data != NULL) {
950 cbp->bio_data = gj_realloc(cbp->bio_data,
951 cbp->bio_length, cend - cstart);
954 GJ_DEBUG(3, "INSERT(%p): 5 (cbp=%p)", *head, cbp);
974 nbp->bio_next = cbp;
975 cbp->bio_offset = nend;
976 cbp->bio_length = cend - nend;
977 cbp->bio_joffset += nend - cstart;
978 tmpdata = cbp->bio_data;
980 cbp->bio_data = gj_malloc(cbp->bio_length,
982 if (cbp->bio_data != NULL) {
984 cbp->bio_data, cbp->bio_length);
989 GJ_DEBUG(3, "INSERT(%p): 6 (cbp=%p)", *head, cbp);
994 pbp = cbp;
1006 GJQ_FOREACH(*head, cbp) {
1007 GJ_DEBUG(3, "ELEMENT: %p (%jd, %jd, %jd, %p)", cbp,
1008 (intmax_t)cbp->bio_offset,
1009 (intmax_t)cbp->bio_length,
1010 (intmax_t)cbp->bio_joffset, cbp->bio_data);
1026 struct bio *cbp, *pbp;
1031 GJQ_FOREACH(head, cbp) {
1033 if (cbp->bio_data == NULL) {
1039 pbp = cbp;
1043 if (pbp->bio_offset + pbp->bio_length != cbp->bio_offset) {
1045 KASSERT(pbp->bio_offset + pbp->bio_length < cbp->bio_offset,
1049 (intmax_t)cbp->bio_offset));
1050 pbp = cbp;
1054 if (pbp->bio_length + cbp->bio_length > maxphys) {
1055 pbp = cbp;
1060 GJ_LOGREQ(4, cbp, "and: ");
1062 pbp->bio_length + cbp->bio_length, pbp->bio_length);
1063 bcopy(cbp->bio_data, pbp->bio_data + pbp->bio_length,
1064 cbp->bio_length);
1065 gj_free(cbp->bio_data, cbp->bio_length);
1066 pbp->bio_length += cbp->bio_length;
1067 pbp->bio_next = cbp->bio_next;
1068 g_destroy_bio(cbp);
1069 cbp = pbp;
1097 struct bio *cbp;
1103 cbp = g_alloc_bio();
1104 cbp->bio_cflags = bp->bio_cflags;
1105 cbp->bio_parent = bp;
1106 cbp->bio_offset = bp->bio_joffset;
1107 cbp->bio_length = bp->bio_length;
1108 cbp->bio_data = gj_malloc(bp->bio_length, M_WAITOK);
1109 cbp->bio_cmd = BIO_READ;
1110 cbp->bio_done = g_journal_std_done;
1111 GJ_LOGREQ(4, cbp, "READ FIRST");
1112 g_io_request(cbp, sc->sc_jconsumer);