Lines Matching refs:bp
80 xfs_buf_t *bp; in xfs_trans_get_buf() local
90 bp = xfs_buf_get_flags(target_dev, blkno, len, in xfs_trans_get_buf()
92 return(bp); in xfs_trans_get_buf()
102 bp = xfs_trans_buf_item_match(tp, target_dev, blkno, len); in xfs_trans_get_buf()
104 bp = xfs_trans_buf_item_match_all(tp, target_dev, blkno, len); in xfs_trans_get_buf()
106 if (bp != NULL) { in xfs_trans_get_buf()
107 ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); in xfs_trans_get_buf()
109 xfs_buftrace("TRANS GET RECUR SHUT", bp); in xfs_trans_get_buf()
110 XFS_BUF_SUPER_STALE(bp); in xfs_trans_get_buf()
117 else if (XFS_BUF_ISSTALE(bp)) { in xfs_trans_get_buf()
118 xfs_buftrace("TRANS GET RECUR STALE", bp); in xfs_trans_get_buf()
119 ASSERT(!XFS_BUF_ISDELAYWRITE(bp)); in xfs_trans_get_buf()
121 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_get_buf()
122 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_get_buf()
126 xfs_buftrace("TRANS GET RECUR", bp); in xfs_trans_get_buf()
128 return (bp); in xfs_trans_get_buf()
139 bp = xfs_buf_get_flags(target_dev, blkno, len, flags | BUF_BUSY); in xfs_trans_get_buf()
140 if (bp == NULL) { in xfs_trans_get_buf()
144 ASSERT(!XFS_BUF_GETERROR(bp)); in xfs_trans_get_buf()
151 xfs_buf_item_init(bp, tp->t_mountp); in xfs_trans_get_buf()
157 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t*); in xfs_trans_get_buf()
177 XFS_BUF_SET_FSPRIVATE2(bp, tp); in xfs_trans_get_buf()
179 xfs_buftrace("TRANS GET", bp); in xfs_trans_get_buf()
181 return (bp); in xfs_trans_get_buf()
197 xfs_buf_t *bp; in xfs_trans_getsb() local
214 bp = mp->m_sb_bp; in xfs_trans_getsb()
215 if (XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp) { in xfs_trans_getsb()
216 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t*); in xfs_trans_getsb()
221 return (bp); in xfs_trans_getsb()
224 bp = xfs_getsb(mp, flags); in xfs_trans_getsb()
225 if (bp == NULL) { in xfs_trans_getsb()
234 xfs_buf_item_init(bp, mp); in xfs_trans_getsb()
240 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t*); in xfs_trans_getsb()
260 XFS_BUF_SET_FSPRIVATE2(bp, tp); in xfs_trans_getsb()
263 return (bp); in xfs_trans_getsb()
301 xfs_buf_t *bp; in xfs_trans_read_buf() local
312 bp = xfs_buf_read_flags(target, blkno, len, flags | BUF_BUSY); in xfs_trans_read_buf()
313 if (!bp) in xfs_trans_read_buf()
316 if ((bp != NULL) && (XFS_BUF_GETERROR(bp) != 0)) { in xfs_trans_read_buf()
318 bp, blkno); in xfs_trans_read_buf()
319 error = XFS_BUF_GETERROR(bp); in xfs_trans_read_buf()
320 xfs_buf_relse(bp); in xfs_trans_read_buf()
324 if (xfs_do_error && (bp != NULL)) { in xfs_trans_read_buf()
327 xfs_buf_relse(bp); in xfs_trans_read_buf()
336 *bpp = bp; in xfs_trans_read_buf()
349 bp = xfs_trans_buf_item_match(tp, target, blkno, len); in xfs_trans_read_buf()
351 bp = xfs_trans_buf_item_match_all(tp, target, blkno, len); in xfs_trans_read_buf()
353 if (bp != NULL) { in xfs_trans_read_buf()
354 ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); in xfs_trans_read_buf()
355 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_read_buf()
356 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_read_buf()
357 ASSERT((XFS_BUF_ISERROR(bp)) == 0); in xfs_trans_read_buf()
358 if (!(XFS_BUF_ISDONE(bp))) { in xfs_trans_read_buf()
359 xfs_buftrace("READ_BUF_INCORE !DONE", bp); in xfs_trans_read_buf()
360 ASSERT(!XFS_BUF_ISASYNC(bp)); in xfs_trans_read_buf()
361 XFS_BUF_READ(bp); in xfs_trans_read_buf()
362 xfsbdstrat(tp->t_mountp, bp); in xfs_trans_read_buf()
363 xfs_iowait(bp); in xfs_trans_read_buf()
364 if (XFS_BUF_GETERROR(bp) != 0) { in xfs_trans_read_buf()
366 bp, blkno); in xfs_trans_read_buf()
367 error = XFS_BUF_GETERROR(bp); in xfs_trans_read_buf()
368 xfs_buf_relse(bp); in xfs_trans_read_buf()
386 xfs_buftrace("READ_BUF_INCORE XFSSHUTDN", bp); in xfs_trans_read_buf()
392 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t*); in xfs_trans_read_buf()
397 *bpp = bp; in xfs_trans_read_buf()
409 bp = xfs_buf_read_flags(target, blkno, len, flags | BUF_BUSY); in xfs_trans_read_buf()
410 if (bp == NULL) { in xfs_trans_read_buf()
414 if (XFS_BUF_GETERROR(bp) != 0) { in xfs_trans_read_buf()
415 XFS_BUF_SUPER_STALE(bp); in xfs_trans_read_buf()
416 xfs_buftrace("READ ERROR", bp); in xfs_trans_read_buf()
417 error = XFS_BUF_GETERROR(bp); in xfs_trans_read_buf()
420 bp, blkno); in xfs_trans_read_buf()
423 xfs_buf_relse(bp); in xfs_trans_read_buf()
432 xfs_buf_relse(bp); in xfs_trans_read_buf()
447 xfs_buf_item_init(bp, tp->t_mountp); in xfs_trans_read_buf()
453 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t*); in xfs_trans_read_buf()
473 XFS_BUF_SET_FSPRIVATE2(bp, tp); in xfs_trans_read_buf()
475 xfs_buftrace("TRANS READ", bp); in xfs_trans_read_buf()
477 *bpp = bp; in xfs_trans_read_buf()
488 if (XFS_BUF_ISSTALE(bp) && XFS_BUF_ISDELAYWRITE(bp)) in xfs_trans_read_buf()
489 cmn_err(CE_NOTE, "about to pop assert, bp == 0x%p", bp); in xfs_trans_read_buf()
491 ASSERT((XFS_BUF_BFLAGS(bp) & (XFS_B_STALE|XFS_B_DELWRI)) != in xfs_trans_read_buf()
494 xfs_buftrace("READ_BUF XFSSHUTDN", bp); in xfs_trans_read_buf()
495 xfs_buf_relse(bp); in xfs_trans_read_buf()
518 xfs_buf_t *bp) in xfs_trans_brelse() argument
528 ASSERT(XFS_BUF_FSPRIVATE2(bp, void *) == NULL); in xfs_trans_brelse()
534 if (XFS_BUF_FSPRIVATE(bp, void *) != NULL) { in xfs_trans_brelse()
535 lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *); in xfs_trans_brelse()
537 bip = XFS_BUF_FSPRIVATE(bp,xfs_buf_log_item_t*); in xfs_trans_brelse()
543 xfs_buf_relse(bp); in xfs_trans_brelse()
547 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_brelse()
548 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_brelse()
627 xfs_buf_item_relse(bp); in xfs_trans_brelse()
630 XFS_BUF_SET_FSPRIVATE2(bp, NULL); in xfs_trans_brelse()
641 xfs_buf_relse(bp); in xfs_trans_brelse()
655 xfs_buf_t *bp) in xfs_trans_bjoin() argument
659 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_bjoin()
660 ASSERT(XFS_BUF_FSPRIVATE2(bp, void *) == NULL); in xfs_trans_bjoin()
667 xfs_buf_item_init(bp, tp->t_mountp); in xfs_trans_bjoin()
668 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_bjoin()
687 XFS_BUF_SET_FSPRIVATE2(bp, tp); in xfs_trans_bjoin()
700 xfs_buf_t *bp) in xfs_trans_bhold() argument
704 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_bhold()
705 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_bhold()
706 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_bhold()
708 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_bhold()
727 xfs_buf_t *bp, in xfs_trans_log_buf() argument
734 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_log_buf()
735 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_log_buf()
736 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_log_buf()
737 ASSERT((first <= last) && (last < XFS_BUF_COUNT(bp))); in xfs_trans_log_buf()
738 ASSERT((XFS_BUF_IODONE_FUNC(bp) == NULL) || in xfs_trans_log_buf()
739 (XFS_BUF_IODONE_FUNC(bp) == xfs_buf_iodone_callbacks)); in xfs_trans_log_buf()
751 XFS_BUF_DELAYWRITE(bp); in xfs_trans_log_buf()
752 XFS_BUF_DONE(bp); in xfs_trans_log_buf()
754 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_log_buf()
756 XFS_BUF_SET_IODONE_FUNC(bp, xfs_buf_iodone_callbacks); in xfs_trans_log_buf()
768 ASSERT(XFS_BUF_ISSTALE(bp)); in xfs_trans_log_buf()
769 XFS_BUF_UNSTALE(bp); in xfs_trans_log_buf()
806 xfs_buf_t *bp) in xfs_trans_binval() argument
811 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_binval()
812 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_binval()
813 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_binval()
815 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_binval()
825 ASSERT(!(XFS_BUF_ISDELAYWRITE(bp))); in xfs_trans_binval()
826 ASSERT(XFS_BUF_ISSTALE(bp)); in xfs_trans_binval()
832 xfs_buftrace("XFS_BINVAL RECUR", bp); in xfs_trans_binval()
857 XFS_BUF_UNDELAYWRITE(bp); in xfs_trans_binval()
858 XFS_BUF_STALE(bp); in xfs_trans_binval()
867 xfs_buftrace("XFS_BINVAL", bp); in xfs_trans_binval()
885 xfs_buf_t *bp) in xfs_trans_inode_buf() argument
889 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_inode_buf()
890 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_inode_buf()
891 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_inode_buf()
893 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_inode_buf()
911 xfs_buf_t *bp) in xfs_trans_stale_inode_buf() argument
915 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_stale_inode_buf()
916 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_stale_inode_buf()
917 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_stale_inode_buf()
919 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_stale_inode_buf()
941 xfs_buf_t *bp) in xfs_trans_inode_alloc_buf() argument
945 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_inode_alloc_buf()
946 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_inode_alloc_buf()
947 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_inode_alloc_buf()
949 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_inode_alloc_buf()
970 xfs_buf_t *bp, in xfs_trans_dquot_buf() argument
975 ASSERT(XFS_BUF_ISBUSY(bp)); in xfs_trans_dquot_buf()
976 ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); in xfs_trans_dquot_buf()
977 ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); in xfs_trans_dquot_buf()
981 bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); in xfs_trans_dquot_buf()
1002 xfs_buf_t *bp; in xfs_trans_buf_item_match() local
1005 bp = NULL; in xfs_trans_buf_item_match()
1023 bp = blip->bli_buf; in xfs_trans_buf_item_match()
1024 if ((XFS_BUF_TARGET(bp) == target) && in xfs_trans_buf_item_match()
1025 (XFS_BUF_ADDR(bp) == blkno) && in xfs_trans_buf_item_match()
1026 (XFS_BUF_COUNT(bp) == len)) { in xfs_trans_buf_item_match()
1033 bp = NULL; in xfs_trans_buf_item_match()
1037 return bp; in xfs_trans_buf_item_match()
1055 xfs_buf_t *bp; in xfs_trans_buf_item_match_all() local
1058 bp = NULL; in xfs_trans_buf_item_match_all()
1080 bp = blip->bli_buf; in xfs_trans_buf_item_match_all()
1081 if ((XFS_BUF_TARGET(bp) == target) && in xfs_trans_buf_item_match_all()
1082 (XFS_BUF_ADDR(bp) == blkno) && in xfs_trans_buf_item_match_all()
1083 (XFS_BUF_COUNT(bp) == len)) { in xfs_trans_buf_item_match_all()
1088 return bp; in xfs_trans_buf_item_match_all()