Lines Matching refs:bp
204 struct xfs_buf *bp, in xlog_recover_validate_buf_type() argument
208 struct xfs_da_blkinfo *info = bp->b_addr; in xlog_recover_validate_buf_type()
225 magic32 = be32_to_cpu(*(__be32 *)bp->b_addr); in xlog_recover_validate_buf_type()
226 magic16 = be16_to_cpu(*(__be16*)bp->b_addr); in xlog_recover_validate_buf_type()
233 bp->b_ops = &xfs_bnobt_buf_ops; in xlog_recover_validate_buf_type()
237 bp->b_ops = &xfs_cntbt_buf_ops; in xlog_recover_validate_buf_type()
241 bp->b_ops = &xfs_inobt_buf_ops; in xlog_recover_validate_buf_type()
245 bp->b_ops = &xfs_finobt_buf_ops; in xlog_recover_validate_buf_type()
249 bp->b_ops = &xfs_bmbt_buf_ops; in xlog_recover_validate_buf_type()
252 bp->b_ops = &xfs_rmapbt_buf_ops; in xlog_recover_validate_buf_type()
255 bp->b_ops = &xfs_refcountbt_buf_ops; in xlog_recover_validate_buf_type()
267 bp->b_ops = &xfs_agf_buf_ops; in xlog_recover_validate_buf_type()
274 bp->b_ops = &xfs_agfl_buf_ops; in xlog_recover_validate_buf_type()
281 bp->b_ops = &xfs_agi_buf_ops; in xlog_recover_validate_buf_type()
291 bp->b_ops = &xfs_dquot_buf_ops; in xlog_recover_validate_buf_type()
303 bp->b_ops = &xfs_inode_buf_ops; in xlog_recover_validate_buf_type()
310 bp->b_ops = &xfs_symlink_buf_ops; in xlog_recover_validate_buf_type()
318 bp->b_ops = &xfs_dir3_block_buf_ops; in xlog_recover_validate_buf_type()
326 bp->b_ops = &xfs_dir3_data_buf_ops; in xlog_recover_validate_buf_type()
334 bp->b_ops = &xfs_dir3_free_buf_ops; in xlog_recover_validate_buf_type()
342 bp->b_ops = &xfs_dir3_leaf1_buf_ops; in xlog_recover_validate_buf_type()
350 bp->b_ops = &xfs_dir3_leafn_buf_ops; in xlog_recover_validate_buf_type()
358 bp->b_ops = &xfs_da3_node_buf_ops; in xlog_recover_validate_buf_type()
366 bp->b_ops = &xfs_attr3_leaf_buf_ops; in xlog_recover_validate_buf_type()
373 bp->b_ops = &xfs_attr3_rmt_buf_ops; in xlog_recover_validate_buf_type()
380 bp->b_ops = &xfs_sb_buf_ops; in xlog_recover_validate_buf_type()
386 bp->b_ops = &xfs_rtbuf_ops; in xlog_recover_validate_buf_type()
419 if (bp->b_ops) { in xlog_recover_validate_buf_type()
422 bp->b_flags |= _XBF_LOGRECOVERY; in xlog_recover_validate_buf_type()
423 xfs_buf_item_init(bp, mp); in xlog_recover_validate_buf_type()
424 bip = bp->b_log_item; in xlog_recover_validate_buf_type()
439 struct xfs_buf *bp, in xlog_recover_do_reg_buffer() argument
463 ASSERT(BBTOB(bp->b_length) >= in xlog_recover_do_reg_buffer()
500 fa, bp->b_bn); in xlog_recover_do_reg_buffer()
505 memcpy(xfs_buf_offset(bp, in xlog_recover_do_reg_buffer()
517 xlog_recover_validate_buf_type(mp, bp, buf_f, current_lsn); in xlog_recover_do_reg_buffer()
534 struct xfs_buf *bp, in xlog_recover_do_dquot_buffer() argument
560 xlog_recover_do_reg_buffer(mp, item, bp, buf_f, NULLCOMMITLSN); in xlog_recover_do_dquot_buffer()
580 struct xfs_buf *bp, in xlog_recover_do_inode_buffer() argument
601 bp->b_ops = &xfs_inode_buf_ops; in xlog_recover_do_inode_buffer()
603 inodes_per_buf = BBTOB(bp->b_length) >> mp->m_sb.sb_inodelog; in xlog_recover_do_inode_buffer()
645 ASSERT((reg_buf_offset + reg_buf_bytes) <= BBTOB(bp->b_length)); in xlog_recover_do_inode_buffer()
658 item, bp); in xlog_recover_do_inode_buffer()
662 buffer_nextp = xfs_buf_offset(bp, next_unlinked_offset); in xlog_recover_do_inode_buffer()
671 xfs_buf_offset(bp, i * mp->m_sb.sb_inodesize)); in xlog_recover_do_inode_buffer()
701 struct xfs_buf *bp) in xlog_recover_get_buf_lsn() argument
706 void *blk = bp->b_addr; in xlog_recover_get_buf_lsn()
873 struct xfs_buf *bp; in xlog_recover_buf_commit_pass2() local
900 buf_flags, &bp, NULL); in xlog_recover_buf_commit_pass2()
923 lsn = xlog_recover_get_buf_lsn(mp, bp); in xlog_recover_buf_commit_pass2()
926 xlog_recover_validate_buf_type(mp, bp, buf_f, NULLCOMMITLSN); in xlog_recover_buf_commit_pass2()
933 if (bp->b_ops) { in xlog_recover_buf_commit_pass2()
934 bp->b_ops->verify_read(bp); in xlog_recover_buf_commit_pass2()
935 error = bp->b_error; in xlog_recover_buf_commit_pass2()
941 error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); in xlog_recover_buf_commit_pass2()
948 dirty = xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f); in xlog_recover_buf_commit_pass2()
952 xlog_recover_do_reg_buffer(mp, item, bp, buf_f, current_lsn); in xlog_recover_buf_commit_pass2()
971 be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && in xlog_recover_buf_commit_pass2()
972 (BBTOB(bp->b_length) != M_IGEO(log->l_mp)->inode_cluster_size)) { in xlog_recover_buf_commit_pass2()
973 xfs_buf_stale(bp); in xlog_recover_buf_commit_pass2()
974 error = xfs_bwrite(bp); in xlog_recover_buf_commit_pass2()
976 ASSERT(bp->b_mount == mp); in xlog_recover_buf_commit_pass2()
977 bp->b_flags |= _XBF_LOGRECOVERY; in xlog_recover_buf_commit_pass2()
978 xfs_buf_delwri_queue(bp, buffer_list); in xlog_recover_buf_commit_pass2()
982 xfs_buf_relse(bp); in xlog_recover_buf_commit_pass2()