Commit 85d22275 authored by Stephen Lord's avatar Stephen Lord

[XFS] remove a couple more sync transactions from xfs

SGI Modid: 2.5.x-xfs:slinx:140254a
parent 928c176c
...@@ -160,8 +160,7 @@ xfs_bmap_btree_to_extents( ...@@ -160,8 +160,7 @@ xfs_bmap_btree_to_extents(
xfs_inode_t *ip, /* incore inode pointer */ xfs_inode_t *ip, /* incore inode pointer */
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int *logflagsp, /* inode logging flags */ int *logflagsp, /* inode logging flags */
int whichfork, /* data or attr fork */ int whichfork); /* data or attr fork */
int async); /* xaction can be async */
#ifdef XFSDEBUG #ifdef XFSDEBUG
/* /*
...@@ -187,7 +186,6 @@ xfs_bmap_del_extent( ...@@ -187,7 +186,6 @@ xfs_bmap_del_extent(
xfs_bmap_free_t *flist, /* list of extents to be freed */ xfs_bmap_free_t *flist, /* list of extents to be freed */
xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_btree_cur_t *cur, /* if null, not a btree */
xfs_bmbt_irec_t *new, /* new data to put in extent list */ xfs_bmbt_irec_t *new, /* new data to put in extent list */
int iflags, /* input flags (meta-data or not) */
int *logflagsp,/* inode logging flags */ int *logflagsp,/* inode logging flags */
int whichfork, /* data or attr fork */ int whichfork, /* data or attr fork */
int rsvd); /* OK to allocate reserved blocks */ int rsvd); /* OK to allocate reserved blocks */
...@@ -811,7 +809,7 @@ xfs_bmap_add_extent_delay_real( ...@@ -811,7 +809,7 @@ xfs_bmap_add_extent_delay_real(
RIGHT.br_blockcount, &i))) RIGHT.br_blockcount, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
...@@ -1349,13 +1347,13 @@ xfs_bmap_add_extent_unwritten_real( ...@@ -1349,13 +1347,13 @@ xfs_bmap_add_extent_unwritten_real(
RIGHT.br_blockcount, &i))) RIGHT.br_blockcount, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
...@@ -1394,7 +1392,7 @@ xfs_bmap_add_extent_unwritten_real( ...@@ -1394,7 +1392,7 @@ xfs_bmap_add_extent_unwritten_real(
&i))) &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
...@@ -1434,7 +1432,7 @@ xfs_bmap_add_extent_unwritten_real( ...@@ -1434,7 +1432,7 @@ xfs_bmap_add_extent_unwritten_real(
RIGHT.br_blockcount, &i))) RIGHT.br_blockcount, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
...@@ -2010,7 +2008,7 @@ xfs_bmap_add_extent_hole_real( ...@@ -2010,7 +2008,7 @@ xfs_bmap_add_extent_hole_real(
right.br_startblock, right.br_blockcount, &i))) right.br_startblock, right.br_blockcount, &i)))
return error; return error;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_delete(cur, 0, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
return error; return error;
ASSERT(i == 1); ASSERT(i == 1);
if ((error = xfs_bmbt_decrement(cur, 0, &i))) if ((error = xfs_bmbt_decrement(cur, 0, &i)))
...@@ -2722,8 +2720,7 @@ xfs_bmap_btree_to_extents( ...@@ -2722,8 +2720,7 @@ xfs_bmap_btree_to_extents(
xfs_inode_t *ip, /* incore inode pointer */ xfs_inode_t *ip, /* incore inode pointer */
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int *logflagsp, /* inode logging flags */ int *logflagsp, /* inode logging flags */
int whichfork, /* data or attr fork */ int whichfork) /* data or attr fork */
int async) /* xaction can be async */
{ {
/* REFERENCED */ /* REFERENCED */
xfs_bmbt_block_t *cblock;/* child btree block */ xfs_bmbt_block_t *cblock;/* child btree block */
...@@ -2757,8 +2754,6 @@ xfs_bmap_btree_to_extents( ...@@ -2757,8 +2754,6 @@ xfs_bmap_btree_to_extents(
if ((error = xfs_btree_check_lblock(cur, cblock, 0, cbp))) if ((error = xfs_btree_check_lblock(cur, cblock, 0, cbp)))
return error; return error;
xfs_bmap_add_free(cbno, 1, cur->bc_private.b.flist, mp); xfs_bmap_add_free(cbno, 1, cur->bc_private.b.flist, mp);
if (!async)
xfs_trans_set_sync(tp);
ip->i_d.di_nblocks--; ip->i_d.di_nblocks--;
if (XFS_IS_QUOTA_ON(mp) && if (XFS_IS_QUOTA_ON(mp) &&
ip->i_ino != mp->m_sb.sb_uquotino && ip->i_ino != mp->m_sb.sb_uquotino &&
...@@ -2787,7 +2782,6 @@ xfs_bmap_del_extent( ...@@ -2787,7 +2782,6 @@ xfs_bmap_del_extent(
xfs_bmap_free_t *flist, /* list of extents to be freed */ xfs_bmap_free_t *flist, /* list of extents to be freed */
xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_btree_cur_t *cur, /* if null, not a btree */
xfs_bmbt_irec_t *del, /* data to remove from extent list */ xfs_bmbt_irec_t *del, /* data to remove from extent list */
int iflags, /* input flags */
int *logflagsp, /* inode logging flags */ int *logflagsp, /* inode logging flags */
int whichfork, /* data or attr fork */ int whichfork, /* data or attr fork */
int rsvd) /* OK to allocate reserved blocks */ int rsvd) /* OK to allocate reserved blocks */
...@@ -2916,7 +2910,7 @@ xfs_bmap_del_extent( ...@@ -2916,7 +2910,7 @@ xfs_bmap_del_extent(
flags |= XFS_ILOG_FEXT(whichfork); flags |= XFS_ILOG_FEXT(whichfork);
break; break;
} }
if ((error = xfs_bmbt_delete(cur, iflags & XFS_BMAPI_ASYNC, &i))) if ((error = xfs_bmbt_delete(cur, &i)))
goto done; goto done;
ASSERT(i == 1); ASSERT(i == 1);
break; break;
...@@ -5027,7 +5021,7 @@ xfs_bmapi( ...@@ -5027,7 +5021,7 @@ xfs_bmapi(
XFS_IFORK_NEXTENTS(ip, whichfork) <= ifp->if_ext_max) { XFS_IFORK_NEXTENTS(ip, whichfork) <= ifp->if_ext_max) {
ASSERT(wr && cur); ASSERT(wr && cur);
error = xfs_bmap_btree_to_extents(tp, ip, cur, error = xfs_bmap_btree_to_extents(tp, ip, cur,
&tmp_logflags, whichfork, 0); &tmp_logflags, whichfork);
logflags |= tmp_logflags; logflags |= tmp_logflags;
if (error) if (error)
goto error0; goto error0;
...@@ -5148,7 +5142,6 @@ xfs_bunmapi( ...@@ -5148,7 +5142,6 @@ xfs_bunmapi(
xfs_bmap_free_t *flist, /* i/o: list extents to free */ xfs_bmap_free_t *flist, /* i/o: list extents to free */
int *done) /* set if not done yet */ int *done) /* set if not done yet */
{ {
int async; /* xactions can be async */
xfs_btree_cur_t *cur; /* bmap btree cursor */ xfs_btree_cur_t *cur; /* bmap btree cursor */
xfs_bmbt_irec_t del; /* extent being deleted */ xfs_bmbt_irec_t del; /* extent being deleted */
int eof; /* is deleting at eof */ int eof; /* is deleting at eof */
...@@ -5182,7 +5175,6 @@ xfs_bunmapi( ...@@ -5182,7 +5175,6 @@ xfs_bunmapi(
mp = ip->i_mount; mp = ip->i_mount;
if (XFS_FORCED_SHUTDOWN(mp)) if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO); return XFS_ERROR(EIO);
async = flags & XFS_BMAPI_ASYNC;
rsvd = (flags & XFS_BMAPI_RSVBLOCKS) != 0; rsvd = (flags & XFS_BMAPI_RSVBLOCKS) != 0;
ASSERT(len > 0); ASSERT(len > 0);
ASSERT(nexts >= 0); ASSERT(nexts >= 0);
...@@ -5409,7 +5401,7 @@ xfs_bunmapi( ...@@ -5409,7 +5401,7 @@ xfs_bunmapi(
goto error0; goto error0;
} }
error = xfs_bmap_del_extent(ip, tp, lastx, flist, cur, &del, error = xfs_bmap_del_extent(ip, tp, lastx, flist, cur, &del,
flags, &tmp_logflags, whichfork, rsvd); &tmp_logflags, whichfork, rsvd);
logflags |= tmp_logflags; logflags |= tmp_logflags;
if (error) if (error)
goto error0; goto error0;
...@@ -5455,7 +5447,7 @@ xfs_bunmapi( ...@@ -5455,7 +5447,7 @@ xfs_bunmapi(
XFS_IFORK_NEXTENTS(ip, whichfork) <= ifp->if_ext_max) { XFS_IFORK_NEXTENTS(ip, whichfork) <= ifp->if_ext_max) {
ASSERT(cur != NULL); ASSERT(cur != NULL);
error = xfs_bmap_btree_to_extents(tp, ip, cur, &tmp_logflags, error = xfs_bmap_btree_to_extents(tp, ip, cur, &tmp_logflags,
whichfork, async); whichfork);
logflags |= tmp_logflags; logflags |= tmp_logflags;
if (error) if (error)
goto error0; goto error0;
......
...@@ -41,7 +41,7 @@ ktrace_t *xfs_bmbt_trace_buf; ...@@ -41,7 +41,7 @@ ktrace_t *xfs_bmbt_trace_buf;
*/ */
STATIC int xfs_bmbt_killroot(xfs_btree_cur_t *, int); STATIC int xfs_bmbt_killroot(xfs_btree_cur_t *);
STATIC void xfs_bmbt_log_keys(xfs_btree_cur_t *, xfs_buf_t *, int, int); STATIC void xfs_bmbt_log_keys(xfs_btree_cur_t *, xfs_buf_t *, int, int);
STATIC void xfs_bmbt_log_ptrs(xfs_btree_cur_t *, xfs_buf_t *, int, int); STATIC void xfs_bmbt_log_ptrs(xfs_btree_cur_t *, xfs_buf_t *, int, int);
STATIC int xfs_bmbt_lshift(xfs_btree_cur_t *, int, int *); STATIC int xfs_bmbt_lshift(xfs_btree_cur_t *, int, int *);
...@@ -304,7 +304,6 @@ STATIC int /* error */ ...@@ -304,7 +304,6 @@ STATIC int /* error */
xfs_bmbt_delrec( xfs_bmbt_delrec(
xfs_btree_cur_t *cur, xfs_btree_cur_t *cur,
int level, int level,
int async, /* deletion can be async */
int *stat) /* success/failure */ int *stat) /* success/failure */
{ {
xfs_bmbt_block_t *block; /* bmap btree block */ xfs_bmbt_block_t *block; /* bmap btree block */
...@@ -408,7 +407,7 @@ xfs_bmbt_delrec( ...@@ -408,7 +407,7 @@ xfs_bmbt_delrec(
if (level == cur->bc_nlevels - 1) { if (level == cur->bc_nlevels - 1) {
xfs_iroot_realloc(cur->bc_private.b.ip, -1, xfs_iroot_realloc(cur->bc_private.b.ip, -1,
cur->bc_private.b.whichfork); cur->bc_private.b.whichfork);
if ((error = xfs_bmbt_killroot(cur, async))) { if ((error = xfs_bmbt_killroot(cur))) {
XFS_BMBT_TRACE_CURSOR(cur, ERROR); XFS_BMBT_TRACE_CURSOR(cur, ERROR);
goto error0; goto error0;
} }
...@@ -442,7 +441,7 @@ xfs_bmbt_delrec( ...@@ -442,7 +441,7 @@ xfs_bmbt_delrec(
*/ */
if (lbno == NULLFSBLOCK && rbno == NULLFSBLOCK && if (lbno == NULLFSBLOCK && rbno == NULLFSBLOCK &&
level == cur->bc_nlevels - 2) { level == cur->bc_nlevels - 2) {
if ((error = xfs_bmbt_killroot(cur, async))) { if ((error = xfs_bmbt_killroot(cur))) {
XFS_BMBT_TRACE_CURSOR(cur, ERROR); XFS_BMBT_TRACE_CURSOR(cur, ERROR);
goto error0; goto error0;
} }
...@@ -645,8 +644,6 @@ xfs_bmbt_delrec( ...@@ -645,8 +644,6 @@ xfs_bmbt_delrec(
} }
xfs_bmap_add_free(XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(rbp)), 1, xfs_bmap_add_free(XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(rbp)), 1,
cur->bc_private.b.flist, mp); cur->bc_private.b.flist, mp);
if (!async)
xfs_trans_set_sync(cur->bc_tp);
cur->bc_private.b.ip->i_d.di_nblocks--; cur->bc_private.b.ip->i_d.di_nblocks--;
xfs_trans_log_inode(cur->bc_tp, cur->bc_private.b.ip, XFS_ILOG_CORE); xfs_trans_log_inode(cur->bc_tp, cur->bc_private.b.ip, XFS_ILOG_CORE);
if (XFS_IS_QUOTA_ON(mp) && if (XFS_IS_QUOTA_ON(mp) &&
...@@ -911,8 +908,7 @@ xfs_bmbt_insrec( ...@@ -911,8 +908,7 @@ xfs_bmbt_insrec(
STATIC int STATIC int
xfs_bmbt_killroot( xfs_bmbt_killroot(
xfs_btree_cur_t *cur, xfs_btree_cur_t *cur)
int async)
{ {
xfs_bmbt_block_t *block; xfs_bmbt_block_t *block;
xfs_bmbt_block_t *cblock; xfs_bmbt_block_t *cblock;
...@@ -991,8 +987,6 @@ xfs_bmbt_killroot( ...@@ -991,8 +987,6 @@ xfs_bmbt_killroot(
memcpy(pp, cpp, INT_GET(block->bb_numrecs, ARCH_CONVERT) * sizeof(*pp)); memcpy(pp, cpp, INT_GET(block->bb_numrecs, ARCH_CONVERT) * sizeof(*pp));
xfs_bmap_add_free(XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(cbp)), 1, xfs_bmap_add_free(XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(cbp)), 1,
cur->bc_private.b.flist, cur->bc_mp); cur->bc_private.b.flist, cur->bc_mp);
if (!async)
xfs_trans_set_sync(cur->bc_tp);
ip->i_d.di_nblocks--; ip->i_d.di_nblocks--;
if (XFS_IS_QUOTA_ON(cur->bc_mp) && if (XFS_IS_QUOTA_ON(cur->bc_mp) &&
ip->i_ino != cur->bc_mp->m_sb.sb_uquotino && ip->i_ino != cur->bc_mp->m_sb.sb_uquotino &&
...@@ -1834,7 +1828,6 @@ xfs_bmbt_decrement( ...@@ -1834,7 +1828,6 @@ xfs_bmbt_decrement(
int /* error */ int /* error */
xfs_bmbt_delete( xfs_bmbt_delete(
xfs_btree_cur_t *cur, xfs_btree_cur_t *cur,
int async, /* deletion can be async */
int *stat) /* success/failure */ int *stat) /* success/failure */
{ {
int error; /* error return value */ int error; /* error return value */
...@@ -1846,7 +1839,7 @@ xfs_bmbt_delete( ...@@ -1846,7 +1839,7 @@ xfs_bmbt_delete(
XFS_BMBT_TRACE_CURSOR(cur, ENTRY); XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
for (level = 0, i = 2; i == 2; level++) { for (level = 0, i = 2; i == 2; level++) {
if ((error = xfs_bmbt_delrec(cur, level, async, &i))) { if ((error = xfs_bmbt_delrec(cur, level, &i))) {
XFS_BMBT_TRACE_CURSOR(cur, ERROR); XFS_BMBT_TRACE_CURSOR(cur, ERROR);
return error; return error;
} }
......
...@@ -479,7 +479,6 @@ xfs_bmbt_decrement( ...@@ -479,7 +479,6 @@ xfs_bmbt_decrement(
int int
xfs_bmbt_delete( xfs_bmbt_delete(
struct xfs_btree_cur *, struct xfs_btree_cur *,
int,
int *); int *);
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment