bma 1428 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca *bma, bma 1435 fs/xfs/libxfs/xfs_bmap.c bma->aeof = false; bma 1436 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec, bma 1442 fs/xfs/libxfs/xfs_bmap.c bma->aeof = true; bma 1450 fs/xfs/libxfs/xfs_bmap.c bma->aeof = bma->offset >= rec.br_startoff + rec.br_blockcount || bma 1451 fs/xfs/libxfs/xfs_bmap.c (bma->offset >= rec.br_startoff && bma 1530 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca *bma, bma 1533 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmbt_irec *new = &bma->got; bma 1550 fs/xfs/libxfs/xfs_bmap.c mp = bma->ip->i_mount; bma 1551 fs/xfs/libxfs/xfs_bmap.c ifp = XFS_IFORK_PTR(bma->ip, whichfork); bma 1553 fs/xfs/libxfs/xfs_bmap.c nextents = (whichfork == XFS_COW_FORK ? &bma->ip->i_cnextents : bma 1554 fs/xfs/libxfs/xfs_bmap.c &bma->ip->i_d.di_nextents); bma 1557 fs/xfs/libxfs/xfs_bmap.c ASSERT(!bma->cur || bma 1558 fs/xfs/libxfs/xfs_bmap.c (bma->cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL)); bma 1569 fs/xfs/libxfs/xfs_bmap.c xfs_iext_get_extent(ifp, &bma->icur, &PREV); bma 1591 fs/xfs/libxfs/xfs_bmap.c if (xfs_iext_peek_prev_extent(ifp, &bma->icur, &LEFT)) { bma 1609 fs/xfs/libxfs/xfs_bmap.c if (xfs_iext_peek_next_extent(ifp, &bma->icur, &RIGHT)) { bma 1642 fs/xfs/libxfs/xfs_bmap.c xfs_iext_remove(bma->ip, &bma->icur, state); bma 1643 fs/xfs/libxfs/xfs_bmap.c xfs_iext_remove(bma->ip, &bma->icur, state); bma 1644 fs/xfs/libxfs/xfs_bmap.c xfs_iext_prev(ifp, &bma->icur); bma 1645 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &LEFT); bma 1648 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1652 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, &RIGHT, &i); bma 1656 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_delete(bma->cur, &i); bma 1660 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_decrement(bma->cur, 0, &i); bma 1664 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_update(bma->cur, &LEFT); bma 1678 fs/xfs/libxfs/xfs_bmap.c xfs_iext_remove(bma->ip, &bma->icur, state); bma 1679 fs/xfs/libxfs/xfs_bmap.c xfs_iext_prev(ifp, &bma->icur); bma 1680 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &LEFT); bma 1682 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1686 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, &old, &i); bma 1690 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_update(bma->cur, &LEFT); bma 1707 fs/xfs/libxfs/xfs_bmap.c xfs_iext_next(ifp, &bma->icur); bma 1708 fs/xfs/libxfs/xfs_bmap.c xfs_iext_remove(bma->ip, &bma->icur, state); bma 1709 fs/xfs/libxfs/xfs_bmap.c xfs_iext_prev(ifp, &bma->icur); bma 1710 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &PREV); bma 1712 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1716 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, &RIGHT, &i); bma 1720 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_update(bma->cur, &PREV); bma 1734 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &PREV); bma 1737 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1741 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, new, &i); bma 1745 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_insert(bma->cur, &i); bma 1759 fs/xfs/libxfs/xfs_bmap.c da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(bma->ip, temp), bma 1768 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &PREV); bma 1769 fs/xfs/libxfs/xfs_bmap.c xfs_iext_prev(ifp, &bma->icur); bma 1770 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &LEFT); bma 1772 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1776 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, &old, &i); bma 1780 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_update(bma->cur, &LEFT); bma 1791 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, new); bma 1793 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1797 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, new, &i); bma 1801 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_insert(bma->cur, &i); bma 1807 fs/xfs/libxfs/xfs_bmap.c if (xfs_bmap_needs_btree(bma->ip, whichfork)) { bma 1808 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, bma 1809 fs/xfs/libxfs/xfs_bmap.c &bma->cur, 1, &tmp_rval, whichfork); bma 1816 fs/xfs/libxfs/xfs_bmap.c da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(bma->ip, temp), bma 1818 fs/xfs/libxfs/xfs_bmap.c (bma->cur ? bma->cur->bc_private.b.allocated : 0)); bma 1823 fs/xfs/libxfs/xfs_bmap.c xfs_iext_next(ifp, &bma->icur); bma 1824 fs/xfs/libxfs/xfs_bmap.c xfs_iext_insert(bma->ip, &bma->icur, &PREV, state); bma 1825 fs/xfs/libxfs/xfs_bmap.c xfs_iext_prev(ifp, &bma->icur); bma 1838 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1842 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, &old, &i); bma 1846 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_update(bma->cur, &RIGHT); bma 1852 fs/xfs/libxfs/xfs_bmap.c da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(bma->ip, temp), bma 1858 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &PREV); bma 1859 fs/xfs/libxfs/xfs_bmap.c xfs_iext_next(ifp, &bma->icur); bma 1860 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &RIGHT); bma 1868 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, new); bma 1870 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1874 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, new, &i); bma 1878 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_insert(bma->cur, &i); bma 1884 fs/xfs/libxfs/xfs_bmap.c if (xfs_bmap_needs_btree(bma->ip, whichfork)) { bma 1885 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, bma 1886 fs/xfs/libxfs/xfs_bmap.c &bma->cur, 1, &tmp_rval, whichfork); bma 1893 fs/xfs/libxfs/xfs_bmap.c da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(bma->ip, temp), bma 1895 fs/xfs/libxfs/xfs_bmap.c (bma->cur ? bma->cur->bc_private.b.allocated : 0)); bma 1899 fs/xfs/libxfs/xfs_bmap.c xfs_iext_insert(bma->ip, &bma->icur, &PREV, state); bma 1900 fs/xfs/libxfs/xfs_bmap.c xfs_iext_next(ifp, &bma->icur); bma 1935 fs/xfs/libxfs/xfs_bmap.c nullstartblock(xfs_bmap_worst_indlen(bma->ip, bma 1941 fs/xfs/libxfs/xfs_bmap.c nullstartblock(xfs_bmap_worst_indlen(bma->ip, bma 1943 fs/xfs/libxfs/xfs_bmap.c xfs_iext_update_extent(bma->ip, state, &bma->icur, &PREV); bma 1945 fs/xfs/libxfs/xfs_bmap.c xfs_iext_next(ifp, &bma->icur); bma 1946 fs/xfs/libxfs/xfs_bmap.c xfs_iext_insert(bma->ip, &bma->icur, &RIGHT, state); bma 1947 fs/xfs/libxfs/xfs_bmap.c xfs_iext_insert(bma->ip, &bma->icur, &LEFT, state); bma 1950 fs/xfs/libxfs/xfs_bmap.c if (bma->cur == NULL) bma 1954 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmbt_lookup_eq(bma->cur, new, &i); bma 1958 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_insert(bma->cur, &i); bma 1964 fs/xfs/libxfs/xfs_bmap.c if (xfs_bmap_needs_btree(bma->ip, whichfork)) { bma 1965 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, bma 1966 fs/xfs/libxfs/xfs_bmap.c &bma->cur, 1, &tmp_rval, whichfork); bma 1990 fs/xfs/libxfs/xfs_bmap.c if (!(bma->flags & XFS_BMAPI_NORMAP)) bma 1991 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new); bma 1994 fs/xfs/libxfs/xfs_bmap.c if (xfs_bmap_needs_btree(bma->ip, whichfork)) { bma 1997 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma->cur == NULL); bma 1998 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, bma 1999 fs/xfs/libxfs/xfs_bmap.c &bma->cur, da_old > 0, &tmp_logflags, bma 2001 fs/xfs/libxfs/xfs_bmap.c bma->logflags |= tmp_logflags; bma 2009 fs/xfs/libxfs/xfs_bmap.c if (bma->cur) { bma 2010 fs/xfs/libxfs/xfs_bmap.c da_new += bma->cur->bc_private.b.allocated; bma 2011 fs/xfs/libxfs/xfs_bmap.c bma->cur->bc_private.b.allocated = 0; bma 2021 fs/xfs/libxfs/xfs_bmap.c xfs_bmap_check_leaf_extents(bma->cur, bma->ip, whichfork); bma 2024 fs/xfs/libxfs/xfs_bmap.c bma->logflags |= rval; bma 4014 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca *bma) bma 4016 fs/xfs/libxfs/xfs_bmap.c struct xfs_mount *mp = bma->ip->i_mount; bma 4017 fs/xfs/libxfs/xfs_bmap.c int whichfork = xfs_bmapi_whichfork(bma->flags); bma 4018 fs/xfs/libxfs/xfs_bmap.c struct xfs_ifork *ifp = XFS_IFORK_PTR(bma->ip, whichfork); bma 4022 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma->length > 0); bma 4028 fs/xfs/libxfs/xfs_bmap.c if (bma->wasdel) { bma 4029 fs/xfs/libxfs/xfs_bmap.c bma->length = (xfs_extlen_t)bma->got.br_blockcount; bma 4030 fs/xfs/libxfs/xfs_bmap.c bma->offset = bma->got.br_startoff; bma 4031 fs/xfs/libxfs/xfs_bmap.c xfs_iext_peek_prev_extent(ifp, &bma->icur, &bma->prev); bma 4033 fs/xfs/libxfs/xfs_bmap.c bma->length = XFS_FILBLKS_MIN(bma->length, MAXEXTLEN); bma 4034 fs/xfs/libxfs/xfs_bmap.c if (!bma->eof) bma 4035 fs/xfs/libxfs/xfs_bmap.c bma->length = XFS_FILBLKS_MIN(bma->length, bma 4036 fs/xfs/libxfs/xfs_bmap.c bma->got.br_startoff - bma->offset); bma 4045 fs/xfs/libxfs/xfs_bmap.c if (!(bma->flags & XFS_BMAPI_METADATA)) { bma 4046 fs/xfs/libxfs/xfs_bmap.c bma->datatype = XFS_ALLOC_NOBUSY; bma 4048 fs/xfs/libxfs/xfs_bmap.c if (bma->offset == 0) bma 4049 fs/xfs/libxfs/xfs_bmap.c bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA; bma 4051 fs/xfs/libxfs/xfs_bmap.c bma->datatype |= XFS_ALLOC_USERDATA; bma 4053 fs/xfs/libxfs/xfs_bmap.c if (bma->flags & XFS_BMAPI_ZERO) bma 4054 fs/xfs/libxfs/xfs_bmap.c bma->datatype |= XFS_ALLOC_USERDATA_ZERO; bma 4057 fs/xfs/libxfs/xfs_bmap.c bma->minlen = (bma->flags & XFS_BMAPI_CONTIG) ? bma->length : 1; bma 4063 fs/xfs/libxfs/xfs_bmap.c if (mp->m_dalign && bma->length >= mp->m_dalign && bma 4064 fs/xfs/libxfs/xfs_bmap.c !(bma->flags & XFS_BMAPI_METADATA) && whichfork == XFS_DATA_FORK) { bma 4065 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_isaeof(bma, whichfork); bma 4070 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_alloc(bma); bma 4074 fs/xfs/libxfs/xfs_bmap.c if (bma->blkno == NULLFSBLOCK) bma 4076 fs/xfs/libxfs/xfs_bmap.c if ((ifp->if_flags & XFS_IFBROOT) && !bma->cur) bma 4077 fs/xfs/libxfs/xfs_bmap.c bma->cur = xfs_bmbt_init_cursor(mp, bma->tp, bma->ip, whichfork); bma 4082 fs/xfs/libxfs/xfs_bmap.c bma->nallocs++; bma 4084 fs/xfs/libxfs/xfs_bmap.c if (bma->cur) bma 4085 fs/xfs/libxfs/xfs_bmap.c bma->cur->bc_private.b.flags = bma 4086 fs/xfs/libxfs/xfs_bmap.c bma->wasdel ? XFS_BTCUR_BPRV_WASDEL : 0; bma 4088 fs/xfs/libxfs/xfs_bmap.c bma->got.br_startoff = bma->offset; bma 4089 fs/xfs/libxfs/xfs_bmap.c bma->got.br_startblock = bma->blkno; bma 4090 fs/xfs/libxfs/xfs_bmap.c bma->got.br_blockcount = bma->length; bma 4091 fs/xfs/libxfs/xfs_bmap.c bma->got.br_state = XFS_EXT_NORM; bma 4102 fs/xfs/libxfs/xfs_bmap.c if ((!bma->wasdel || (bma->flags & XFS_BMAPI_COWFORK)) && bma 4103 fs/xfs/libxfs/xfs_bmap.c (bma->flags & XFS_BMAPI_PREALLOC)) bma 4104 fs/xfs/libxfs/xfs_bmap.c bma->got.br_state = XFS_EXT_UNWRITTEN; bma 4106 fs/xfs/libxfs/xfs_bmap.c if (bma->wasdel) bma 4107 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_delay_real(bma, whichfork); bma 4109 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_hole_real(bma->tp, bma->ip, bma 4110 fs/xfs/libxfs/xfs_bmap.c whichfork, &bma->icur, &bma->cur, &bma->got, bma 4111 fs/xfs/libxfs/xfs_bmap.c &bma->logflags, bma->flags); bma 4113 fs/xfs/libxfs/xfs_bmap.c bma->logflags |= tmp_logflags; bma 4122 fs/xfs/libxfs/xfs_bmap.c xfs_iext_get_extent(ifp, &bma->icur, &bma->got); bma 4124 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma->got.br_startoff <= bma->offset); bma 4125 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= bma 4126 fs/xfs/libxfs/xfs_bmap.c bma->offset + bma->length); bma 4127 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma->got.br_state == XFS_EXT_NORM || bma 4128 fs/xfs/libxfs/xfs_bmap.c bma->got.br_state == XFS_EXT_UNWRITTEN); bma 4134 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca *bma, bma 4140 fs/xfs/libxfs/xfs_bmap.c struct xfs_ifork *ifp = XFS_IFORK_PTR(bma->ip, whichfork); bma 4159 fs/xfs/libxfs/xfs_bmap.c if ((ifp->if_flags & XFS_IFBROOT) && !bma->cur) { bma 4160 fs/xfs/libxfs/xfs_bmap.c bma->cur = xfs_bmbt_init_cursor(bma->ip->i_mount, bma->tp, bma 4161 fs/xfs/libxfs/xfs_bmap.c bma->ip, whichfork); bma 4171 fs/xfs/libxfs/xfs_bmap.c error = xfs_zero_extent(bma->ip, mval->br_startblock, bma 4177 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork, bma 4178 fs/xfs/libxfs/xfs_bmap.c &bma->icur, &bma->cur, mval, &tmp_logflags); bma 4191 fs/xfs/libxfs/xfs_bmap.c bma->logflags |= tmp_logflags | XFS_ILOG_CORE; bma 4200 fs/xfs/libxfs/xfs_bmap.c xfs_iext_get_extent(ifp, &bma->icur, &bma->got); bma 4232 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca *bma, bma 4236 fs/xfs/libxfs/xfs_bmap.c if ((bma->logflags & xfs_ilog_fext(whichfork)) && bma 4237 fs/xfs/libxfs/xfs_bmap.c XFS_IFORK_FORMAT(bma->ip, whichfork) != XFS_DINODE_FMT_EXTENTS) bma 4238 fs/xfs/libxfs/xfs_bmap.c bma->logflags &= ~xfs_ilog_fext(whichfork); bma 4239 fs/xfs/libxfs/xfs_bmap.c else if ((bma->logflags & xfs_ilog_fbroot(whichfork)) && bma 4240 fs/xfs/libxfs/xfs_bmap.c XFS_IFORK_FORMAT(bma->ip, whichfork) != XFS_DINODE_FMT_BTREE) bma 4241 fs/xfs/libxfs/xfs_bmap.c bma->logflags &= ~xfs_ilog_fbroot(whichfork); bma 4243 fs/xfs/libxfs/xfs_bmap.c if (bma->logflags) bma 4244 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(bma->tp, bma->ip, bma->logflags); bma 4245 fs/xfs/libxfs/xfs_bmap.c if (bma->cur) bma 4246 fs/xfs/libxfs/xfs_bmap.c xfs_btree_del_cursor(bma->cur, error); bma 4266 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca bma = { bma 4336 fs/xfs/libxfs/xfs_bmap.c if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) bma 4338 fs/xfs/libxfs/xfs_bmap.c if (!xfs_iext_peek_prev_extent(ifp, &bma.icur, &bma.prev)) bma 4339 fs/xfs/libxfs/xfs_bmap.c bma.prev.br_startoff = NULLFILEOFF; bma 4340 fs/xfs/libxfs/xfs_bmap.c bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); bma 4349 fs/xfs/libxfs/xfs_bmap.c if (eof || bma.got.br_startoff > bno) { bma 4359 fs/xfs/libxfs/xfs_bmap.c } else if (isnullstartblock(bma.got.br_startblock)) { bma 4368 fs/xfs/libxfs/xfs_bmap.c bma.eof = eof; bma 4369 fs/xfs/libxfs/xfs_bmap.c bma.conv = !!(flags & XFS_BMAPI_CONVERT); bma 4370 fs/xfs/libxfs/xfs_bmap.c bma.wasdel = wasdelay; bma 4371 fs/xfs/libxfs/xfs_bmap.c bma.offset = bno; bma 4372 fs/xfs/libxfs/xfs_bmap.c bma.flags = flags; bma 4382 fs/xfs/libxfs/xfs_bmap.c bma.length = MAXEXTLEN; bma 4384 fs/xfs/libxfs/xfs_bmap.c bma.length = len; bma 4387 fs/xfs/libxfs/xfs_bmap.c ASSERT(bma.length > 0); bma 4388 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmapi_allocate(&bma); bma 4391 fs/xfs/libxfs/xfs_bmap.c if (bma.blkno == NULLFSBLOCK) bma 4399 fs/xfs/libxfs/xfs_bmap.c xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma 4400 fs/xfs/libxfs/xfs_bmap.c bma.length); bma 4404 fs/xfs/libxfs/xfs_bmap.c xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, bma 4408 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmapi_convert_unwritten(&bma, mval, len, flags); bma 4422 fs/xfs/libxfs/xfs_bmap.c if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) bma 4426 fs/xfs/libxfs/xfs_bmap.c bma.prev = bma.got; bma 4427 fs/xfs/libxfs/xfs_bmap.c if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) bma 4432 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, bma 4440 fs/xfs/libxfs/xfs_bmap.c xfs_bmapi_finish(&bma, whichfork, 0); bma 4445 fs/xfs/libxfs/xfs_bmap.c xfs_bmapi_finish(&bma, whichfork, error); bma 4465 fs/xfs/libxfs/xfs_bmap.c struct xfs_bmalloca bma = { NULL }; bma 4481 fs/xfs/libxfs/xfs_bmap.c if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || bma 4482 fs/xfs/libxfs/xfs_bmap.c bma.got.br_startoff > offset_fsb) { bma 4497 fs/xfs/libxfs/xfs_bmap.c if (!isnullstartblock(bma.got.br_startblock)) { bma 4498 fs/xfs/libxfs/xfs_bmap.c *imap = bma.got; bma 4503 fs/xfs/libxfs/xfs_bmap.c bma.tp = tp; bma 4504 fs/xfs/libxfs/xfs_bmap.c bma.ip = ip; bma 4505 fs/xfs/libxfs/xfs_bmap.c bma.wasdel = true; bma 4506 fs/xfs/libxfs/xfs_bmap.c bma.offset = bma.got.br_startoff; bma 4507 fs/xfs/libxfs/xfs_bmap.c bma.length = max_t(xfs_filblks_t, bma.got.br_blockcount, MAXEXTLEN); bma 4508 fs/xfs/libxfs/xfs_bmap.c bma.total = XFS_EXTENTADD_SPACE_RES(ip->i_mount, XFS_DATA_FORK); bma 4509 fs/xfs/libxfs/xfs_bmap.c bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); bma 4511 fs/xfs/libxfs/xfs_bmap.c bma.flags = XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC; bma 4513 fs/xfs/libxfs/xfs_bmap.c if (!xfs_iext_peek_prev_extent(ifp, &bma.icur, &bma.prev)) bma 4514 fs/xfs/libxfs/xfs_bmap.c bma.prev.br_startoff = NULLFILEOFF; bma 4516 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmapi_allocate(&bma); bma 4521 fs/xfs/libxfs/xfs_bmap.c if (WARN_ON_ONCE(bma.blkno == NULLFSBLOCK)) bma 4524 fs/xfs/libxfs/xfs_bmap.c if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) bma 4527 fs/xfs/libxfs/xfs_bmap.c XFS_STATS_ADD(mp, xs_xstrat_bytes, XFS_FSB_TO_B(mp, bma.length)); bma 4530 fs/xfs/libxfs/xfs_bmap.c ASSERT(!isnullstartblock(bma.got.br_startblock)); bma 4531 fs/xfs/libxfs/xfs_bmap.c *imap = bma.got; bma 4535 fs/xfs/libxfs/xfs_bmap.c xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length); bma 4537 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, bma 4542 fs/xfs/libxfs/xfs_bmap.c xfs_bmapi_finish(&bma, whichfork, 0); bma 4548 fs/xfs/libxfs/xfs_bmap.c xfs_bmapi_finish(&bma, whichfork, error);