aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r--fs/xfs/xfs_iomap.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 6a7096422295..8d4d49b6fbf3 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -17,6 +17,7 @@
17 */ 17 */
18#include "xfs.h" 18#include "xfs.h"
19#include "xfs_fs.h" 19#include "xfs_fs.h"
20#include "xfs_format.h"
20#include "xfs_log.h" 21#include "xfs_log.h"
21#include "xfs_trans.h" 22#include "xfs_trans.h"
22#include "xfs_sb.h" 23#include "xfs_sb.h"
@@ -32,13 +33,13 @@
32#include "xfs_inode_item.h" 33#include "xfs_inode_item.h"
33#include "xfs_btree.h" 34#include "xfs_btree.h"
34#include "xfs_bmap.h" 35#include "xfs_bmap.h"
36#include "xfs_bmap_util.h"
35#include "xfs_rtalloc.h" 37#include "xfs_rtalloc.h"
36#include "xfs_error.h" 38#include "xfs_error.h"
37#include "xfs_itable.h" 39#include "xfs_itable.h"
38#include "xfs_attr.h" 40#include "xfs_attr.h"
39#include "xfs_buf_item.h" 41#include "xfs_buf_item.h"
40#include "xfs_trans_space.h" 42#include "xfs_trans_space.h"
41#include "xfs_utils.h"
42#include "xfs_iomap.h" 43#include "xfs_iomap.h"
43#include "xfs_trace.h" 44#include "xfs_trace.h"
44#include "xfs_icache.h" 45#include "xfs_icache.h"
@@ -187,10 +188,8 @@ xfs_iomap_write_direct(
187 * Allocate and setup the transaction 188 * Allocate and setup the transaction
188 */ 189 */
189 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); 190 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT);
190 error = xfs_trans_reserve(tp, resblks, 191 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write,
191 XFS_WRITE_LOG_RES(mp), resrtextents, 192 resblks, resrtextents);
192 XFS_TRANS_PERM_LOG_RES,
193 XFS_WRITE_LOG_COUNT);
194 /* 193 /*
195 * Check for running out of space, note: need lock to return 194 * Check for running out of space, note: need lock to return
196 */ 195 */
@@ -698,10 +697,8 @@ xfs_iomap_write_allocate(
698 tp = xfs_trans_alloc(mp, XFS_TRANS_STRAT_WRITE); 697 tp = xfs_trans_alloc(mp, XFS_TRANS_STRAT_WRITE);
699 tp->t_flags |= XFS_TRANS_RESERVE; 698 tp->t_flags |= XFS_TRANS_RESERVE;
700 nres = XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK); 699 nres = XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK);
701 error = xfs_trans_reserve(tp, nres, 700 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write,
702 XFS_WRITE_LOG_RES(mp), 701 nres, 0);
703 0, XFS_TRANS_PERM_LOG_RES,
704 XFS_WRITE_LOG_COUNT);
705 if (error) { 702 if (error) {
706 xfs_trans_cancel(tp, 0); 703 xfs_trans_cancel(tp, 0);
707 return XFS_ERROR(error); 704 return XFS_ERROR(error);
@@ -864,10 +861,8 @@ xfs_iomap_write_unwritten(
864 sb_start_intwrite(mp->m_super); 861 sb_start_intwrite(mp->m_super);
865 tp = _xfs_trans_alloc(mp, XFS_TRANS_STRAT_WRITE, KM_NOFS); 862 tp = _xfs_trans_alloc(mp, XFS_TRANS_STRAT_WRITE, KM_NOFS);
866 tp->t_flags |= XFS_TRANS_RESERVE | XFS_TRANS_FREEZE_PROT; 863 tp->t_flags |= XFS_TRANS_RESERVE | XFS_TRANS_FREEZE_PROT;
867 error = xfs_trans_reserve(tp, resblks, 864 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write,
868 XFS_WRITE_LOG_RES(mp), 0, 865 resblks, 0);
869 XFS_TRANS_PERM_LOG_RES,
870 XFS_WRITE_LOG_COUNT);
871 if (error) { 866 if (error) {
872 xfs_trans_cancel(tp, 0); 867 xfs_trans_cancel(tp, 0);
873 return XFS_ERROR(error); 868 return XFS_ERROR(error);