Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7593
b: refs/heads/master
c: d52b44d
h: refs/heads/master
i:
  7591: c38b038
v: v3
  • Loading branch information
Nathan Scott committed Sep 2, 2005
1 parent e41e85a commit 3b6a47c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad4a8ac4e9d9cffb0a4c9ebebc6bda9d8dbbfe99
refs/heads/master: d52b44d07a43b723ac2fbf1bf4053031f723676c
17 changes: 8 additions & 9 deletions trunk/fs/xfs/xfs_iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ xfs_iomap_write_direct(
xfs_bmbt_irec_t imap[XFS_WRITE_IMAPS], *imapp;
xfs_bmap_free_t free_list;
int aeof;
xfs_filblks_t datablocks, qblocks, resblks;
xfs_filblks_t qblocks, resblks;
int committed;
int numrtextents;
int resrtextents;

/*
* Make sure that the dquots are there. This doesn't hold
Expand Down Expand Up @@ -434,24 +434,23 @@ xfs_iomap_write_direct(

if (!(extsz = ip->i_d.di_extsize))
extsz = mp->m_sb.sb_rextsize;
numrtextents = qblocks = (count_fsb + extsz - 1);
do_div(numrtextents, mp->m_sb.sb_rextsize);
resrtextents = qblocks = (count_fsb + extsz - 1);
do_div(resrtextents, mp->m_sb.sb_rextsize);
resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0);
quota_flag = XFS_QMOPT_RES_RTBLKS;
datablocks = 0;
} else {
datablocks = qblocks = count_fsb;
resrtextents = 0;
resblks = qblocks = XFS_DIOSTRAT_SPACE_RES(mp, count_fsb);
quota_flag = XFS_QMOPT_RES_REGBLKS;
numrtextents = 0;
}

/*
* Allocate and setup the transaction
*/
xfs_iunlock(ip, XFS_ILOCK_EXCL);
tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT);
resblks = XFS_DIOSTRAT_SPACE_RES(mp, datablocks);
error = xfs_trans_reserve(tp, resblks,
XFS_WRITE_LOG_RES(mp), numrtextents,
XFS_WRITE_LOG_RES(mp), resrtextents,
XFS_TRANS_PERM_LOG_RES,
XFS_WRITE_LOG_COUNT);

Expand Down

0 comments on commit 3b6a47c

Please sign in to comment.