diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.h | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 7a728f9fc0be..2f87a53f74fe 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -225,7 +225,7 @@ xfs_ialloc_inode_init( | |||
225 | * they track in the AIL as if they were physically logged. | 225 | * they track in the AIL as if they were physically logged. |
226 | */ | 226 | */ |
227 | if (tp) | 227 | if (tp) |
228 | xfs_icreate_log(tp, agno, agbno, XFS_IALLOC_INODES(mp), | 228 | xfs_icreate_log(tp, agno, agbno, mp->m_ialloc_inos, |
229 | mp->m_sb.sb_inodesize, length, gen); | 229 | mp->m_sb.sb_inodesize, length, gen); |
230 | } else if (xfs_sb_version_hasnlink(&mp->m_sb)) | 230 | } else if (xfs_sb_version_hasnlink(&mp->m_sb)) |
231 | version = 2; | 231 | version = 2; |
@@ -329,7 +329,7 @@ xfs_ialloc_ag_alloc( | |||
329 | * Locking will ensure that we don't have two callers in here | 329 | * Locking will ensure that we don't have two callers in here |
330 | * at one time. | 330 | * at one time. |
331 | */ | 331 | */ |
332 | newlen = XFS_IALLOC_INODES(args.mp); | 332 | newlen = args.mp->m_ialloc_inos; |
333 | if (args.mp->m_maxicount && | 333 | if (args.mp->m_maxicount && |
334 | args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) | 334 | args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) |
335 | return XFS_ERROR(ENOSPC); | 335 | return XFS_ERROR(ENOSPC); |
@@ -999,7 +999,7 @@ xfs_dialloc( | |||
999 | * inode. | 999 | * inode. |
1000 | */ | 1000 | */ |
1001 | if (mp->m_maxicount && | 1001 | if (mp->m_maxicount && |
1002 | mp->m_sb.sb_icount + XFS_IALLOC_INODES(mp) > mp->m_maxicount) { | 1002 | mp->m_sb.sb_icount + mp->m_ialloc_inos > mp->m_maxicount) { |
1003 | noroom = 1; | 1003 | noroom = 1; |
1004 | okalloc = 0; | 1004 | okalloc = 0; |
1005 | } | 1005 | } |
@@ -1202,7 +1202,7 @@ xfs_difree( | |||
1202 | * When an inode cluster is free, it becomes eligible for removal | 1202 | * When an inode cluster is free, it becomes eligible for removal |
1203 | */ | 1203 | */ |
1204 | if (!(mp->m_flags & XFS_MOUNT_IKEEP) && | 1204 | if (!(mp->m_flags & XFS_MOUNT_IKEEP) && |
1205 | (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { | 1205 | (rec.ir_freecount == mp->m_ialloc_inos)) { |
1206 | 1206 | ||
1207 | *delete = 1; | 1207 | *delete = 1; |
1208 | *first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); | 1208 | *first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); |
@@ -1212,7 +1212,7 @@ xfs_difree( | |||
1212 | * AGI and Superblock inode counts, and mark the disk space | 1212 | * AGI and Superblock inode counts, and mark the disk space |
1213 | * to be freed when the transaction is committed. | 1213 | * to be freed when the transaction is committed. |
1214 | */ | 1214 | */ |
1215 | ilen = XFS_IALLOC_INODES(mp); | 1215 | ilen = mp->m_ialloc_inos; |
1216 | be32_add_cpu(&agi->agi_count, -ilen); | 1216 | be32_add_cpu(&agi->agi_count, -ilen); |
1217 | be32_add_cpu(&agi->agi_freecount, -(ilen - 1)); | 1217 | be32_add_cpu(&agi->agi_freecount, -(ilen - 1)); |
1218 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); | 1218 | xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); |
@@ -1311,7 +1311,7 @@ xfs_imap_lookup( | |||
1311 | 1311 | ||
1312 | /* check that the returned record contains the required inode */ | 1312 | /* check that the returned record contains the required inode */ |
1313 | if (rec.ir_startino > agino || | 1313 | if (rec.ir_startino > agino || |
1314 | rec.ir_startino + XFS_IALLOC_INODES(mp) <= agino) | 1314 | rec.ir_startino + mp->m_ialloc_inos <= agino) |
1315 | return EINVAL; | 1315 | return EINVAL; |
1316 | 1316 | ||
1317 | /* for untrusted inodes check it is allocated first */ | 1317 | /* for untrusted inodes check it is allocated first */ |
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index a8f76a5ff418..4689b025f79f 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h | |||
@@ -28,7 +28,6 @@ struct xfs_btree_cur; | |||
28 | /* | 28 | /* |
29 | * Allocation parameters for inode allocation. | 29 | * Allocation parameters for inode allocation. |
30 | */ | 30 | */ |
31 | #define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos | ||
32 | #define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks | 31 | #define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks |
33 | 32 | ||
34 | /* | 33 | /* |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 07ab52ca8aba..f76de2eadb6d 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -3208,9 +3208,9 @@ xlog_recover_do_icreate_pass2( | |||
3208 | } | 3208 | } |
3209 | 3209 | ||
3210 | /* existing allocation is fixed value */ | 3210 | /* existing allocation is fixed value */ |
3211 | ASSERT(count == XFS_IALLOC_INODES(mp)); | 3211 | ASSERT(count == mp->m_ialloc_inos); |
3212 | ASSERT(length == XFS_IALLOC_BLOCKS(mp)); | 3212 | ASSERT(length == XFS_IALLOC_BLOCKS(mp)); |
3213 | if (count != XFS_IALLOC_INODES(mp) || | 3213 | if (count != mp->m_ialloc_inos || |
3214 | length != XFS_IALLOC_BLOCKS(mp)) { | 3214 | length != XFS_IALLOC_BLOCKS(mp)) { |
3215 | xfs_warn(log->l_mp, "xlog_recover_do_icreate_trans: bad count 2"); | 3215 | xfs_warn(log->l_mp, "xlog_recover_do_icreate_trans: bad count 2"); |
3216 | return EINVAL; | 3216 | return EINVAL; |