Searched refs:bp (Results 1 - 25 of 52) sorted by relevance

123

/macosx-10.5.8/xnu-1228.15.4/bsd/vfs/
H A Dvfs_bio.c116 static int bcleanbuf(buf_t bp);
117 static int brecover_data(buf_t bp);
121 static void bremfree_locked(buf_t bp);
122 static void buf_reassign(buf_t bp, vnode_t newvp);
123 static errno_t buf_acquire_locked(buf_t bp, int flags, int slpflag, int slptimeo);
180 #define binsheadfree(bp, dp, whichq) do { \
181 TAILQ_INSERT_HEAD(dp, bp, b_freelist); \
185 #define binstailfree(bp, dp, whichq) do { \
186 TAILQ_INSERT_TAIL(dp, bp, b_freelist); \
190 #define binsheadfree(bp, d
233 blistenterhead(struct bufhashhdr * head, buf_t bp) argument
244 binshash(buf_t bp, struct bufhashhdr *dp) argument
264 bremhash(buf_t bp) argument
280 buf_valid(buf_t bp) argument
288 buf_fromcache(buf_t bp) argument
296 buf_markinvalid(buf_t bp) argument
302 buf_markdelayed(buf_t bp) argument
314 buf_markeintr(buf_t bp) argument
321 buf_markaged(buf_t bp) argument
327 buf_fua(buf_t bp) argument
335 buf_markfua(buf_t bp) argument
341 buf_error(buf_t bp) argument
347 buf_seterror(buf_t bp, errno_t error) argument
356 buf_setflags(buf_t bp, int32_t flags) argument
362 buf_clearflags(buf_t bp, int32_t flags) argument
368 buf_flags(buf_t bp) argument
374 buf_reset(buf_t bp, int32_t io_flags) argument
383 buf_count(buf_t bp) argument
389 buf_setcount(buf_t bp, uint32_t bcount) argument
395 buf_size(buf_t bp) argument
401 buf_setsize(buf_t bp, uint32_t bufsize) argument
407 buf_resid(buf_t bp) argument
413 buf_setresid(buf_t bp, uint32_t resid) argument
419 buf_dirtyoff(buf_t bp) argument
425 buf_dirtyend(buf_t bp) argument
431 buf_setdirtyoff(buf_t bp, uint32_t dirtyoff) argument
437 buf_setdirtyend(buf_t bp, uint32_t dirtyend) argument
443 buf_dataptr(buf_t bp) argument
449 buf_setdataptr(buf_t bp, uintptr_t data) argument
455 buf_vnode(buf_t bp) argument
461 buf_setvnode(buf_t bp, vnode_t vp) argument
468 buf_callback(buf_t bp) argument
478 buf_setcallback(buf_t bp, void (*callback)(buf_t, void *), void *transaction) argument
491 buf_setupl(buf_t bp, upl_t upl, uint32_t offset) argument
508 buf_clone(buf_t bp, int io_offset, int io_size, void (*iodone)(buf_t, void *), void *arg) argument
548 buf_setfilter(buf_t bp, void (*filter)(buf_t, void *), void *transaction, void **old_iodone, void **old_transaction) argument
566 buf_blkno(buf_t bp) argument
572 buf_lblkno(buf_t bp) argument
578 buf_setblkno(buf_t bp, daddr64_t blkno) argument
584 buf_setlblkno(buf_t bp, daddr64_t lblkno) argument
590 buf_device(buf_t bp) argument
596 buf_setdevice(buf_t bp, vnode_t vp) argument
607 buf_drvdata(buf_t bp) argument
613 buf_setdrvdata(buf_t bp, void *drvdata) argument
619 buf_fsprivate(buf_t bp) argument
625 buf_setfsprivate(buf_t bp, void *fsprivate) argument
631 buf_rcred(buf_t bp) argument
637 buf_wcred(buf_t bp) argument
643 buf_upl(buf_t bp) argument
649 buf_uploffset(buf_t bp) argument
655 buf_proc(buf_t bp) argument
662 buf_map(buf_t bp, caddr_t *io_addr) argument
700 buf_unmap(buf_t bp) argument
738 buf_clear(buf_t bp) argument
755 buf_strategy_fragmented(vnode_t devvp, buf_t bp, off_t f_offset, size_t contig_bytes) argument
857 buf_t bp = ((struct vnop_strategy_args *)ap)->a_bp; local
934 buf_free(buf_t bp) argument
956 buf_t bp; local
1040 buf_t bp; local
1193 buf_t bp; local
1304 buf_t bp; local
1326 bremfree_locked(buf_t bp) argument
1362 bgetvp_locked(vnode_t vp, buf_t bp) argument
1383 brelvp_locked(buf_t bp) argument
1400 buf_reassign(buf_t bp, vnode_t newvp) argument
1429 bufhdrinit(buf_t bp) argument
1447 buf_t bp; local
1589 buf_t bp; local
1645 buf_t bp; local
1674 buf_t bp; local
1690 buf_t bp; local
1722 buf_bwrite(buf_t bp) argument
1819 bdwrite_internal(buf_t bp, int return_error) argument
1877 buf_bdwrite(buf_t bp) argument
1894 bawrite_internal(buf_t bp, int throttle) argument
1918 buf_bawrite(buf_t bp) argument
1929 buf_brelse(buf_t bp) argument
2193 struct buf *bp; local
2218 buf_t bp; local
2530 buf_t bp; local
2568 allocbuf(buf_t bp, int size) argument
2663 buf_t bp; local
2840 bcleanbuf(buf_t bp) argument
2951 buf_t bp; local
2993 buf_drop(buf_t bp) argument
3027 buf_acquire(buf_t bp, int flags, int slpflag, int slptimeo) argument
3041 buf_acquire_locked(buf_t bp, int flags, int slpflag, int slptimeo) argument
3088 buf_biowait(buf_t bp) argument
3113 buf_biowait_callback(buf_t bp) argument
3145 buf_biodone(buf_t bp) argument
3290 buf_t bp; local
3309 buf_t bp; local
3331 register struct buf *bp; local
3365 buf_t bp; local
3419 free_io_buf(buf_t bp) argument
3484 struct buf *bp; local
3546 brecover_data(buf_t bp) argument
3630 buf_t bp, next; local
[all...]
H A Dvfs_journal.h52 struct buf *bp; member in union:block_info::__anon429
281 int journal_modify_block_start(journal *jnl, struct buf *bp);
282 int journal_modify_block_abort(journal *jnl, struct buf *bp);
283 int journal_modify_block_end(journal *jnl, struct buf *bp, void (*func)(struct buf *bp, void *arg), void *arg);
284 int journal_kill_block(journal *jnl, struct buf *bp);
H A Dvfs_journal.c264 buf_t bp; local
279 bp = alloc_io_buf(jnl->jdev, 1);
302 buf_setflags(bp, B_READ);
309 buf_setsize(bp, curlen);
310 buf_setcount(bp, curlen);
311 buf_setdataptr(bp, (uintptr_t)data);
312 buf_setblkno(bp, (daddr64_t) ((jnl->jdev_offset + *offset) / (off_t)jnl->jhdr->jhdr_size));
313 buf_setlblkno(bp, (daddr64_t) ((jnl->jdev_offset + *offset) / (off_t)jnl->jhdr->jhdr_size));
315 buf_markfua(bp);
318 err = VNOP_STRATEGY(bp);
462 buffer_flushed_callback(struct buf *bp, void *arg) argument
2269 journal_modify_block_start(journal *jnl, struct buf *bp) argument
2333 journal_modify_block_abort(journal *jnl, struct buf *bp) argument
2402 journal_modify_block_end(journal *jnl, struct buf *bp, void (*func)(struct buf *bp, void *arg), void *arg) argument
2547 journal_kill_block(journal *jnl, struct buf *bp) argument
2680 struct buf *bp, **bparray; local
3015 struct buf *bp; local
[all...]
H A Dvfs_fslog.c365 void fslog_io_error(const buf_t bp) argument
376 if (buf_error(bp) == 0) {
381 snprintf (errno_str, sizeof(errno_str), "%d", buf_error(bp));
384 if (buf_flags(bp) & B_READ) {
391 snprintf (blknum_str, sizeof(blknum_str), "%lld", buf_blkno(bp));
394 snprintf (lblknum_str, sizeof(lblknum_str), "%lld", buf_lblkno(bp));
405 vp = buf_vnode(bp);
/macosx-10.5.8/xnu-1228.15.4/bsd/nfs/
H A Dnfs_bio.c281 nfs_buf_remfree(struct nfsbuf *bp) argument
283 if (bp->nb_free.tqe_next == NFSNOLIST)
285 if (ISSET(bp->nb_flags, NB_DELWRI)) {
287 TAILQ_REMOVE(&nfsbufdelwri, bp, nb_free);
288 } else if (ISSET(bp->nb_flags, NB_META)) {
290 TAILQ_REMOVE(&nfsbuffreemeta, bp, nb_free);
293 TAILQ_REMOVE(&nfsbuffree, bp, nb_free);
295 bp->nb_free.tqe_next = NFSNOLIST;
322 struct nfsbuf * bp = NFSBUFHASH(np, blkno)->lh_first; local
323 for (; bp !
345 struct nfsbuf *bp; local
383 nfs_buf_upl_setup(struct nfsbuf *bp) argument
425 nfs_buf_upl_check(struct nfsbuf *bp) argument
475 nfs_buf_map(struct nfsbuf *bp) argument
503 nfs_buf_normalize_valid_range(nfsnode_t np, struct nfsbuf *bp) argument
529 struct nfsbuf *bp; local
637 struct nfsbuf *bp; local
863 LIST_INSERT_HEAD(NFSBUFHASH(np, blkno), bp, nb_hash); local
959 nfs_buf_release(struct nfsbuf *bp, int freeup) argument
1134 nfs_buf_iowait(struct nfsbuf *bp) argument
1160 nfs_buf_iodone(struct nfsbuf *bp) argument
1191 nfs_buf_write_delayed(struct nfsbuf *bp) argument
1253 nfs_buf_check_write_verifier(nfsnode_t np, struct nfsbuf *bp) argument
1280 nfs_buf_refget(struct nfsbuf *bp) argument
1289 nfs_buf_refrele(struct nfsbuf *bp) argument
1299 nfs_buf_acquire(struct nfsbuf *bp, int flags, int slpflag, int slptimeo) argument
1336 nfs_buf_drop(struct nfsbuf *bp) argument
1399 struct nfsbuf *bp; local
1424 nfs_buf_read(struct nfsbuf *bp) argument
1462 nfs_buf_read_finish(struct nfsbuf *bp) argument
1504 nfs_buf_read_rpc(struct nfsbuf *bp, thread_t thd, kauth_cred_t cred) argument
1614 struct nfsbuf *bp; local
1759 struct nfsbuf *bp; local
1807 struct nfsbuf *bp = NULL; local
2369 nfs_buf_write(struct nfsbuf *bp) argument
2581 nfs_buf_write_finish(struct nfsbuf *bp, thread_t thd, kauth_cred_t cred) argument
2690 nfs_buf_write_dirty_pages(struct nfsbuf *bp, thread_t thd, kauth_cred_t cred) argument
2782 nfs_buf_write_rpc(struct nfsbuf *bp, int iomode, thread_t thd, kauth_cred_t cred) argument
2907 struct nfsbuf *bp; local
3062 struct nfsbuf *bp; local
3289 struct nfsbuf *bp; local
3492 struct nfsbuf *bp; local
3778 nfs_buf_readdir(struct nfsbuf *bp, vfs_context_t ctx) argument
[all...]
H A Dnfs_vnops.c1062 struct nfsbuf *bp; local
1069 error = nfs_buf_get(np, obn, biosize, NULL, NBLK_READ, &bp);
1073 FSDBG(512, bp, bp->nb_flags, 0, obn);
1074 SET(bp->nb_flags, NB_INVAL);
1075 nfs_buf_release(bp, 1);
1079 neweofoff = vap->va_data_size - NBOFF(bp);
1081 if ((bp->nb_dirtyend > 0) && (bp->nb_dirtyoff < neweofoff)) {
1083 if (bp
1595 struct nfsbuf *bp = NULL; local
1882 struct nfsbuf *bp; local
5867 struct nfsbuf *bp; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/kern/
H A Dkern_physio.c86 buf_t bp,
124 if (bp == NULL) {
125 bp = buf_alloc((vnode_t)0);
128 orig_bflags = buf_flags(bp);
137 assert(bp->b_lflags & BL_BUSY);
142 bp->b_dev = dev;
143 bp->b_proc = p;
152 buf_setflags(bp, B_PHYS | B_RAW);
168 buf_reset(bp, flags);
171 buf_setblkno(bp, ui
85 physio( void (*f_strategy)(buf_t), buf_t bp, dev_t dev, int flags, u_int (*f_minphys)(buf_t), struct uio *uio, int blocksize) argument
250 minphys(struct buf *bp) argument
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/hfs/
H A Dhfs_btreeio.c54 static int btree_journal_modify_block_end(struct hfsmount *hfsmp, struct buf *bp);
78 struct buf *bp = NULL; local
95 bp = buf_getblk(vp, (daddr64_t)blockNum, block->blockSize, 0, 0, BLK_META);
96 if (bp &&
98 buf_setblkno(bp, blkno);
101 retval = buf_meta_bread(vp, (daddr64_t)blockNum, block->blockSize, NOCRED, &bp);
103 if (bp == NULL)
107 block->blockHeader = bp;
108 block->buffer = (char *)buf_dataptr(bp);
109 block->blockNum = buf_lblkno(bp);
172 struct buf *bp = NULL; local
189 btree_swap_node(struct buf *bp, __unused void *arg) argument
215 btree_journal_modify_block_end(struct hfsmount *hfsmp, struct buf *bp) argument
226 struct buf *bp = NULL; local
522 struct buf *bp = NULL; local
589 struct buf *bp = NULL; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/ufs/ffs/
H A Dffs_balloc.c109 struct buf *bp, *nbp; local
155 osize, (int)fs->fs_bsize, cred, &bp);
163 ip->i_db[nb] = dbtofsb(fs, (ufs_daddr_t)buf_blkno(bp));
168 buf_setflags(bp, B_NOCACHE);
169 buf_bwrite(bp);
171 buf_bdwrite(bp);
172 /* note that bp is already released here */
182 error = (int)buf_bread(vp, (daddr64_t)((unsigned)lbn), fs->fs_bsize, NOCRED, &bp);
184 buf_brelse(bp);
187 *bpp = bp;
475 struct buf *bp, *nbp; local
[all...]
H A Dffs_inode.c113 struct buf *bp; local
153 (int)fs->fs_bsize, NOCRED, &bp)) {
154 buf_brelse(bp);
159 byte_swap_inode_out(ip, ((struct dinode *)buf_dataptr(bp) + ino_to_fsbo(fs, ip->i_number)));
162 *((struct dinode *)buf_dataptr(bp) + ino_to_fsbo(fs, ip->i_number)) = ip->i_din;
168 return ((int)buf_bwrite(bp));
170 buf_bdwrite(bp);
188 buf_t bp; local
242 if (error = ffs_balloc(oip, lbn, offset + 1, cred, &bp, aflags, 0))
247 buf_markinvalid(bp);
460 struct buf *bp; local
[all...]
H A Dffs_subr.c98 struct buf *bp; local
112 if (error = (int)buf_bread(vp, (daddr64_t)((unsigned)lbn), bsize, NOCRED, &bp)) {
113 buf_brelse(bp);
118 byte_swap_dir_block_in((char *)buf_dataptr(bp), buf_count(bp));
122 *res = (char *)buf_dataptr(bp) + blkoff(fs, offset);
123 *bpp = bp;
H A Dffs_vfsops.c273 struct buf *bp; local
292 (int)fs->fs_bsize, NOCRED, &bp)) {
293 buf_brelse(bp);
300 byte_swap_inode_in(((struct dinode *)buf_dataptr(bp) +
304 ip->i_din = *((struct dinode *)buf_dataptr(bp) +
310 buf_brelse(bp);
333 struct buf *bp; local
356 if (error = (int)buf_bread(devvp, (daddr64_t)((unsigned)(SBOFF/size)), SBSIZE, NOCRED,&bp)) {
357 buf_brelse(bp);
360 newfs = (struct fs *)buf_dataptr(bp);
470 struct buf *bp; local
930 struct buf *bp; local
1080 struct buf *bp; local
1259 struct buf *bp; local
1564 register struct buf *bp; local
[all...]
H A Dffs_alloc.c198 struct buf *bp; local
226 if (error = (int)buf_bread(ITOV(ip), (daddr64_t)((unsigned)lbprev), osize, NOCRED, &bp)) {
227 buf_brelse(bp);
235 buf_brelse(bp);
244 if ((ufs_daddr_t)buf_blkno(bp) != fsbtodb(fs, bno))
248 allocbuf(bp, nsize);
249 buf_setflags(bp, B_DONE);
250 bzero((char *)buf_dataptr(bp) + osize, (u_int)buf_size(bp) - osize);
251 *bpp = bp;
757 struct buf *bp; local
853 struct buf *bp; local
1093 struct buf *bp; local
1231 struct buf *bp; local
1330 struct buf *bp; local
1453 struct buf *bp; local
1519 struct buf *bp; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/isofs/cd9660/
H A Dcd9660_lookup.c129 struct buf *bp; /* a buffer of directory entries */ local
131 int entryoffsetinblock; /* offset of ep in bp's buffer */
157 bp = NULL;
225 (error = cd9660_blkatoff(vdp, SECTOFF(imp, dp->i_offset), NULL, &bp)))
240 if (bp != NULL)
241 buf_brelse(bp);
242 if ( (error = cd9660_blkatoff(vdp, SECTOFF(imp,dp->i_offset), NULL, &bp)) )
250 ((char *)0 + buf_dataptr(bp) + entryoffsetinblock);
281 ino = ((daddr_t)buf_blkno(bp) << imp->im_bshift) + entryoffsetinblock;
309 ino = ((daddr_t)buf_blkno(bp) << im
443 buf_t bp; local
[all...]
H A Dcd9660_vfsops.c351 struct buf *bp = NULL; local
393 if ((error = (int)buf_bread(devvp, (daddr64_t)((unsigned)iso_blknum), iso_bsize, NOCRED, &bp))) {
394 if (bp) {
395 buf_markaged(bp);
396 buf_brelse(bp);
397 bp = NULL;
404 vdp = (struct iso_volume_descriptor *)((char *)0 + buf_dataptr(bp));
430 pribp = bp;
431 bp = NULL;
436 supbp = bp;
1068 buf_t bp = NULL; local
[all...]
H A Dcd9660_util.c326 struct buf *bp = NULL; local
350 if (bp != NULL)
351 buf_brelse(bp);
352 if ( (error = cd9660_blkatoff(vdp, SECTOFF(imp, diroffset), NULL, &bp)) )
358 (buf_dataptr(bp) + blkoffset);
393 if (bp)
394 buf_brelse (bp);
/macosx-10.5.8/xnu-1228.15.4/bsd/net/
H A Dbpf.c190 static errno_t bpf_attachd(struct bpf_d *d, struct bpf_if *bp);
446 * Attach file to the bpf interface, i.e. make d listen on bp.
449 bpf_attachd(struct bpf_d *d, struct bpf_if *bp) argument
451 int first = bp->bif_dlist == NULL;
455 * Point d at bp, and add d to the interface's list of listeners.
459 d->bd_bif = bp;
460 d->bd_next = bp->bif_dlist;
461 bp->bif_dlist = d;
465 if (bp->bif_ifp->if_bpf == NULL) {
468 for (primary = bpf_iflist; primary && primary->bif_ifp != bp
493 struct bpf_if *bp; local
1300 struct bpf_if *bp; local
1357 struct bpf_if *bp; local
1396 struct bpf_if *bp; local
1511 struct bpf_if *bp; local
1820 struct bpf_if *bp, *bp_prev, *bp_next; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/ufs/ufs/
H A Dufs_bmap.c120 struct buf *bp; local
179 for (bp = NULL, ++xap; --num; ++xap) {
195 if (bp)
196 buf_brelse(bp);
197 bp = buf_getblk(vp, (daddr64_t)((unsigned)metalbn), mp->mnt_vfsstat.f_iosize, 0, 0, bop);
199 if (bp == 0) {
212 if (buf_valid(bp)) {
217 buf_setblkno(bp, blkptrtodb(ump, (daddr64_t)((unsigned)daddr)));
218 buf_setflags(bp, B_READ);
219 VNOP_STRATEGY(bp);
[all...]
H A Dufs_lookup.c141 struct buf *bp; /* a buffer of directory entries */ local
143 int entryoffsetinblock; /* offset of ep in bp's buffer */
173 bp = NULL;
237 (error = ffs_blkatoff(vdp, (off_t)dp->i_offset, NULL, &bp)))
252 if (bp != NULL) {
255 byte_swap_dir_block_out(bp);
257 buf_brelse(bp);
259 if (error = ffs_blkatoff(vdp, (off_t)dp->i_offset, NULL, &bp))
279 ep = (struct direct *)((char *)buf_dataptr(bp) + entryoffsetinblock);
355 byte_swap_dir_block_out(bp);
674 struct buf *bp; local
817 struct buf *bp; local
900 struct buf *bp; local
[all...]
H A Dufs_readwrite.c95 buf_t bp = (struct buf *)0; local
131 for (error = 0, bp = NULL; uio_resid(uio) > 0;
132 bp = NULL) {
149 error = (int)buf_bread(vp, (daddr64_t)((unsigned)lbn), size, NOCRED, &bp);
153 size, &nextlbn, &nextsize, 1, NOCRED, &bp);
155 error = (int)buf_bread(vp, lbn, size, NOCRED, &bp);
167 size -= buf_resid(bp);
173 buf_data = (char *)buf_dataptr(bp);
196 buf_markaged(bp);
197 buf_brelse(bp);
224 buf_t bp; local
573 struct buf *bp; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/miscfs/nullfs/
H A Dnull_vnops.c508 struct buf *bp = ap->a_bp; local
512 savedvp = vnode(bp);
513 buf_setvnode(bp, NULLVPTOLOWERVP(savedvp));
515 error = VNOP_STRATEGY(bp);
517 buf_setvnode(bp, savedvp);
533 struct buf *bp = ap->a_bp; local
537 savedvp = buf_vnode(bp);
538 buf_setvnode(bp, NULLVPTOLOWERVP(savedvp));
540 error = VNOP_BWRITE(bp);
542 buf_setvnode(bp, savedv
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/sys/
H A Dfslog.h87 void fslog_io_error(const buf_t bp);
/macosx-10.5.8/xnu-1228.15.4/bsd/miscfs/specfs/
H A Dspec_vnops.c321 struct buf *bp; local
367 (int *)&bsize, 1, NOCRED, &bp);
369 error = buf_bread(vp, bn, (int)bsize, NOCRED, &bp);
375 n = bsize - buf_resid(bp);
379 buf_brelse(bp);
385 error = uiomove((char *)0 + buf_dataptr(bp) + on, n, uio);
387 buf_markaged(bp);
388 buf_brelse(bp);
408 struct buf *bp; local
478 bp
717 buf_t bp; local
[all...]
/macosx-10.5.8/xnu-1228.15.4/osfmk/ddb/
H A Dmakedis.c386 void compilebitstring(struct bits *bp);
710 struct bits *bp; local
729 for (bp = ep->bits; bp != NULL; bp = bp->next) {
730 if (bp->name == bit) {
741 bp = xmalloc(sizeof *bp);
742 bp
789 struct bits *bp; local
1154 struct bits *bp; local
1227 struct bits *bp; local
1402 struct bits *bp; local
1704 struct bits *bp; local
2285 compilebitstring(struct bits *bp) argument
[all...]
/macosx-10.5.8/xnu-1228.15.4/bsd/dev/
H A Dmemdev.c232 static void mdevstrategy(struct buf *bp) { argument
239 devid = minor(buf_device(bp)); /* Get minor device number */
242 buf_seterror(bp, ENXIO);
243 buf_biodone(bp);
247 buf_setresid(bp, buf_count(bp)); /* Set byte count */
249 blkoff = buf_blkno(bp) * mdev[devid].mdSecsize; /* Get offset into file */
258 buf_seterror(bp, EINVAL); /* Yeah, this is an error */
260 buf_biodone(bp); /* Return */
264 if ((blkoff + buf_count(bp)) > (mde
[all...]

Completed in 233 milliseconds

123