/fs/xfs/ |
D | xfs_buf.c | 54 struct xfs_buf *bp) in xfs_buf_is_vmapped() argument 63 return bp->b_addr && bp->b_page_count > 1; in xfs_buf_is_vmapped() 68 struct xfs_buf *bp) in xfs_buf_vmap_len() argument 70 return (bp->b_page_count * PAGE_SIZE) - bp->b_offset; in xfs_buf_vmap_len() 88 struct xfs_buf *bp) in xfs_buf_ioacct_inc() argument 90 if (bp->b_flags & XBF_NO_IOACCT) in xfs_buf_ioacct_inc() 93 ASSERT(bp->b_flags & XBF_ASYNC); in xfs_buf_ioacct_inc() 94 spin_lock(&bp->b_lock); in xfs_buf_ioacct_inc() 95 if (!(bp->b_state & XFS_BSTATE_IN_FLIGHT)) { in xfs_buf_ioacct_inc() 96 bp->b_state |= XFS_BSTATE_IN_FLIGHT; in xfs_buf_ioacct_inc() [all …]
|
D | xfs_trans_buf.c | 63 struct xfs_buf *bp, in _xfs_trans_bjoin() argument 68 ASSERT(bp->b_transp == NULL); in _xfs_trans_bjoin() 75 xfs_buf_item_init(bp, tp->t_mountp); in _xfs_trans_bjoin() 76 bip = bp->b_log_item; in _xfs_trans_bjoin() 93 bp->b_transp = tp; in _xfs_trans_bjoin() 100 struct xfs_buf *bp) in xfs_trans_bjoin() argument 102 _xfs_trans_bjoin(tp, bp, 0); in xfs_trans_bjoin() 103 trace_xfs_trans_bjoin(bp->b_log_item); in xfs_trans_bjoin() 123 xfs_buf_t *bp; in xfs_trans_get_buf_map() local 135 bp = xfs_trans_buf_item_match(tp, target, map, nmaps); in xfs_trans_get_buf_map() [all …]
|
D | xfs_buf_item.c | 28 STATIC void xfs_buf_do_callbacks(struct xfs_buf *bp); 55 struct xfs_buf *bp = bip->bli_buf; in xfs_buf_item_size_segment() local 89 } else if (xfs_buf_offset(bp, next_bit * XFS_BLF_CHUNK) != in xfs_buf_item_size_segment() 90 (xfs_buf_offset(bp, last_bit * XFS_BLF_CHUNK) + in xfs_buf_item_size_segment() 176 struct xfs_buf *bp, in xfs_buf_item_copy_iovec() argument 183 xfs_buf_offset(bp, offset), in xfs_buf_item_copy_iovec() 189 struct xfs_buf *bp, in xfs_buf_item_straddle() argument 194 return xfs_buf_offset(bp, offset + (next_bit << XFS_BLF_SHIFT)) != in xfs_buf_item_straddle() 195 (xfs_buf_offset(bp, offset + (last_bit << XFS_BLF_SHIFT)) + in xfs_buf_item_straddle() 207 struct xfs_buf *bp = bip->bli_buf; in xfs_buf_item_format_segment() local [all …]
|
D | xfs_buf.h | 118 xfs_failaddr_t (*verify_struct)(struct xfs_buf *bp); 244 void xfs_buf_hold(struct xfs_buf *bp); 254 #define xfs_buf_islocked(bp) \ argument 255 ((bp)->b_sema.count <= 0) 258 extern int xfs_bwrite(struct xfs_buf *bp); 259 extern void xfs_buf_ioend(struct xfs_buf *bp); 260 extern void __xfs_buf_ioerror(struct xfs_buf *bp, int error, 262 #define xfs_buf_ioerror(bp, err) __xfs_buf_ioerror((bp), (err), __this_address) argument 265 extern int __xfs_buf_submit(struct xfs_buf *bp, bool); 266 static inline int xfs_buf_submit(struct xfs_buf *bp) in xfs_buf_submit() argument [all …]
|
D | xfs_attr_inactive.c | 84 struct xfs_buf *bp) in xfs_attr3_leaf_inactive() argument 87 struct xfs_mount *mp = bp->b_mount; in xfs_attr3_leaf_inactive() 88 struct xfs_attr_leafblock *leaf = bp->b_addr; in xfs_attr3_leaf_inactive() 119 xfs_trans_brelse(*trans, bp); in xfs_attr3_leaf_inactive() 132 struct xfs_buf *bp, in xfs_attr3_node_inactive() argument 148 xfs_buf_mark_corrupt(bp); in xfs_attr3_node_inactive() 149 xfs_trans_brelse(*trans, bp); /* no locks for later trans */ in xfs_attr3_node_inactive() 153 node = bp->b_addr; in xfs_attr3_node_inactive() 155 parent_blkno = bp->b_bn; in xfs_attr3_node_inactive() 157 xfs_trans_brelse(*trans, bp); in xfs_attr3_node_inactive() [all …]
|
D | xfs_attr_list.c | 207 struct xfs_buf *bp; in xfs_attr_node_list_lookup() local 216 error = xfs_da3_node_read(tp, dp, cursor->blkno, -1, &bp, in xfs_attr_node_list_lookup() 220 node = bp->b_addr; in xfs_attr_node_list_lookup() 255 xfs_trans_brelse(tp, bp); in xfs_attr_node_list_lookup() 270 *pbp = bp; in xfs_attr_node_list_lookup() 274 xfs_buf_mark_corrupt(bp); in xfs_attr_node_list_lookup() 275 xfs_trans_brelse(tp, bp); in xfs_attr_node_list_lookup() 287 struct xfs_buf *bp; in xfs_attr_node_list() local 302 bp = NULL; in xfs_attr_node_list() 305 &bp, XFS_ATTR_FORK); in xfs_attr_node_list() [all …]
|
/fs/afs/ |
D | fsclient.c | 28 const __be32 *bp = *_bp; in xdr_decode_AFSFid() local 30 fid->vid = ntohl(*bp++); in xdr_decode_AFSFid() 31 fid->vnode = ntohl(*bp++); in xdr_decode_AFSFid() 32 fid->unique = ntohl(*bp++); in xdr_decode_AFSFid() 33 *_bp = bp; in xdr_decode_AFSFid() 39 static void xdr_dump_bad(const __be32 *bp) in xdr_dump_bad() argument 46 memcpy(x, bp, 16); in xdr_dump_bad() 47 bp += 4; in xdr_dump_bad() 52 memcpy(x, bp, 4); in xdr_dump_bad() 147 const __be32 *bp = *_bp; in xdr_decode_AFSCallBack() local [all …]
|
D | yfsclient.c | 38 static __be32 *xdr_encode_u32(__be32 *bp, u32 n) in xdr_encode_u32() argument 40 *bp++ = htonl(n); in xdr_encode_u32() 41 return bp; in xdr_encode_u32() 44 static __be32 *xdr_encode_u64(__be32 *bp, u64 n) in xdr_encode_u64() argument 46 struct yfs_xdr_u64 *x = (void *)bp; in xdr_encode_u64() 49 return bp + xdr_size(x); in xdr_encode_u64() 52 static __be32 *xdr_encode_YFSFid(__be32 *bp, struct afs_fid *fid) in xdr_encode_YFSFid() argument 54 struct yfs_xdr_YFSFid *x = (void *)bp; in xdr_encode_YFSFid() 60 return bp + xdr_size(x); in xdr_encode_YFSFid() 68 static __be32 *xdr_encode_string(__be32 *bp, const char *p, unsigned int len) in xdr_encode_string() argument [all …]
|
D | vlclient.c | 136 __be32 *bp; in afs_vl_get_entry_by_name_u() local 159 bp = call->request; in afs_vl_get_entry_by_name_u() 160 *bp++ = htonl(VLGETENTRYBYNAMEU); in afs_vl_get_entry_by_name_u() 161 *bp++ = htonl(volnamesz); in afs_vl_get_entry_by_name_u() 162 memcpy(bp, volname, volnamesz); in afs_vl_get_entry_by_name_u() 164 memset((void *)bp + volnamesz, 0, padsz); in afs_vl_get_entry_by_name_u() 183 __be32 *bp; in afs_deliver_vl_get_addrs_u() local 204 bp = call->buffer + sizeof(struct afs_uuid__xdr); in afs_deliver_vl_get_addrs_u() 205 uniquifier = ntohl(*bp++); in afs_deliver_vl_get_addrs_u() 206 nentries = ntohl(*bp++); in afs_deliver_vl_get_addrs_u() [all …]
|
/fs/jfs/ |
D | jfs_logmgr.c | 175 static void lbmFree(struct lbuf * bp); 176 static void lbmfree(struct lbuf * bp); 178 static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, int cant_block); 179 static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag); 180 static int lbmIOWait(struct lbuf * bp, int flag); 182 static void lbmStartIO(struct lbuf * bp); 348 struct lbuf *bp; /* dst log page buffer */ in lmWriteRecord() local 367 bp = (struct lbuf *) log->bp; in lmWriteRecord() 368 lp = (struct logpage *) bp->l_ldata; in lmWriteRecord() 418 bp = log->bp; in lmWriteRecord() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_symlink_remote.c | 41 struct xfs_buf *bp) in xfs_symlink_hdr_set() argument 43 struct xfs_dsymlink_hdr *dsl = bp->b_addr; in xfs_symlink_hdr_set() 54 dsl->sl_blkno = cpu_to_be64(bp->b_bn); in xfs_symlink_hdr_set() 55 bp->b_ops = &xfs_symlink_buf_ops; in xfs_symlink_hdr_set() 70 struct xfs_buf *bp) in xfs_symlink_hdr_ok() argument 72 struct xfs_dsymlink_hdr *dsl = bp->b_addr; in xfs_symlink_hdr_ok() 87 struct xfs_buf *bp) in xfs_symlink_verify() argument 89 struct xfs_mount *mp = bp->b_mount; in xfs_symlink_verify() 90 struct xfs_dsymlink_hdr *dsl = bp->b_addr; in xfs_symlink_verify() 94 if (!xfs_verify_magic(bp, dsl->sl_magic)) in xfs_symlink_verify() [all …]
|
D | xfs_rtbitmap.c | 31 struct xfs_buf *bp) in xfs_rtbuf_verify_read() argument 38 struct xfs_buf *bp) in xfs_rtbuf_verify_write() argument 61 xfs_buf_t *bp; /* block buffer, result */ in xfs_rtbuf_get() local 81 mp->m_bsize, 0, &bp, &xfs_rtbuf_ops); in xfs_rtbuf_get() 85 xfs_trans_buf_set_type(tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF in xfs_rtbuf_get() 87 *bpp = bp; in xfs_rtbuf_get() 106 xfs_buf_t *bp; /* buf for the block */ in xfs_rtfind_back() local 121 error = xfs_rtbuf_get(mp, tp, block, 0, &bp); in xfs_rtfind_back() 125 bufp = bp->b_addr; in xfs_rtfind_back() 158 xfs_trans_brelse(tp, bp); in xfs_rtfind_back() [all …]
|
D | xfs_attr_remote.c | 91 struct xfs_buf *bp, in xfs_attr3_rmt_verify() argument 100 if (!xfs_verify_magic(bp, rmt->rm_magic)) in xfs_attr3_rmt_verify() 119 struct xfs_buf *bp, in __xfs_attr3_rmt_read_verify() argument 123 struct xfs_mount *mp = bp->b_mount; in __xfs_attr3_rmt_read_verify() 133 ptr = bp->b_addr; in __xfs_attr3_rmt_read_verify() 134 bno = bp->b_bn; in __xfs_attr3_rmt_read_verify() 135 len = BBTOB(bp->b_length); in __xfs_attr3_rmt_read_verify() 144 *failaddr = xfs_attr3_rmt_verify(mp, bp, ptr, blksize, bno); in __xfs_attr3_rmt_read_verify() 162 struct xfs_buf *bp) in xfs_attr3_rmt_read_verify() argument 167 error = __xfs_attr3_rmt_read_verify(bp, true, &fa); in xfs_attr3_rmt_read_verify() [all …]
|
D | xfs_dir2_node.c | 27 static int xfs_dir2_leafn_add(struct xfs_buf *bp, xfs_da_args_t *args, 32 static int xfs_dir2_leafn_remove(xfs_da_args_t *args, struct xfs_buf *bp, 43 struct xfs_buf *bp) in xfs_dir3_leafn_check() argument 45 struct xfs_dir2_leaf *leaf = bp->b_addr; in xfs_dir3_leafn_check() 51 struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr; in xfs_dir3_leafn_check() 52 if (be64_to_cpu(leaf3->info.blkno) != bp->b_bn) in xfs_dir3_leafn_check() 63 struct xfs_buf *bp) in xfs_dir3_leaf_check() argument 67 fa = xfs_dir3_leafn_check(dp, bp); in xfs_dir3_leaf_check() 71 bp->b_addr, BBTOB(bp->b_length), __FILE__, __LINE__, in xfs_dir3_leaf_check() 76 #define xfs_dir3_leaf_check(dp, bp) argument [all …]
|
D | xfs_da_btree.c | 96 state->altpath.blk[i].bp = NULL; in xfs_da_state_kill_altpath() 120 struct xfs_buf *bp, in xfs_da3_blkinfo_verify() argument 123 struct xfs_mount *mp = bp->b_mount; in xfs_da3_blkinfo_verify() 126 if (!xfs_verify_magic16(bp, hdr->magic)) in xfs_da3_blkinfo_verify() 132 if (be64_to_cpu(hdr3->blkno) != bp->b_bn) in xfs_da3_blkinfo_verify() 143 struct xfs_buf *bp) in xfs_da3_node_verify() argument 145 struct xfs_mount *mp = bp->b_mount; in xfs_da3_node_verify() 146 struct xfs_da_intnode *hdr = bp->b_addr; in xfs_da3_node_verify() 155 fa = xfs_da3_blkinfo_verify(bp, bp->b_addr); in xfs_da3_node_verify() 181 struct xfs_buf *bp) in xfs_da3_node_write_verify() argument [all …]
|
D | xfs_dquot_buf.c | 139 struct xfs_buf *bp, in xfs_dquot_buf_verify_crc() argument 142 struct xfs_dqblk *d = (struct xfs_dqblk *)bp->b_addr; in xfs_dquot_buf_verify_crc() 157 ndquots = xfs_calc_dquots_per_chunk(bp->b_length); in xfs_dquot_buf_verify_crc() 163 xfs_buf_verifier_error(bp, -EFSBADCRC, __func__, in xfs_dquot_buf_verify_crc() 174 struct xfs_buf *bp, in xfs_dquot_buf_verify() argument 177 struct xfs_dqblk *dqb = bp->b_addr; in xfs_dquot_buf_verify() 191 ndquots = xfs_calc_dquots_per_chunk(bp->b_length); in xfs_dquot_buf_verify() 211 xfs_buf_verifier_error(bp, -EFSCORRUPTED, in xfs_dquot_buf_verify() 223 struct xfs_buf *bp) in xfs_dquot_buf_verify_struct() argument 225 struct xfs_mount *mp = bp->b_mount; in xfs_dquot_buf_verify_struct() [all …]
|
D | xfs_dir2_block.c | 27 static void xfs_dir2_block_log_leaf(xfs_trans_t *tp, struct xfs_buf *bp, 29 static void xfs_dir2_block_log_tail(xfs_trans_t *tp, struct xfs_buf *bp); 48 struct xfs_buf *bp) in xfs_dir3_block_verify() argument 50 struct xfs_mount *mp = bp->b_mount; in xfs_dir3_block_verify() 51 struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; in xfs_dir3_block_verify() 53 if (!xfs_verify_magic(bp, hdr3->magic)) in xfs_dir3_block_verify() 59 if (be64_to_cpu(hdr3->blkno) != bp->b_bn) in xfs_dir3_block_verify() 64 return __xfs_dir3_data_check(NULL, bp); in xfs_dir3_block_verify() 69 struct xfs_buf *bp) in xfs_dir3_block_read_verify() argument 71 struct xfs_mount *mp = bp->b_mount; in xfs_dir3_block_read_verify() [all …]
|
D | xfs_ag.c | 33 struct xfs_buf *bp; in xfs_get_aghdr_buf() local 35 bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0); in xfs_get_aghdr_buf() 36 if (!bp) in xfs_get_aghdr_buf() 39 xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); in xfs_get_aghdr_buf() 40 bp->b_bn = blkno; in xfs_get_aghdr_buf() 41 bp->b_maps[0].bm_bn = blkno; in xfs_get_aghdr_buf() 42 bp->b_ops = ops; in xfs_get_aghdr_buf() 44 return bp; in xfs_get_aghdr_buf() 59 struct xfs_buf *bp, in xfs_btroot_init() argument 62 xfs_btree_init_block(mp, bp, id->type, 0, 0, id->agno); in xfs_btroot_init() [all …]
|
D | xfs_dir2_data.c | 34 struct xfs_buf *bp) /* data block's buffer */ in __xfs_dir3_data_check() argument 50 struct xfs_mount *mp = bp->b_mount; in __xfs_dir3_data_check() 73 hdr = bp->b_addr; in __xfs_dir3_data_check() 230 struct xfs_buf *bp) in xfs_dir3_data_check() argument 234 fa = __xfs_dir3_data_check(dp, bp); in xfs_dir3_data_check() 238 bp->b_addr, BBTOB(bp->b_length), __FILE__, __LINE__, in xfs_dir3_data_check() 246 struct xfs_buf *bp) in xfs_dir3_data_verify() argument 248 struct xfs_mount *mp = bp->b_mount; in xfs_dir3_data_verify() 249 struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; in xfs_dir3_data_verify() 251 if (!xfs_verify_magic(bp, hdr3->magic)) in xfs_dir3_data_verify() [all …]
|
D | xfs_btree.c | 61 struct xfs_buf *bp) in __xfs_btree_check_lblock() argument 71 cpu_to_be64(bp ? bp->b_bn : XFS_BUF_DADDR_NULL)) in __xfs_btree_check_lblock() 102 struct xfs_buf *bp) in xfs_btree_check_lblock() argument 107 fa = __xfs_btree_check_lblock(cur, block, level, bp); in xfs_btree_check_lblock() 110 if (bp) in xfs_btree_check_lblock() 111 trace_xfs_btree_corrupt(bp, _RET_IP_); in xfs_btree_check_lblock() 127 struct xfs_buf *bp) in __xfs_btree_check_sblock() argument 137 cpu_to_be64(bp ? bp->b_bn : XFS_BUF_DADDR_NULL)) in __xfs_btree_check_sblock() 166 struct xfs_buf *bp) in xfs_btree_check_sblock() argument 171 fa = __xfs_btree_check_sblock(cur, block, level, bp); in xfs_btree_check_sblock() [all …]
|
D | xfs_sb.c | 145 struct xfs_buf *bp, in xfs_validate_sb_write() argument 158 if (XFS_BUF_ADDR(bp) == XFS_SB_DADDR && !sbp->sb_inprogress && in xfs_validate_sb_write() 219 struct xfs_buf *bp, in xfs_validate_sb_common() argument 222 struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); in xfs_validate_sb_common() 226 if (!xfs_verify_magic(bp, dsb->sb_magicnum)) { in xfs_validate_sb_common() 390 if (XFS_BUF_ADDR(bp) == XFS_SB_DADDR && sbp->sb_inprogress) { in xfs_validate_sb_common() 679 struct xfs_buf *bp) in xfs_sb_read_verify() argument 682 struct xfs_mount *mp = bp->b_mount; in xfs_sb_read_verify() 683 struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); in xfs_sb_read_verify() 695 if (!xfs_buf_verify_cksum(bp, XFS_SB_CRC_OFF)) { in xfs_sb_read_verify() [all …]
|
D | xfs_attr.c | 582 struct xfs_buf *bp; in xfs_attr_leaf_addname() local 592 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); in xfs_attr_leaf_addname() 600 retval = xfs_attr3_leaf_lookup_int(bp, args); in xfs_attr_leaf_addname() 602 xfs_trans_brelse(args->trans, bp); in xfs_attr_leaf_addname() 606 xfs_trans_brelse(args->trans, bp); in xfs_attr_leaf_addname() 634 retval = xfs_attr3_leaf_add(bp, args); in xfs_attr_leaf_addname() 718 -1, &bp); in xfs_attr_leaf_addname() 722 xfs_attr3_leaf_remove(bp, args); in xfs_attr_leaf_addname() 727 if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { in xfs_attr_leaf_addname() 728 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); in xfs_attr_leaf_addname() [all …]
|
/fs/xfs/scrub/ |
D | dabtree.c | 93 baddr = blk->bp->b_addr; in xchk_da_btree_entry() 172 struct xfs_buf *bp) in xchk_da_btree_read_verify() argument 174 struct xfs_da_blkinfo *info = bp->b_addr; in xchk_da_btree_read_verify() 179 bp->b_ops = &xfs_dir3_leaf1_buf_ops; in xchk_da_btree_read_verify() 180 bp->b_ops->verify_read(bp); in xchk_da_btree_read_verify() 187 bp->b_ops = &xfs_da3_node_buf_ops; in xchk_da_btree_read_verify() 188 bp->b_ops->verify_read(bp); in xchk_da_btree_read_verify() 194 struct xfs_buf *bp) in xchk_da_btree_write_verify() argument 196 struct xfs_da_blkinfo *info = bp->b_addr; in xchk_da_btree_write_verify() 201 bp->b_ops = &xfs_dir3_leaf1_buf_ops; in xchk_da_btree_write_verify() [all …]
|
D | agheader.c | 26 struct xfs_buf *bp) in xchk_superblock_xref() argument 63 struct xfs_buf *bp; in xchk_superblock() local 75 error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp); in xchk_superblock() 95 sb = XFS_BUF_TO_SBP(bp); in xchk_superblock() 104 xchk_block_set_corrupt(sc, bp); in xchk_superblock() 107 xchk_block_set_corrupt(sc, bp); in xchk_superblock() 110 xchk_block_set_corrupt(sc, bp); in xchk_superblock() 113 xchk_block_set_corrupt(sc, bp); in xchk_superblock() 116 xchk_block_set_preen(sc, bp); in xchk_superblock() 119 xchk_block_set_corrupt(sc, bp); in xchk_superblock() [all …]
|
D | repair.c | 181 struct xfs_buf *bp; in xrep_calc_ag_resblks() local 201 error = xfs_ialloc_read_agi(mp, NULL, sm->sm_agno, &bp); in xrep_calc_ag_resblks() 204 xfs_buf_relse(bp); in xrep_calc_ag_resblks() 209 error = xfs_alloc_read_agf(mp, NULL, sm->sm_agno, 0, &bp); in xrep_calc_ag_resblks() 211 aglen = be32_to_cpu(XFS_BUF_TO_AGF(bp)->agf_length); in xrep_calc_ag_resblks() 212 freelen = be32_to_cpu(XFS_BUF_TO_AGF(bp)->agf_freeblks); in xrep_calc_ag_resblks() 214 xfs_buf_relse(bp); in xrep_calc_ag_resblks() 343 struct xfs_buf *bp; in xrep_init_btblock() local 349 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb), in xrep_init_btblock() 351 xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); in xrep_init_btblock() [all …]
|