Lines Matching refs:ASSERT
202 ASSERT(offset < XFS_LITINO(mp, ip->i_d.di_version)); in xfs_default_attroffset()
268 ASSERT(be16_to_cpu(block->bb_level) > 0); in xfs_check_block()
276 ASSERT(be64_to_cpu(prevp->br_startoff) < in xfs_check_block()
349 ASSERT(level > 0); in xfs_bmap_check_leaf_extents()
354 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
355 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
356 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
423 ASSERT(xfs_bmbt_disk_get_startoff(&last) + in xfs_bmap_check_leaf_extents()
429 ASSERT(xfs_bmbt_disk_get_startoff(ep) + in xfs_bmap_check_leaf_extents()
492 ASSERT(ret_nmap <= nmap); in xfs_bmap_validate_ret()
495 ASSERT(mval[i].br_blockcount > 0); in xfs_bmap_validate_ret()
497 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
498 ASSERT(mval[i].br_blockcount <= len); in xfs_bmap_validate_ret()
499 ASSERT(mval[i].br_startoff + mval[i].br_blockcount <= in xfs_bmap_validate_ret()
502 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
503 ASSERT(mval[i].br_startoff + mval[i].br_blockcount > in xfs_bmap_validate_ret()
506 ASSERT(i == 0 || in xfs_bmap_validate_ret()
509 ASSERT(mval[i].br_startblock != DELAYSTARTBLOCK && in xfs_bmap_validate_ret()
511 ASSERT(mval[i].br_state == XFS_EXT_NORM || in xfs_bmap_validate_ret()
543 ASSERT(bno != NULLFSBLOCK); in __xfs_bmap_add_free()
544 ASSERT(len > 0); in __xfs_bmap_add_free()
545 ASSERT(len <= MAXEXTLEN); in __xfs_bmap_add_free()
546 ASSERT(!isnullstartblock(bno)); in __xfs_bmap_add_free()
549 ASSERT(agno < mp->m_sb.sb_agcount); in __xfs_bmap_add_free()
550 ASSERT(agbno < mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
551 ASSERT(len < mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
552 ASSERT(agbno + len <= mp->m_sb.sb_agblocks); in __xfs_bmap_add_free()
554 ASSERT(xfs_bmap_free_item_zone != NULL); in __xfs_bmap_add_free()
603 ASSERT(cur); in xfs_bmap_btree_to_extents()
604 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_btree_to_extents()
605 ASSERT(ifp->if_flags & XFS_IFEXTENTS); in xfs_bmap_btree_to_extents()
606 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE); in xfs_bmap_btree_to_extents()
607 ASSERT(be16_to_cpu(rblock->bb_level) == 1); in xfs_bmap_btree_to_extents()
608 ASSERT(be16_to_cpu(rblock->bb_numrecs) == 1); in xfs_bmap_btree_to_extents()
609 ASSERT(xfs_bmbt_maxrecs(mp, ifp->if_broot_bytes, 0) == 1); in xfs_bmap_btree_to_extents()
632 ASSERT(ifp->if_broot == NULL); in xfs_bmap_btree_to_extents()
633 ASSERT((ifp->if_flags & XFS_IFBROOT) == 0); in xfs_bmap_btree_to_extents()
668 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_extents_to_btree()
670 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS); in xfs_bmap_extents_to_btree()
724 ASSERT(tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_extents_to_btree()
752 ASSERT(cnt == XFS_IFORK_NEXTENTS(ip, whichfork)); in xfs_bmap_extents_to_btree()
771 ASSERT(*curp == NULL); in xfs_bmap_extents_to_btree()
781 ASSERT(ifp->if_broot == NULL); in xfs_bmap_extents_to_btree()
801 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_local_to_extents_empty()
802 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents_empty()
803 ASSERT(ifp->if_bytes == 0); in xfs_bmap_local_to_extents_empty()
804 ASSERT(XFS_IFORK_NEXTENTS(ip, whichfork) == 0); in xfs_bmap_local_to_extents_empty()
840 ASSERT(!(S_ISREG(VFS_I(ip)->i_mode) && whichfork == XFS_DATA_FORK)); in xfs_bmap_local_to_extents()
842 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents()
852 ASSERT((ifp->if_flags & (XFS_IFINLINE|XFS_IFEXTENTS)) == XFS_IFINLINE); in xfs_bmap_local_to_extents()
875 ASSERT(args.fsbno != NULLFSBLOCK); in xfs_bmap_local_to_extents()
876 ASSERT(args.len == 1); in xfs_bmap_local_to_extents()
1017 ASSERT(0); in xfs_bmap_add_attrfork_local()
1042 ASSERT(0); in xfs_bmap_set_attrforkoff()
1066 ASSERT(XFS_IFORK_Q(ip) == 0); in xfs_bmap_add_attrfork()
1069 ASSERT(!XFS_NOT_DQATTACHED(mp, ip)); in xfs_bmap_add_attrfork()
1094 ASSERT(ip->i_d.di_aformat == 0); in xfs_bmap_add_attrfork()
1103 ASSERT(ip->i_afp == NULL); in xfs_bmap_add_attrfork()
1180 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_iread_extents()
1287 ASSERT(i == xfs_iext_count(ifp)); in xfs_iread_extents()
1320 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE || in xfs_bmap_first_unused()
1512 ASSERT(ifp->if_flags & XFS_IFEXTENTS); in xfs_bmap_one_block()
1517 ASSERT(XFS_ISIZE(ip) == ip->i_mount->m_sb.sb_blocksize); in xfs_bmap_one_block()
1552 ASSERT(whichfork != XFS_ATTR_FORK); in xfs_bmap_add_extent_delay_real()
1556 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_delay_real()
1557 ASSERT(!bma->cur || in xfs_bmap_add_extent_delay_real()
1571 ASSERT(isnullstartblock(PREV.br_startblock)); in xfs_bmap_add_extent_delay_real()
1572 ASSERT(PREV.br_startoff <= new->br_startoff); in xfs_bmap_add_extent_delay_real()
1573 ASSERT(PREV.br_startoff + PREV.br_blockcount >= new_endoff); in xfs_bmap_add_extent_delay_real()
1986 ASSERT(0); in xfs_bmap_add_extent_delay_real()
1997 ASSERT(bma->cur == NULL); in xfs_bmap_add_extent_delay_real()
2016 ASSERT(state == 0 || da_new < da_old); in xfs_bmap_add_extent_delay_real()
2061 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_unwritten_real()
2074 ASSERT(new->br_state != PREV.br_state); in xfs_bmap_add_extent_unwritten_real()
2076 ASSERT(PREV.br_startoff <= new->br_startoff); in xfs_bmap_add_extent_unwritten_real()
2077 ASSERT(PREV.br_startoff + PREV.br_blockcount >= new_endoff); in xfs_bmap_add_extent_unwritten_real()
2469 ASSERT(0); in xfs_bmap_add_extent_unwritten_real()
2479 ASSERT(cur == NULL); in xfs_bmap_add_extent_unwritten_real()
2521 ASSERT(isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_hole_delay()
2632 ASSERT(oldlen > newlen); in xfs_bmap_add_extent_hole_delay()
2667 ASSERT(!isnullstartblock(new->br_startblock)); in xfs_bmap_add_extent_hole_real()
2668 ASSERT(!cur || !(cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL)); in xfs_bmap_add_extent_hole_real()
2839 ASSERT(cur == NULL); in xfs_bmap_add_extent_hole_real()
2932 ASSERT(align_alen <= MAXEXTLEN); in xfs_bmap_extsize_align()
2978 ASSERT(nexto > prevo); in xfs_bmap_extsize_align()
3021 ASSERT(orig_off >= align_off); in xfs_bmap_extsize_align()
3023 ASSERT(orig_end <= align_off + align_alen || in xfs_bmap_extsize_align()
3029 ASSERT(align_off + align_alen <= gotp->br_startoff); in xfs_bmap_extsize_align()
3031 ASSERT(align_off >= prevp->br_startoff + prevp->br_blockcount); in xfs_bmap_extsize_align()
3399 ASSERT(ap->length); in xfs_bmap_btalloc()
3420 ASSERT(!error); in xfs_bmap_btalloc()
3421 ASSERT(ap->length); in xfs_bmap_btalloc()
3610 ASSERT(ap->tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_btalloc()
3617 ASSERT(nullfb || fb_agno <= args.agno); in xfs_bmap_btalloc()
3714 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3715 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3732 ASSERT(mval->br_blockcount <= len); in xfs_bmapi_trim_map()
3751 ASSERT((flags & XFS_BMAPI_ENTIRE) || in xfs_bmapi_update_map()
3753 ASSERT((flags & XFS_BMAPI_ENTIRE) || (mval->br_blockcount <= *len) || in xfs_bmapi_update_map()
3760 ASSERT(mval->br_startblock == mval[-1].br_startblock); in xfs_bmapi_update_map()
3761 ASSERT(mval->br_blockcount > mval[-1].br_blockcount); in xfs_bmapi_update_map()
3762 ASSERT(mval->br_state == mval[-1].br_state); in xfs_bmapi_update_map()
3771 ASSERT(mval->br_startoff == in xfs_bmapi_update_map()
3813 ASSERT(*nmap >= 1); in xfs_bmapi_read()
3814 ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK|XFS_BMAPI_ENTIRE| in xfs_bmapi_read()
3816 ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED|XFS_ILOCK_EXCL)); in xfs_bmapi_read()
3952 ASSERT(!error); in xfs_bmapi_reserve_delalloc()
3970 ASSERT(indlen > 0); in xfs_bmapi_reserve_delalloc()
4022 ASSERT(bma->length > 0); in xfs_bmapi_allocate()
4124 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4125 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4127 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4158 ASSERT(mval->br_blockcount <= len); in xfs_bmapi_convert_unwritten()
4295 ASSERT(*nmap >= 1); in xfs_bmapi_write()
4296 ASSERT(*nmap <= XFS_BMAP_MAX_NMAP); in xfs_bmapi_write()
4297 ASSERT(tp != NULL); in xfs_bmapi_write()
4298 ASSERT(len > 0); in xfs_bmapi_write()
4299 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_LOCAL); in xfs_bmapi_write()
4300 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmapi_write()
4301 ASSERT(!(flags & XFS_BMAPI_REMAP)); in xfs_bmapi_write()
4304 ASSERT((flags & (XFS_BMAPI_METADATA | XFS_BMAPI_ZERO)) != in xfs_bmapi_write()
4312 ASSERT((flags & (XFS_BMAPI_PREALLOC | XFS_BMAPI_ZERO)) != in xfs_bmapi_write()
4355 ASSERT(!((flags & XFS_BMAPI_CONVERT) && in xfs_bmapi_write()
4386 ASSERT(len > 0); in xfs_bmapi_write()
4387 ASSERT(bma.length > 0); in xfs_bmapi_write()
4437 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE || in xfs_bmapi_write()
4530 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_delalloc()
4573 ASSERT(len > 0); in xfs_bmapi_remap()
4574 ASSERT(len <= (xfs_filblks_t)MAXEXTLEN); in xfs_bmapi_remap()
4575 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmapi_remap()
4576 ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC | in xfs_bmapi_remap()
4578 ASSERT((flags & (XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC)) != in xfs_bmapi_remap()
4600 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4601 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4691 ASSERT(len1 + len2 <= ores); in xfs_bmap_split_indlen()
4692 ASSERT(len1 < *indlen1 && len2 < *indlen2); in xfs_bmap_split_indlen()
4701 ASSERT((*indlen1 - len1) + (*indlen2 - len2) >= ores); in xfs_bmap_split_indlen()
4751 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_delay()
4752 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4753 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_delay()
4843 ASSERT(da_old >= da_new); in xfs_bmap_del_extent_delay()
4872 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_cow()
4873 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4874 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_cow()
4875 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4961 ASSERT(del->br_blockcount > 0); in xfs_bmap_del_extent_real()
4963 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
4966 ASSERT(got_endoff >= del_endoff); in xfs_bmap_del_extent_real()
4967 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
4994 ASSERT(mod == 0); in xfs_bmap_del_extent_real()
4997 ASSERT(mod == 0); in xfs_bmap_del_extent_real()
5210 ASSERT(whichfork != XFS_COW_FORK); in __xfs_bunmapi()
5223 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in __xfs_bunmapi()
5224 ASSERT(len > 0); in __xfs_bunmapi()
5225 ASSERT(nexts >= 0); in __xfs_bunmapi()
5256 ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE); in __xfs_bunmapi()
5344 ASSERT(end >= mod); in __xfs_bunmapi()
5358 ASSERT(del.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5359 ASSERT(tp->t_blk_res > 0); in __xfs_bunmapi()
5396 ASSERT(end >= del.br_blockcount); in __xfs_bunmapi()
5414 ASSERT(0); in __xfs_bunmapi()
5415 ASSERT(prev.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5416 ASSERT(!isnullstartblock(prev.br_startblock)); in __xfs_bunmapi()
5417 ASSERT(del.br_startblock == in __xfs_bunmapi()
5433 ASSERT(del.br_state == XFS_EXT_NORM); in __xfs_bunmapi()
5483 ASSERT(cur == NULL); in __xfs_bunmapi()
5590 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); in xfs_bmse_merge()
5591 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_bmse_merge()
5592 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5719 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL)); in xfs_bmap_collapse_extents()
5792 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); in xfs_bmap_can_insert_extents()
5837 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL)); in xfs_bmap_insert_extents()
6009 ASSERT(cur == NULL); in xfs_bmap_split_extent_at()
6137 ASSERT(tp->t_firstblock == NULLFSBLOCK); in xfs_bmap_finish_one()
6162 ASSERT(0); in xfs_bmap_finish_one()