Home
last modified time | relevance | path

Searched refs:b_bcount (Results 1 – 25 of 247) sorted by relevance

12345678910

/netbsd-src/usr.sbin/makefs/ffs/
H A Dbuf.c81 (*bpp)->b_bcount); in bread()
88 rv = read((*bpp)->b_fs->fd, (*bpp)->b_data, (size_t)(*bpp)->b_bcount); in bread()
92 (*bpp)->b_bcount, (intmax_t)offset, rv); in bread()
95 (*bpp)->b_bcount, (intmax_t)offset, rv); in bread()
98 if (rv != (*bpp)->b_bcount) { /* short read */ in bread()
101 (*bpp)->b_bcount, (intmax_t)offset, rv); in bread()
137 bp->b_bcount = 0; in brelse()
157 bytes = (size_t)bp->b_bcount; in bwrite()
167 bp->b_bcount, (intmax_t)offset, (intmax_t)rv); in bwrite()
194 bp->b_bcount, bp->b_bufsize); in bcleanup()
[all …]
/netbsd-src/sys/kern/
H A Dkern_physio.c115 size_t done = bp->b_bcount - bp->b_resid; in physio_done()
120 KASSERT(bp->b_bcount <= todo); in physio_done()
121 KASSERT(bp->b_resid <= bp->b_bcount); in physio_done()
144 bp->b_blkno, bp->b_bcount, bp->b_flags)); in physio_done()
177 size_t done = bp->b_bcount - bp->b_resid; in physio_biodone()
180 KASSERT(bp->b_bcount <= todo); in physio_biodone()
181 KASSERT(bp->b_resid <= bp->b_bcount); in physio_biodone()
318 bp->b_bcount = MIN(MAXPHYS, iovp->iov_len); in physio()
320 bp->b_bcount = MIN(INT_MAX, iovp->iov_len); in physio()
330 todo = bp->b_bufsize = bp->b_bcount; in physio()
[all …]
H A Dsubr_disk.c122 if (bp->b_bcount <= DEV_BSIZE) in diskerr()
130 bp->b_blkno + (bp->b_bcount - 1) / DEV_BSIZE); in diskerr()
132 if (lp && (blkdone >= 0 || bp->b_bcount <= lp->d_secsize)) { in diskerr()
319 sz = howmany((int64_t)bp->b_bcount, secsize); in bounds_check_with_mediasize()
330 bp->b_resid = bp->b_bcount; in bounds_check_with_mediasize()
339 bp->b_bcount = sz * secsize; in bounds_check_with_mediasize()
379 sz = howmany((int64_t)bp->b_bcount, DEV_BSIZE); in bounds_check_with_label()
390 bp->b_resid = bp->b_bcount; in bounds_check_with_label()
399 bp->b_bcount = sz << DEV_BSHIFT; in bounds_check_with_label()
425 bp->b_bcount = count * lp->d_secsize; in disk_read_sectors()
/netbsd-src/sys/arch/usermode/dev/
H A Dld_thunkbus.c169 tt->tt_aio.aio_nbytes = bp->b_bcount; in ld_thunkbus_ldstart()
180 (long long)bp->b_bcount); in ld_thunkbus_ldstart()
185 if ((offset < 0) || (offset + bp->b_bcount > disksize)) { in ld_thunkbus_ldstart()
188 bp->b_resid = bp->b_bcount; in ld_thunkbus_ldstart()
226 bp->b_resid = bp->b_bcount; in ld_thunkbus_complete()
275 thunk_assert_presence((vaddr_t) bp->b_data, (size_t) bp->b_bcount); in ld_thunkbus_complete()
279 ret = thunk_pread(sc->sc_fd, bp->b_data, bp->b_bcount, offset); in ld_thunkbus_complete()
281 ret = thunk_pwrite(sc->sc_fd, bp->b_data, bp->b_bcount, offset); in ld_thunkbus_complete()
288 if ((ret >= 0) && (ret == bp->b_bcount)) { in ld_thunkbus_complete()
293 bp->b_resid = bp->b_bcount; in ld_thunkbus_complete()
/netbsd-src/sys/fs/udf/
H A Dudf_readwrite.c303 buf->b_bcount = sectors * sector_size; in udf_read_phys_sectors()
304 buf->b_resid = buf->b_bcount; in udf_read_phys_sectors()
305 buf->b_bufsize = buf->b_bcount; in udf_read_phys_sectors()
438 sectors = buf->b_bcount / sector_size; in udf_write_phys_buf()
500 buf->b_bcount = sectors * sector_size; in udf_write_phys_sectors()
501 buf->b_resid = buf->b_bcount; in udf_write_phys_sectors()
502 buf->b_bufsize = buf->b_bcount; in udf_write_phys_sectors()
543 buf->b_bcount = dscrlen; in udf_write_phys_dscr_sync()
544 buf->b_resid = buf->b_bcount; in udf_write_phys_dscr_sync()
545 buf->b_bufsize = buf->b_bcount; in udf_write_phys_dscr_sync()
[all …]
/netbsd-src/sbin/fsck_lfs/
H A Dbufcache.c178 locked_queue_bytes -= bp->b_bcount; in bremfree()
234 if (bp->b_bcount == size) in getblk()
236 else if (bp->b_bcount > size) { in getblk()
238 bp->b_bcount = size; in getblk()
282 bp->b_bcount = size; in getblk()
319 locked_queue_bytes += bp->b_bcount; in brelse()
362 memset(bp->b_data, 0, bp->b_bcount); in bread()
H A Dsegwrite.c381 blksinblk = howmany(bp->b_bcount, lfs_sb_getbsize(fs)); in lfs_gatherblock()
383 sp->seg_bytes_left < bp->b_bcount) { in lfs_gatherblock()
412 sp->seg_bytes_left -= bp->b_bcount; in lfs_gatherblock()
578 num = howmany(sp->start_bpp[i]->b_bcount, lfs_sb_getbsize(fs)); in lfs_updatemeta()
593 lfs_fi_setlastlength(fs, sp->fip, ((sp->start_bpp[nblocks - 1]->b_bcount - 1) & in lfs_updatemeta()
613 if ((sbp->b_bcount & lfs_sb_getbmask(fs)) && i != 0) in lfs_updatemeta()
620 for (bytesleft = sbp->b_bcount; bytesleft > 0; in lfs_updatemeta()
798 sup->su_nbytes += (*bpp)->b_bcount; in lfs_writeseg()
835 for (byteoffset = 0; byteoffset < (*bpp)->b_bcount; in lfs_writeseg()
877 written_dev += bp->b_bcount; in lfs_writeseg()
[all …]
/netbsd-src/sys/ufs/lfs/
H A Dlfs_segment.c245 bp->b_bcount)); in lfs_vflush()
264 bp->b_bcount)); in lfs_vflush()
310 lfs_sb_addavail(fs, lfs_btofsb(fs, bp->b_bcount)); in lfs_vflush()
1321 blksinblk = howmany(bp->b_bcount, lfs_sb_getbsize(fs)); in lfs_gatherblock()
1323 sp->seg_bytes_left < bp->b_bcount) { in lfs_gatherblock()
1361 sp->seg_bytes_left -= bp->b_bcount; in lfs_gatherblock()
1655 num = howmany(sp->start_bpp[i]->b_bcount, lfs_sb_getbsize(fs));
1690 lastlength = ((sp->start_bpp[nblocks - 1]->b_bcount - 1) &
1712 if ((sbp->b_bcount & lfs_sb_getbmask(fs)) && i != 0)
1719 KASSERT(lbn >= 0 || sbp->b_bcount == lfs_sb_getbsize(fs));
[all …]
/netbsd-src/sys/arch/dreamcast/dev/g1/
H A Dgdrom.c277 cnt = bp->b_bcount >> 11; in gdrom_read_sectors()
291 (void *)buf, bp->b_bcount, in gdrom_read_sectors()
446 if (bp->b_bcount == 0) in gdromstrategy()
453 bp->b_bcount >> 11, bp->b_bcount)); in gdromstrategy()
463 bp->b_resid = bp->b_bcount; in gdromstrategy()
493 bp->b_resid = bp->b_bcount; in gdrom_start()
499 disk_unbusy(&sc->sc_dk, bp->b_bcount - bp->b_resid, in gdrom_start()
/netbsd-src/sys/dev/ofw/
H A Dofdisk.c296 if (bp->b_bcount == 0) in ofdisk_strategy()
304 bp->b_resid = bp->b_bcount; in ofdisk_strategy()
318 read = OF_io(of->sc_ihandle, bp->b_data, bp->b_bcount); in ofdisk_strategy()
323 bp->b_resid = bp->b_bcount; in ofdisk_strategy()
325 bp->b_resid = bp->b_bcount - read; in ofdisk_strategy()
327 disk_unbusy(&of->sc_dk, bp->b_bcount - bp->b_resid, in ofdisk_strategy()
340 if (bp->b_bcount > of->max_transfer) in ofminphys()
341 bp->b_bcount = of->max_transfer; in ofminphys()
/netbsd-src/sys/rump/librump/rumpvfs/
H A Drumpblk.c497 if (bp->b_bcount % (1<<sectshift) != 0) { in dostrategy()
507 ev_bwrite_total.ev_count += bp->b_bcount; in dostrategy()
509 ev_bwrite_async.ev_count += bp->b_bcount; in dostrategy()
527 if (off + bp->b_bcount > rblk->rblk_size) { in dostrategy()
542 bp->b_bcount = sz; in dostrategy()
548 bp->b_bcount, BUF_ISREAD(bp) ? "READ" : "WRITE", in dostrategy()
549 off, off, (off + bp->b_bcount), async ? "a" : "")); in dostrategy()
555 rumpuser_bio(rblk->rblk_fd, op, bp->b_data, bp->b_bcount, off, in dostrategy()
/netbsd-src/external/cddl/dtracetoolkit/dist/Bin/
H A Dnfswizard.d47 @file[args[2]->fi_pathname] = sum(args[0]->b_bcount);
53 @rbytes = sum(args[0]->b_flags & B_READ ? args[0]->b_bcount : 0);
54 @wbytes = sum(args[0]->b_flags & B_READ ? 0 : args[0]->b_bcount);
/netbsd-src/external/cddl/dtracetoolkit/dist/Apps/
H A Dnfswizard.d47 @file[args[2]->fi_pathname] = sum(args[0]->b_bcount);
53 @rbytes = sum(args[0]->b_flags & B_READ ? args[0]->b_bcount : 0);
54 @wbytes = sum(args[0]->b_flags & B_READ ? 0 : args[0]->b_bcount);
/netbsd-src/sys/arch/atari/dev/
H A Dfd.c592 printf("fdstrategy: %p, b_bcount: %d\n", bp, bp->b_bcount); in fdstrategy()
603 if (bp->b_blkno < 0 || (bp->b_bcount % SECTOR_SIZE) != 0) { in fdstrategy()
607 if (bp->b_bcount == 0) in fdstrategy()
610 sz = howmany(bp->b_bcount, SECTOR_SIZE); in fdstrategy()
622 bp->b_bcount = sz << DEV_BSHIFT; in fdstrategy()
624 bp->b_bcount = sz * lp->d_secsize; in fdstrategy()
646 bp->b_resid = bp->b_bcount; in fdstrategy()
693 sc->io_bytes = bp->b_bcount; /* Transfer size in bytes */ in fdstart()
738 disk_unbusy(&sc->dkdev, (bp->b_bcount in fddone()
[all...]
/netbsd-src/sys/dev/qbus/
H A Dts.c360 if (bp->b_bcount == 0 && (bp->b_oflags & BO_DONE)) in tscommand()
376 bp->b_bcount = count; in tscommand()
409 printf("buf: %p bcount %ld blkno %d\n", bp, bp->b_bcount, bp->b_blkno); in tsstart()
423 sc->sc_vts->cmd.cw1 = bp->b_bcount; in tsstart()
427 sc->sc_vts->cmd.cw1 = bp->b_bcount; in tsstart()
431 sc->sc_vts->cmd.cw1 = bp->b_bcount; in tsstart()
435 sc->sc_vts->cmd.cw1 = bp->b_bcount; in tsstart()
459 bp->b_bcount, bp->b_proc, BUS_DMA_NOWAIT)) { in tsstart()
467 sc->sc_vts->cmd.cw3 = bp->b_bcount; in tsstart()
499 bp->b_bcount, bp->b_proc, BUS_DMA_NOWAIT)) in tsready()
[all …]
/netbsd-src/sys/dev/pud/
H A Dpud_dev.c133 allocsize = sizeof(struct pud_req_readwrite) + bp->b_bcount; in pud_bdev_strategy()
137 pc_rw->pm_resid = bp->b_bcount; in pud_bdev_strategy()
140 memcpy(pc_rw->pm_data, bp->b_data, bp->b_bcount); in pud_bdev_strategy()
147 if (pc_rw->pm_resid > bp->b_bcount) { in pud_bdev_strategy()
153 memcpy(bp->b_data,pc_rw->pm_data,bp->b_bcount-pc_rw->pm_resid); in pud_bdev_strategy()
/netbsd-src/sys/dev/sdmmc/
H A Dld_sdmmc.c211 * setting bp->b_resid = bp->b_bcount in the event of in ld_sdmmc_task_cancel()
215 bp->b_resid = bp->b_bcount; in ld_sdmmc_task_cancel()
433 bp->b_resid = bp->b_bcount; in ld_sdmmc_restart()
455 bp->b_rawblkno, bp->b_bcount)); in ld_sdmmc_dobio()
464 bp->b_resid = bp->b_bcount; in ld_sdmmc_dobio()
471 bp->b_data, bp->b_bcount); in ld_sdmmc_dobio()
474 bp->b_data, bp->b_bcount); in ld_sdmmc_dobio()
486 bp->b_resid = bp->b_bcount; in ld_sdmmc_dobio()
497 bp->b_resid = bp->b_bcount; in ld_sdmmc_dobio()
532 nblks = howmany(bp->b_bcount, s in ld_sdmmc_dodiscard()
[all...]
/netbsd-src/sys/arch/dreamcast/dev/
H A Dgdrom.c512 if (bp->b_bcount == 0) in gdromstrategy()
519 bp->b_bcount >> 11, bp->b_bcount)); in gdromstrategy()
529 bp->b_resid = bp->b_bcount; in gdromstrategy()
556 bp->b_bcount >> 11, &resid); in gdrom_start()
560 bp->b_resid = bp->b_bcount; in gdrom_start()
566 disk_unbusy(&sc->sc_dk, bp->b_bcount - bp->b_resid, in gdrom_start()
/netbsd-src/sys/dev/scsipi/
H A Dss_mustek.c256 bp->b_bcount)); in mustek_minphys()
257 bp->b_bcount -= bp->b_bcount % in mustek_minphys()
260 bp->b_bcount)); in mustek_minphys()
462 lines_to_read = bp->b_bcount / in mustek_read()
471 (u_char *) bp->b_data, bp->b_bcount, in mustek_read()
497 ss->sio.scan_window_size -= bp->b_bcount; in mustek_read()
/netbsd-src/sys/arch/vax/vax/
H A Dctu.c209 printf("ctustrategy: bcount %ld blkno %d\n", bp->b_bcount, bp->b_blkno); in ctustrategy()
214 bp->b_resid = bp->b_bcount; in ctustrategy()
243 bp->b_resid = bp->b_bcount; in ctustart()
252 rsp->rsp_cnt = bp->b_bcount; in ctustart()
329 if (bp->b_bcount == tu_sc.sc_xbytes) in cturintr()
393 if (tu_sc.sc_xbytes == bp->b_bcount) in cturintr()
/netbsd-src/sys/arch/evbmips/sbmips/
H A Ddisksubr.c142 bp->b_bcount = lp->d_secsize; in readdisklabel()
191 bp->b_bcount = lp->d_secsize; in readdisklabel()
236 bp->b_bcount = lp->d_secsize; in readdisklabel()
287 bp->b_bcount = lp->d_secsize; in writedisklabel()
312 bp->b_bcount = lp->d_secsize; in writedisklabel()
/netbsd-src/sys/arch/playstation2/playstation2/
H A Ddisksubr.c142 bp->b_bcount = lp->d_secsize; in readdisklabel()
190 bp->b_bcount = lp->d_secsize; in readdisklabel()
234 bp->b_bcount = lp->d_secsize; in readdisklabel()
286 bp->b_bcount = lp->d_secsize; in writedisklabel()
310 bp->b_bcount = lp->d_secsize; in writedisklabel()
/netbsd-src/sys/arch/sbmips/sbmips/
H A Ddisksubr.c142 bp->b_bcount = lp->d_secsize; in readdisklabel()
191 bp->b_bcount = lp->d_secsize; in readdisklabel()
236 bp->b_bcount = lp->d_secsize; in readdisklabel()
287 bp->b_bcount = lp->d_secsize; in writedisklabel()
312 bp->b_bcount = lp->d_secsize; in writedisklabel()
/netbsd-src/sys/dev/
H A Dfss.c316 bp->b_resid = bp->b_bcount; in fss_strategy()
664 ch = FSS_BTOCL(sc, dbtob(bp->b_blkno)+bp->b_bcount-1); in fss_copy_on_write()
1047 mbp->b_resid = mbp->b_bcount = todo; in fss_read_cluster()
1199 dbtob(bp->b_blkno), bp->b_bcount, in fss_bs_thread()
1202 resid = bp->b_bcount; in fss_bs_thread()
1204 (error ? 0 : bp->b_bcount), is_read); in fss_bs_thread()
1207 resid = bp->b_bcount; in fss_bs_thread()
1261 bp->b_resid = bp->b_bcount; in fss_bs_thread()
1277 ch = FSS_BTOCL(sc, dbtob(bp->b_blkno)+bp->b_bcount-1); in fss_bs_thread()
1289 nbp->b_resid = nbp->b_bcount = bp->b_bcount; in fss_bs_thread()
[all …]
H A Ddksubr.c259 if ((bp->b_bcount % secsize) != 0 || bp->b_blkno < 0) { in dk_translate()
265 if (bp->b_bcount == 0) in dk_translate()
294 bp->b_resid = bp->b_bcount; in dk_translate()
309 bp->b_resid = bp->b_bcount; in dk_strategy1()
443 bp->b_resid = bp->b_bcount; in dk_start()
472 disk_unbusy(dk, bp->b_bcount - bp->b_resid, (bp->b_flags & B_READ)); in dk_done()
491 bp->b_resid = bp->b_bcount; in dk_drain()
527 bp->b_bcount = uimin(len, maxsz); in dk_discard()
536 (off_t)bp->b_bcount); in dk_discard()
540 pos += bp->b_bcount; in dk_discard()
[all …]

12345678910