Lines Matching refs:ASSERT
207 ASSERT(offset < XFS_LITINO(mp, ip->i_d.di_version)); in xfs_default_attroffset()
273 ASSERT(be16_to_cpu(block->bb_level) > 0); in xfs_check_block()
281 ASSERT(be64_to_cpu(prevp->br_startoff) < in xfs_check_block()
354 ASSERT(level > 0); in xfs_bmap_check_leaf_extents()
359 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
360 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
361 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
428 ASSERT(xfs_bmbt_disk_get_startoff(&last) + in xfs_bmap_check_leaf_extents()
434 ASSERT(xfs_bmbt_disk_get_startoff(ep) + in xfs_bmap_check_leaf_extents()
497 ASSERT(ret_nmap <= nmap); in xfs_bmap_validate_ret()
500 ASSERT(mval[i].br_blockcount > 0); in xfs_bmap_validate_ret()
502 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
503 ASSERT(mval[i].br_blockcount <= len); in xfs_bmap_validate_ret()
504 ASSERT(mval[i].br_startoff + mval[i].br_blockcount <= in xfs_bmap_validate_ret()
507 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
508 ASSERT(mval[i].br_startoff + mval[i].br_blockcount > in xfs_bmap_validate_ret()
511 ASSERT(i == 0 || in xfs_bmap_validate_ret()
514 ASSERT(mval[i].br_startblock != DELAYSTARTBLOCK && in xfs_bmap_validate_ret()
516 ASSERT(mval[i].br_state == XFS_EXT_NORM || in xfs_bmap_validate_ret()
548 ASSERT(bno != NULLFSBLOCK); in __xfs_bmap_add_free()
549 ASSERT(len > 0); in __xfs_bmap_add_free()
550 ASSERT(len <= MAXEXTLEN); in __xfs_bmap_add_free()
551 ASSERT(!isnullstartblock(bno)); in __xfs_bmap_add_free()
554 ASSERT(agno < mp->m_sb.sb_agcount); in __xfs_bmap_add_free()
555 ASSERT(agbno < mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
556 ASSERT(len < mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
557 ASSERT(agbno + len <= mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
559 ASSERT(xfs_bmap_free_item_zone != NULL); in __xfs_bmap_add_free()
606 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_btree_to_extents()
607 ASSERT(ifp->if_flags & XFS_IFEXTENTS); in xfs_bmap_btree_to_extents()
608 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE); in xfs_bmap_btree_to_extents()
610 ASSERT(be16_to_cpu(rblock->bb_level) == 1); in xfs_bmap_btree_to_extents()
611 ASSERT(be16_to_cpu(rblock->bb_numrecs) == 1); in xfs_bmap_btree_to_extents()
612 ASSERT(xfs_bmbt_maxrecs(mp, ifp->if_broot_bytes, 0) == 1); in xfs_bmap_btree_to_extents()
635 ASSERT(ifp->if_broot == NULL); in xfs_bmap_btree_to_extents()
636 ASSERT((ifp->if_flags & XFS_IFBROOT) == 0); in xfs_bmap_btree_to_extents()
671 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_extents_to_btree()
673 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS); in xfs_bmap_extents_to_btree()
727 ASSERT(tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_extents_to_btree()
755 ASSERT(cnt == XFS_IFORK_NEXTENTS(ip, whichfork)); in xfs_bmap_extents_to_btree()
774 ASSERT(*curp == NULL); in xfs_bmap_extents_to_btree()
784 ASSERT(ifp->if_broot == NULL); in xfs_bmap_extents_to_btree()
803 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_local_to_extents_empty()
804 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents_empty()
805 ASSERT(ifp->if_bytes == 0); in xfs_bmap_local_to_extents_empty()
806 ASSERT(XFS_IFORK_NEXTENTS(ip, whichfork) == 0); in xfs_bmap_local_to_extents_empty()
841 ASSERT(!(S_ISREG(VFS_I(ip)->i_mode) && whichfork == XFS_DATA_FORK)); in xfs_bmap_local_to_extents()
843 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents()
853 ASSERT((ifp->if_flags & (XFS_IFINLINE|XFS_IFEXTENTS)) == XFS_IFINLINE); in xfs_bmap_local_to_extents()
876 ASSERT(args.fsbno != NULLFSBLOCK); in xfs_bmap_local_to_extents()
877 ASSERT(args.len == 1); in xfs_bmap_local_to_extents()
1018 ASSERT(0); in xfs_bmap_add_attrfork_local()
1043 ASSERT(0); in xfs_bmap_set_attrforkoff()
1067 ASSERT(XFS_IFORK_Q(ip) == 0); in xfs_bmap_add_attrfork()
1070 ASSERT(!XFS_NOT_DQATTACHED(mp, ip)); in xfs_bmap_add_attrfork()
1095 ASSERT(ip->i_d.di_aformat == 0); in xfs_bmap_add_attrfork()
1104 ASSERT(ip->i_afp == NULL); in xfs_bmap_add_attrfork()
1181 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_iread_extents()
1288 ASSERT(i == xfs_iext_count(ifp)); in xfs_iread_extents()
1321 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE || in xfs_bmap_first_unused()
1513 ASSERT(ifp->if_flags & XFS_IFEXTENTS); in xfs_bmap_one_block()
1518 ASSERT(XFS_ISIZE(ip) == ip->i_mount->m_sb.sb_blocksize); in xfs_bmap_one_block()
1553 ASSERT(whichfork != XFS_ATTR_FORK); in xfs_bmap_add_extent_delay_real()
1557 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_delay_real()
1558 ASSERT(!bma->cur || in xfs_bmap_add_extent_delay_real()
1572 ASSERT(isnullstartblock(PREV.br_startblock)); in xfs_bmap_add_extent_delay_real()
1573 ASSERT(PREV.br_startoff <= new->br_startoff); in xfs_bmap_add_extent_delay_real()
1574 ASSERT(PREV.br_startoff + PREV.br_blockcount >= new_endoff); in xfs_bmap_add_extent_delay_real()
1987 ASSERT(0); in xfs_bmap_add_extent_delay_real()
2001 ASSERT(bma->cur == NULL); in xfs_bmap_add_extent_delay_real()
2017 ASSERT(state == 0 || da_new < da_old); in xfs_bmap_add_extent_delay_real()
2062 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_unwritten_real()
2075 ASSERT(new->br_state != PREV.br_state); in xfs_bmap_add_extent_unwritten_real()
2077 ASSERT(PREV.br_startoff <= new->br_startoff); in xfs_bmap_add_extent_unwritten_real()
2078 ASSERT(PREV.br_startoff + PREV.br_blockcount >= new_endoff); in xfs_bmap_add_extent_unwritten_real()
2470 ASSERT(0); in xfs_bmap_add_extent_unwritten_real()
2482 ASSERT(cur == NULL); in xfs_bmap_add_extent_unwritten_real()
2524 ASSERT(isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_hole_delay()
2635 ASSERT(oldlen > newlen); in xfs_bmap_add_extent_hole_delay()
2669 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_hole_real()
2670 ASSERT(!cur || !(cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL)); in xfs_bmap_add_extent_hole_real()
2844 ASSERT(cur == NULL); in xfs_bmap_add_extent_hole_real()
2937 ASSERT(align_alen <= MAXEXTLEN); in xfs_bmap_extsize_align()
2983 ASSERT(nexto > prevo); in xfs_bmap_extsize_align()
3026 ASSERT(orig_off >= align_off); in xfs_bmap_extsize_align()
3028 ASSERT(orig_end <= align_off + align_alen || in xfs_bmap_extsize_align()
3034 ASSERT(align_off + align_alen <= gotp->br_startoff); in xfs_bmap_extsize_align()
3036 ASSERT(align_off >= prevp->br_startoff + prevp->br_blockcount); in xfs_bmap_extsize_align()
3400 ASSERT(ap->length); in xfs_bmap_btalloc()
3421 ASSERT(!error); in xfs_bmap_btalloc()
3422 ASSERT(ap->length); in xfs_bmap_btalloc()
3611 ASSERT(ap->tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_btalloc()
3618 ASSERT(nullfb || fb_agno <= args.agno); in xfs_bmap_btalloc()
3726 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3727 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3744 ASSERT(mval->br_blockcount <= len); in xfs_bmapi_trim_map()
3763 ASSERT((flags & XFS_BMAPI_ENTIRE) || in xfs_bmapi_update_map()
3765 ASSERT((flags & XFS_BMAPI_ENTIRE) || (mval->br_blockcount <= *len) || in xfs_bmapi_update_map()
3772 ASSERT(mval->br_startblock == mval[-1].br_startblock); in xfs_bmapi_update_map()
3773 ASSERT(mval->br_blockcount > mval[-1].br_blockcount); in xfs_bmapi_update_map()
3774 ASSERT(mval->br_state == mval[-1].br_state); in xfs_bmapi_update_map()
3783 ASSERT(mval->br_startoff == in xfs_bmapi_update_map()
3825 ASSERT(*nmap >= 1); in xfs_bmapi_read()
3826 ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK|XFS_BMAPI_ENTIRE| in xfs_bmapi_read()
3828 ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED|XFS_ILOCK_EXCL)); in xfs_bmapi_read()
3964 ASSERT(!error); in xfs_bmapi_reserve_delalloc()
3982 ASSERT(indlen > 0); in xfs_bmapi_reserve_delalloc()
4033 ASSERT(bma->length > 0); in xfs_bmapi_allocate()
4136 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4137 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4139 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4170 ASSERT(mval->br_blockcount <= len); in xfs_bmapi_convert_unwritten()
4265 ASSERT(*nmap >= 1); in xfs_bmapi_write()
4266 ASSERT(*nmap <= XFS_BMAP_MAX_NMAP); in xfs_bmapi_write()
4267 ASSERT(tp != NULL || in xfs_bmapi_write()
4270 ASSERT(len > 0); in xfs_bmapi_write()
4271 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_LOCAL); in xfs_bmapi_write()
4272 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmapi_write()
4273 ASSERT(!(flags & XFS_BMAPI_REMAP)); in xfs_bmapi_write()
4276 ASSERT((flags & (XFS_BMAPI_METADATA | XFS_BMAPI_ZERO)) != in xfs_bmapi_write()
4284 ASSERT((flags & (XFS_BMAPI_PREALLOC | XFS_BMAPI_ZERO)) != in xfs_bmapi_write()
4340 ASSERT(!((flags & XFS_BMAPI_CONVERT) && in xfs_bmapi_write()
4352 ASSERT(flags & XFS_BMAPI_COWFORK); in xfs_bmapi_write()
4391 ASSERT(len > 0); in xfs_bmapi_write()
4392 ASSERT(bma.length > 0); in xfs_bmapi_write()
4446 ASSERT(bma.cur); in xfs_bmapi_write()
4454 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE || in xfs_bmapi_write()
4504 ASSERT(len > 0); in xfs_bmapi_remap()
4505 ASSERT(len <= (xfs_filblks_t)MAXEXTLEN); in xfs_bmapi_remap()
4506 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmapi_remap()
4507 ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC | in xfs_bmapi_remap()
4509 ASSERT((flags & (XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC)) != in xfs_bmapi_remap()
4531 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4532 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4628 ASSERT(len1 + len2 <= ores); in xfs_bmap_split_indlen()
4629 ASSERT(len1 < *indlen1 && len2 < *indlen2); in xfs_bmap_split_indlen()
4638 ASSERT((*indlen1 - len1) + (*indlen2 - len2) >= ores); in xfs_bmap_split_indlen()
4688 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_delay()
4689 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4690 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_delay()
4780 ASSERT(da_old >= da_new); in xfs_bmap_del_extent_delay()
4807 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_cow()
4808 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4809 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_cow()
4810 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4896 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_real()
4898 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
4901 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_real()
4902 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
4928 ASSERT(mod == 0); in xfs_bmap_del_extent_real()
4935 ASSERT(mod == 0); in xfs_bmap_del_extent_real()
5154 ASSERT(whichfork != XFS_COW_FORK); in __xfs_bunmapi()
5167 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in __xfs_bunmapi()
5168 ASSERT(len > 0); in __xfs_bunmapi()
5169 ASSERT(nexts >= 0); in __xfs_bunmapi()
5200 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE); in __xfs_bunmapi()
5289 ASSERT(end >= mod); in __xfs_bunmapi()
5303 ASSERT(del.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5304 ASSERT(tp->t_blk_res > 0); in __xfs_bunmapi()
5342 ASSERT(end >= del.br_blockcount); in __xfs_bunmapi()
5360 ASSERT(0); in __xfs_bunmapi()
5361 ASSERT(prev.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5362 ASSERT(!isnullstartblock(prev.br_startblock)); in __xfs_bunmapi()
5363 ASSERT(del.br_startblock == in __xfs_bunmapi()
5379 ASSERT(del.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5429 ASSERT(cur == NULL); in __xfs_bunmapi()
5440 ASSERT(cur != NULL); in __xfs_bunmapi()
5549 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); in xfs_bmse_merge()
5550 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmse_merge()
5551 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5675 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL)); in xfs_bmap_collapse_extents()
5748 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); in xfs_bmap_can_insert_extents()
5793 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL)); in xfs_bmap_insert_extents()
5965 ASSERT(cur == NULL); in xfs_bmap_split_extent_at()
6093 ASSERT(tp->t_firstblock == NULLFSBLOCK); in xfs_bmap_finish_one()
6118 ASSERT(0); in xfs_bmap_finish_one()