xfs_trans_t *libxfs_trans_alloc(struct xfs_mount *, int);
int libxfs_trans_reserve(struct xfs_trans *, struct xfs_trans_res *,
uint, uint);
-int libxfs_trans_commit(struct xfs_trans *, uint);
+int libxfs_trans_commit(struct xfs_trans *);
void libxfs_trans_cancel(struct xfs_trans *);
struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *, int);
* is in progress. The caller takes the responsibility to cancel
* the duplicate transaction that gets returned.
*/
- error = xfs_trans_commit(trans, 0);
+ error = xfs_trans_commit(trans);
if (error)
return error;
*/
int
libxfs_trans_commit(
- xfs_trans_t *tp,
- uint flags)
+ xfs_trans_t *tp)
{
xfs_sb_t *sbp;
if (error)
goto error0;
- error = xfs_trans_commit(tp, 0);
+ error = xfs_trans_commit(tp);
if (error)
break;
xfs_trans_ichgtime(args.trans, dp,
XFS_ICHGTIME_CHG);
}
- err2 = xfs_trans_commit(args.trans,
- XFS_TRANS_RELEASE_LOG_RES);
+ err2 = xfs_trans_commit(args.trans);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
return error ? error : err2;
* Commit the last in the sequence of transactions.
*/
xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
- error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
+ error = xfs_trans_commit(args.trans);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
return error;
* Commit the last in the sequence of transactions.
*/
xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
- error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
+ error = xfs_trans_commit(args.trans);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
return error;
error = xfs_bmap_finish(&tp, &flist, &committed);
if (error)
goto bmap_cancel;
- error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
+ error = xfs_trans_commit(tp);
xfs_iunlock(ip, XFS_ILOCK_EXCL);
return error;
if (error)
goto out;
- return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
-
+ return xfs_trans_commit(tp);
out:
xfs_trans_cancel(tp);
xfs_log_sb(tp);
if (wait)
xfs_trans_set_sync(tp);
- return xfs_trans_commit(tp, 0);
+ return xfs_trans_commit(tp);
}
#define XFS_TRANS_RESERVE 0x20 /* OK to use reserved data blocks */
#define XFS_TRANS_FREEZE_PROT 0x40 /* Transaction has elevated writer
count in superblock */
-/*
- * Values for call flags parameter.
- */
-#define XFS_TRANS_RELEASE_LOG_RES 0x4
-
/*
* Field values for xfs_trans_mod_sb.
*/
ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC;
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
}
static int
error = -libxfs_bmap_finish(&tp, &flist, &committed);
if (error)
fail(_("Pre-allocated file creation failed"), error);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
rsvfile(mp, ip, llen);
IRELE(ip);
return;
error = -libxfs_bmap_finish(&tp, &flist, &committed);
if (error)
fail(_("Directory creation failed"), error);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
/*
* RT initialization. Do this here to ensure that
* the RT inodes get placed after the root inode.
fail(_("Error encountered creating file from prototype file"),
error);
}
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
IRELE(ip);
}
rsumip->i_d.di_size = mp->m_rsumsize;
libxfs_trans_log_inode(tp, rsumip, XFS_ILOG_CORE);
libxfs_log_sb(tp);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
mp->m_rsumip = rsumip;
/*
* Next, give the bitmap file some zero-filled blocks.
if (error) {
fail(_("Completion of the realtime bitmap failed"), error);
}
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
/*
* Give the summary file some zero-filled blocks.
if (error) {
fail(_("Completion of the realtime summary failed"), error);
}
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
/*
* Free the whole area using transactions.
if (error) {
fail(_("Error completing the realtime space"), error);
}
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
}
}
libxfs_alloc_fix_freelist(&args, 0);
xfs_perag_put(args.pag);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
}
/*
do_error(_("failed to fix AGFL on AG %d, error %d\n"),
agno, error);
}
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
}
#ifdef XR_BLD_FREE_TRACE
* commit changes
*/
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
/*
* then allocate blocks for file and fill with zeroes (stolen
_("allocation of the realtime bitmap failed, error = %d\n"),
error);
}
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
static int
bno++;
}
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
return(0);
}
bno++;
}
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
return(0);
}
* commit changes
*/
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
/*
* then allocate blocks for file and fill with zeroes (stolen
_("allocation of the realtime summary ino failed, error = %d\n"),
error);
}
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
/*
ip->d_ops = mp->m_dir_inode_ops;
libxfs_dir_init(tp, ip, ip);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
irec = find_inode_rec(mp, XFS_INO_TO_AGNO(mp, mp->m_sb.sb_rootino),
XFS_INO_TO_AGINO(mp, mp->m_sb.sb_rootino));
}
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
IRELE(ip);
IRELE(pip);
add_inode_reached(irec,ino_offset);
_("bmap finish failed (err - %d), filesystem may be out of space\n"),
err);
- libxfs_trans_commit(tp,
- XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
} else {
err = -libxfs_trans_reserve(tp, &M_RES(mp)->tr_rename,
nres, 0);
_("bmap finish failed (%d), filesystem may be out of space\n"),
err);
- libxfs_trans_commit(tp,
- XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
} else {
_("bmap finish failed (%d), filesystem may be out of space\n"),
err);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
IRELE(ino_p);
IRELE(orphanage_ip);
error = -libxfs_bmap_finish(&tp, &flist, &committed);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
if (ino == mp->m_sb.sb_rootino)
need_root_dotdot = 0;
goto out_bmap_cancel;
}
- libxfs_trans_commit(tp,
- XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
return;
do_error(_("shrink_inode failed inode %" PRIu64 " block %u\n"),
ip->i_ino, da_bno);
libxfs_bmap_finish(&tp, &flist, &committed);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
}
/*
if (needlog)
libxfs_dir2_data_log_header(&da, bp);
libxfs_bmap_finish(&tp, &flist, &committed);
- libxfs_trans_commit(tp, 0);
+ libxfs_trans_commit(tp);
/* record the largest free space in the freetab for later checking */
bf = M_DIROPS(mp)->data_bestfree_p(d);
if (dirty) {
libxfs_trans_log_inode(tp, ip,
XFS_ILOG_CORE | XFS_ILOG_DDATA);
- libxfs_trans_commit(tp,
- XFS_TRANS_RELEASE_LOG_RES |
- XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
} else {
libxfs_trans_cancel(tp);
}
error = -libxfs_bmap_finish(&tp, &flist, &committed);
ASSERT(error == 0);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES |
- XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
need_root_dotdot = 0;
} else if (need_root_dotdot && ino == mp->m_sb.sb_rootino) {
error = -libxfs_bmap_finish(&tp, &flist, &committed);
ASSERT(error == 0);
- libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES
- |XFS_TRANS_SYNC);
+ libxfs_trans_commit(tp);
}
}
IRELE(ip);
* we're not allocating anything
*/
ASSERT(error == 0);
- error = -libxfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES |
- XFS_TRANS_SYNC);
+ error = -libxfs_trans_commit(tp);
ASSERT(error == 0);
}