diff options
author | Jie Liu <jeff.liu@oracle.com> | 2013-05-03 03:41:19 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-06-19 15:26:16 -0400 |
commit | 2fb8b5027dbde32a45edf5f3d7ee082be9261d93 (patch) | |
tree | a3036b7d1dcaa8a45850562faa6dd8fda68a92a3 /fs/xfs/xfs_trans.h | |
parent | 635c4d0bd94512de3aafa7ae8f45c1dce0fc1ffe (diff) |
xfs: Remove two dead transaction log reservaion macros
Upstream commit 5b292ae3a951a58e32119d73c7ac8f5bec7395a3
xfs: make use of xfs_calc_buf_res() in xfs_trans.c
Beginning from above commit, neither XFS_ALLOCFREE_LOG_RES() nor
XFS_DIROP_LOG_RES() is used by those routines for calculating
transaction space reservations, so it's safe to remove them now.
Also, with a slightly update for the relevant comments to reflect
the ideas of why those log count numbers should be.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.h')
-rw-r--r-- | fs/xfs/xfs_trans.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index a44dba5b2cdb..6d526569820c 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -210,23 +210,18 @@ struct xfs_log_item_desc { | |||
210 | /* | 210 | /* |
211 | * Per-extent log reservation for the allocation btree changes | 211 | * Per-extent log reservation for the allocation btree changes |
212 | * involved in freeing or allocating an extent. | 212 | * involved in freeing or allocating an extent. |
213 | * 2 trees * (2 blocks/level * max depth - 1) * block size | 213 | * 2 trees * (2 blocks/level * max depth - 1) |
214 | */ | 214 | */ |
215 | #define XFS_ALLOCFREE_LOG_RES(mp,nx) \ | ||
216 | ((nx) * (2 * XFS_FSB_TO_B((mp), 2 * XFS_AG_MAXLEVELS(mp) - 1))) | ||
217 | #define XFS_ALLOCFREE_LOG_COUNT(mp,nx) \ | 215 | #define XFS_ALLOCFREE_LOG_COUNT(mp,nx) \ |
218 | ((nx) * (2 * (2 * XFS_AG_MAXLEVELS(mp) - 1))) | 216 | ((nx) * (2 * (2 * XFS_AG_MAXLEVELS(mp) - 1))) |
219 | 217 | ||
220 | /* | 218 | /* |
221 | * Per-directory log reservation for any directory change. | 219 | * Per-directory log reservation for any directory change. |
222 | * dir blocks: (1 btree block per level + data block + free block) * dblock size | 220 | * dir blocks: (1 btree block per level + data block + free block) |
223 | * bmap btree: (levels + 2) * max depth * block size | 221 | * bmap btree: (levels + 2) * max depth |
224 | * v2 directory blocks can be fragmented below the dirblksize down to the fsb | 222 | * v2 directory blocks can be fragmented below the dirblksize down to the fsb |
225 | * size, so account for that in the DAENTER macros. | 223 | * size, so account for that in the DAENTER macros. |
226 | */ | 224 | */ |
227 | #define XFS_DIROP_LOG_RES(mp) \ | ||
228 | (XFS_FSB_TO_B(mp, XFS_DAENTER_BLOCKS(mp, XFS_DATA_FORK)) + \ | ||
229 | (XFS_FSB_TO_B(mp, XFS_DAENTER_BMAPS(mp, XFS_DATA_FORK) + 1))) | ||
230 | #define XFS_DIROP_LOG_COUNT(mp) \ | 225 | #define XFS_DIROP_LOG_COUNT(mp) \ |
231 | (XFS_DAENTER_BLOCKS(mp, XFS_DATA_FORK) + \ | 226 | (XFS_DAENTER_BLOCKS(mp, XFS_DATA_FORK) + \ |
232 | XFS_DAENTER_BMAPS(mp, XFS_DATA_FORK) + 1) | 227 | XFS_DAENTER_BMAPS(mp, XFS_DATA_FORK) + 1) |