aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_resv.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 12:16:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 12:16:20 -0500
commit1d32bdafaaa8bcc4c39b41ab9f674887d147f188 (patch)
treec1aae09d8b98b033fd4dd85ba3dbf97a25776e90 /fs/xfs/xfs_trans_resv.c
parent0dc3fd0249a295863900984e02dd4bb89204205b (diff)
parentbf3964c188d686424ff7b69a45941851b9f437f0 (diff)
Merge tag 'xfs-for-linus-v3.14-rc1' of git://oss.sgi.com/xfs/xfs
Pull xfs update from Ben Myers: "This is primarily bug fixes, many of which you already have. New stuff includes a series to decouple the in-memory and on-disk log format, helpers in the area of inode clusters, and i_version handling. We decided to try to use more topic branches this release, so there are some merge commits in there on account of that. I'm afraid I didn't do a good job of putting meaningful comments in the first couple of merges. Sorry about that. I think I have the hang of it now. For 3.14-rc1 there are fixes in the areas of remote attributes, discard, growfs, memory leaks in recovery, directory v2, quotas, the MAINTAINERS file, allocation alignment, extent list locking, and in xfs_bmapi_allocate. There are cleanups in xfs_setsize_buftarg, removing unused macros, quotas, setattr, and freeing of inode clusters. The in-memory and on-disk log format have been decoupled, a common helper to calculate the number of blocks in an inode cluster has been added, and handling of i_version has been pulled into the filesystems that use it. - cleanup in xfs_setsize_buftarg - removal of remaining unused flags for vop toss/flush/flushinval - fix for memory corruption in xfs_attrlist_by_handle - fix for out-of-date comment in xfs_trans_dqlockedjoin - fix for discard if range length is less than one block - fix for overrun of agfl buffer using growfs on v4 superblock filesystems - pull i_version handling out into the filesystems that use it - don't leak recovery items on error - fix for memory leak in xfs_dir2_node_removename - several cleanups for quotas - fix bad assertion in xfs_qm_vop_create_dqattach - cleanup for xfs_setattr_mode, and add xfs_setattr_time - fix quota assert in xfs_setattr_nonsize - fix an infinite loop when turning off group/project quota before user quota - fix for temporary buffer allocation failure in xfs_dir2_block_to_sf with large directory block sizes - fix Dave's email address in MAINTAINERS - cleanup calculation of freed inode cluster blocks - fix alignment of initial file allocations to match filesystem geometry - decouple in-memory and on-disk log format - introduce a common helper to calculate the number of filesystem blocks in an inode cluster - fixes for extent list locking - fix for off-by-one in xfs_attr3_rmt_verify - fix for missing destroy_work_on_stack in xfs_bmapi_allocate" * tag 'xfs-for-linus-v3.14-rc1' of git://oss.sgi.com/xfs/xfs: (51 commits) xfs: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK() xfs: fix off-by-one error in xfs_attr3_rmt_verify xfs: assert that we hold the ilock for extent map access xfs: use xfs_ilock_attr_map_shared in xfs_attr_list_int xfs: use xfs_ilock_attr_map_shared in xfs_attr_get xfs: use xfs_ilock_data_map_shared in xfs_qm_dqiterate xfs: use xfs_ilock_data_map_shared in xfs_qm_dqtobp xfs: take the ilock around xfs_bmapi_read in xfs_zero_remaining_bytes xfs: reinstate the ilock in xfs_readdir xfs: add xfs_ilock_attr_map_shared xfs: rename xfs_ilock_map_shared xfs: remove xfs_iunlock_map_shared xfs: no need to lock the inode in xfs_find_handle xfs: use xfs_icluster_size_fsb in xfs_imap xfs: use xfs_icluster_size_fsb in xfs_ifree_cluster xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_init xfs: use xfs_icluster_size_fsb in xfs_bulkstat xfs: introduce a common helper xfs_icluster_size_fsb xfs: get rid of XFS_IALLOC_BLOCKS macros xfs: get rid of XFS_INODE_CLUSTER_SIZE macros ...
Diffstat (limited to 'fs/xfs/xfs_trans_resv.c')
-rw-r--r--fs/xfs/xfs_trans_resv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans_resv.c b/fs/xfs/xfs_trans_resv.c
index 2fd59c0dae66..2ffd3e331b49 100644
--- a/fs/xfs/xfs_trans_resv.c
+++ b/fs/xfs/xfs_trans_resv.c
@@ -174,7 +174,7 @@ xfs_calc_itruncate_reservation(
174 xfs_calc_buf_res(5, 0) + 174 xfs_calc_buf_res(5, 0) +
175 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), 175 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1),
176 XFS_FSB_TO_B(mp, 1)) + 176 XFS_FSB_TO_B(mp, 1)) +
177 xfs_calc_buf_res(2 + XFS_IALLOC_BLOCKS(mp) + 177 xfs_calc_buf_res(2 + mp->m_ialloc_blks +
178 mp->m_in_maxlevels, 0))); 178 mp->m_in_maxlevels, 0)));
179} 179}
180 180
@@ -282,7 +282,7 @@ xfs_calc_create_resv_modify(
282 * For create we can allocate some inodes giving: 282 * For create we can allocate some inodes giving:
283 * the agi and agf of the ag getting the new inodes: 2 * sectorsize 283 * the agi and agf of the ag getting the new inodes: 2 * sectorsize
284 * the superblock for the nlink flag: sector size 284 * the superblock for the nlink flag: sector size
285 * the inode blocks allocated: XFS_IALLOC_BLOCKS * blocksize 285 * the inode blocks allocated: mp->m_ialloc_blks * blocksize
286 * the inode btree: max depth * blocksize 286 * the inode btree: max depth * blocksize
287 * the allocation btrees: 2 trees * (max depth - 1) * block size 287 * the allocation btrees: 2 trees * (max depth - 1) * block size
288 */ 288 */
@@ -292,7 +292,7 @@ xfs_calc_create_resv_alloc(
292{ 292{
293 return xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + 293 return xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) +
294 mp->m_sb.sb_sectsize + 294 mp->m_sb.sb_sectsize +
295 xfs_calc_buf_res(XFS_IALLOC_BLOCKS(mp), XFS_FSB_TO_B(mp, 1)) + 295 xfs_calc_buf_res(mp->m_ialloc_blks, XFS_FSB_TO_B(mp, 1)) +
296 xfs_calc_buf_res(mp->m_in_maxlevels, XFS_FSB_TO_B(mp, 1)) + 296 xfs_calc_buf_res(mp->m_in_maxlevels, XFS_FSB_TO_B(mp, 1)) +
297 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), 297 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1),
298 XFS_FSB_TO_B(mp, 1)); 298 XFS_FSB_TO_B(mp, 1));
@@ -385,9 +385,9 @@ xfs_calc_ifree_reservation(
385 xfs_calc_inode_res(mp, 1) + 385 xfs_calc_inode_res(mp, 1) +
386 xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + 386 xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) +
387 xfs_calc_buf_res(1, XFS_FSB_TO_B(mp, 1)) + 387 xfs_calc_buf_res(1, XFS_FSB_TO_B(mp, 1)) +
388 max_t(uint, XFS_FSB_TO_B(mp, 1), XFS_INODE_CLUSTER_SIZE(mp)) + 388 max_t(uint, XFS_FSB_TO_B(mp, 1), mp->m_inode_cluster_size) +
389 xfs_calc_buf_res(1, 0) + 389 xfs_calc_buf_res(1, 0) +
390 xfs_calc_buf_res(2 + XFS_IALLOC_BLOCKS(mp) + 390 xfs_calc_buf_res(2 + mp->m_ialloc_blks +
391 mp->m_in_maxlevels, 0) + 391 mp->m_in_maxlevels, 0) +
392 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), 392 xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1),
393 XFS_FSB_TO_B(mp, 1)); 393 XFS_FSB_TO_B(mp, 1));