Lines Matching refs:bp
663 struct buf *bp;
708 hfsmp->hfs_physical_block_size, NOCRED, &bp);
710 if (bp != NULL)
711 buf_brelse(bp);
715 vhp = (HFSPlusVolumeHeader *) (buf_dataptr(bp) + HFS_PRI_OFFSET(hfsmp->hfs_physical_block_size));
723 buf_brelse(bp);
793 buf_brelse(bp);
934 struct buf *bp;
963 bp = NULL;
1047 phys_blksize, cred, &bp))) {
1051 bcopy((char *)buf_dataptr(bp) + HFS_PRI_OFFSET(phys_blksize), mdbp, kMDBSize);
1052 buf_brelse(bp);
1053 bp = NULL;
1227 phys_blksize, cred, &bp);
1230 bcopy((char *)buf_dataptr(bp) + HFS_PRI_OFFSET(phys_blksize), mdbp, 512);
1231 buf_brelse(bp);
1232 bp = NULL;
1292 bp = NULL;
1295 phys_blksize, cred, &bp);
1297 jvhp = (HFSPlusVolumeHeader *)(buf_dataptr(bp) + HFS_PRI_OFFSET(phys_blksize));
1302 buf_bwrite(bp);
1304 buf_brelse(bp);
1306 bp = NULL;
1307 } else if (bp) {
1308 buf_brelse(bp);
1310 bp = NULL;
1379 bp = NULL;
1381 phys_blksize, cred, &bp);
1383 jvhp = (HFSPlusVolumeHeader *)(buf_dataptr(bp) + HFS_PRI_OFFSET(phys_blksize));
1388 buf_bwrite(bp);
1390 buf_brelse(bp);
1392 bp = NULL;
1393 } else if (bp) {
1394 buf_brelse(bp);
1396 bp = NULL;
1507 if (bp)
1508 buf_brelse(bp);
1886 buf_t bp;
1898 hfsmp->hfs_physical_block_size, NOCRED, &bp);
1904 if (retval == 0 && ((buf_flags(bp) & (B_DELWRI | B_LOCKED)) == B_DELWRI)) {
1905 buf_bwrite(bp);
1906 } else if (bp) {
1907 buf_brelse(bp);
1917 hfsmp->hfs_physical_block_size, NOCRED, &bp);
1918 if (retval == 0 && ((buf_flags(bp) & (B_DELWRI | B_LOCKED)) == B_DELWRI)) {
1919 buf_bwrite(bp);
1920 } else if (bp) {
1921 buf_brelse(bp);
2901 struct buf *bp = NULL;
2907 retval = (int)buf_bread(hfsmp->hfs_devvp, (daddr64_t)HFS_PRI_SECTOR(sectorsize), sectorsize, NOCRED, &bp);
2909 if (bp)
2910 buf_brelse(bp);
2916 mdb = (HFSMasterDirectoryBlock *)(buf_dataptr(bp) + HFS_PRI_OFFSET(sectorsize));
2980 buf_bawrite(bp);
2982 retval = VNOP_BWRITE(bp);
3003 struct buf *bp;
3026 hfsmp->hfs_physical_block_size, NOCRED, &bp);
3028 if (bp)
3029 buf_brelse(bp);
3038 journal_modify_block_start(hfsmp->jnl, bp);
3041 volumeHeader = (HFSPlusVolumeHeader *)((char *)buf_dataptr(bp) +
3058 buf_brelse(bp);
3245 journal_modify_block_end(hfsmp->jnl, bp, NULL, NULL);
3248 buf_bawrite(bp);
3250 retval = VNOP_BWRITE(bp);
3275 struct buf *bp;
3445 bp = NULL;
3448 error = (int)buf_meta_bread(vp, blkno, vcb->blockSize, NOCRED, &bp);
3450 if (bp) {
3451 buf_brelse(bp);
3455 bzero((char *)buf_dataptr(bp), vcb->blockSize);
3456 buf_markaged(bp);
3457 error = (int)buf_bwrite(bp);
3548 bp = NULL;
3552 hfsmp->hfs_physical_block_size, NOCRED, &bp) == 0) {
3553 journal_modify_block_start(hfsmp->jnl, bp);
3555 bzero((char *)buf_dataptr(bp) + HFS_ALT_OFFSET(hfsmp->hfs_physical_block_size), kMDBSize);
3557 journal_modify_block_end(hfsmp->jnl, bp, NULL, NULL);
3558 } else if (bp) {
3559 buf_brelse(bp);
3615 struct buf *bp = NULL;
3753 hfsmp->hfs_physical_block_size, NOCRED, &bp) == 0) {
3755 bzero((void*)((char *)buf_dataptr(bp) + HFS_ALT_OFFSET(hfsmp->hfs_physical_block_size)), kMDBSize);
3756 (void) VNOP_BWRITE(bp);
3757 } else if (bp) {
3758 buf_brelse(bp);
3760 bp = NULL;
3834 hfs_invalidate_block_numbers_callback(buf_t bp, void *args_in)
3839 blkno = buf_blkno(bp);
3843 buf_setblkno(bp, buf_lblkno(bp));
3877 buf_t bp = NULL;
3920 bp = buf_alloc(hfsmp->hfs_devvp);
3921 buf_setdataptr(bp, (uintptr_t)buffer);
3931 buf_reset(bp, B_READ);
3932 buf_setsize(bp, ioSize);
3933 buf_setcount(bp, ioSize);
3934 buf_setblkno(bp, srcSector);
3935 buf_setlblkno(bp, srcSector);
3938 err = VNOP_STRATEGY(bp);
3940 err = buf_biowait(bp);
3947 buf_reset(bp, B_WRITE);
3948 buf_setsize(bp, ioSize);
3949 buf_setcount(bp, ioSize);
3950 buf_setblkno(bp, destSector);
3951 buf_setlblkno(bp, destSector);
3953 buf_markfua(bp);
3957 err = VNOP_STRATEGY(bp);
3959 err = buf_biowait(bp);
3969 if (bp)
3970 buf_free(bp);
4234 buf_t bp;
4239 hfsmp->blockSize, vfs_context_ucred(args->context), &bp);
4244 jibp = (JournalInfoBlock*) buf_dataptr(bp);
4248 buf_markfua(bp);
4249 error = buf_bwrite(bp);