diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-09 09:11:21 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-09 09:11:21 +0200 |
| commit | 0154ec71d597692a0d0682b19eac4b3adfb7f3dc (patch) | |
| tree | 121b4ac35146f5696da090d3ae2534c76523e6c2 /fs/xfs/libxfs/xfs_ialloc_btree.c | |
| parent | 9c3cef54c50d93871eaa46c28a06de8bd03fab63 (diff) | |
| parent | d1fdb6d8f6a4109a4263176c84b899076a5f8008 (diff) | |
Merge 5.2-rc4 into char-misc-next
We want the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 9 |
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( if (mp->m_inobt_mxr[0] == 0) return 0; + /* + * The log is permanently allocated, so the space it occupies will + * never be available for the kinds of things that would require btree + * expansion. We therefore can pretend the space isn't there. + */ + if (mp->m_sb.sb_logstart && + XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == agno) + agblocks -= mp->m_sb.sb_logblocks; + return xfs_btree_calc_size(mp->m_inobt_mnr, (uint64_t)agblocks * mp->m_sb.sb_inopblock / XFS_INODES_PER_CHUNK); |