aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc_btree.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-05-31 18:48:45 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-05-31 18:48:45 -0400
commit24e8a2ca1f74574ad2ed1ac7af0260dd90fd911e (patch)
treec863dd43c84579d853f3a2ae0ee6ead46c967703 /fs/xfs/libxfs/xfs_ialloc_btree.c
parent66f61c92889ff3ca365161fb29dd36d6354682ba (diff)
parentd724c9e54939a597592de3659541da11fc7aa112 (diff)
Merge tag 'kvm-ppc-fixes-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
PPC KVM fixes for 5.2 - Several bug fixes for the new XIVE-native code. - Replace kvm->lock by other mutexes in several places where we hold a vcpu mutex, to avoid lock order inversions. - Fix a lockdep warning on guest entry for radix-mode guests. - Fix a bug causing user-visible corruption of SPRG3 on the host.
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc_btree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c
index 1080381ff243..bc2dfacd2f4a 100644
--- a/fs/xfs/libxfs/xfs_ialloc_btree.c
+++ b/fs/xfs/libxfs/xfs_ialloc_btree.c
@@ -549,6 +549,15 @@ xfs_inobt_max_size(
549 if (mp->m_inobt_mxr[0] == 0) 549 if (mp->m_inobt_mxr[0] == 0)
550 return 0; 550 return 0;
551 551
552 /*
553 * The log is permanently allocated, so the space it occupies will
554 * never be available for the kinds of things that would require btree
555 * expansion. We therefore can pretend the space isn't there.
556 */
557 if (mp->m_sb.sb_logstart &&
558 XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == agno)
559 agblocks -= mp->m_sb.sb_logblocks;
560
552 return xfs_btree_calc_size(mp->m_inobt_mnr, 561 return xfs_btree_calc_size(mp->m_inobt_mnr,
553 (uint64_t)agblocks * mp->m_sb.sb_inopblock / 562 (uint64_t)agblocks * mp->m_sb.sb_inopblock /
554 XFS_INODES_PER_CHUNK); 563 XFS_INODES_PER_CHUNK);