linux/fs/xfs
Eric Sandeen 9de67c3ba9 xfs: allow inode allocations in post-growfs disk space
Today, if we perform an xfs_growfs which adds allocation groups,
mp->m_maxagi is not properly updated when the growfs is complete.

Therefore inodes will continue to be allocated only in the
AGs which existed prior to the growfs, and the new space
won't be utilized.

This is because of this path in xfs_growfs_data_private():

xfs_growfs_data_private
	xfs_initialize_perag(mp, nagcount, &nagimax);
		if (mp->m_flags & XFS_MOUNT_32BITINODES)
			index = xfs_set_inode32(mp);
		else
			index = xfs_set_inode64(mp);

		if (maxagi)
			*maxagi = index;

where xfs_set_inode* iterates over the (old) agcount in
mp->m_sb.sb_agblocks, which has not yet been updated
in the growfs path.  So "index" will be returned based on
the old agcount, not the new one, and new AGs are not available
for inode allocation.

Fix this by explicitly passing the proper AG count (which
xfs_initialize_perag() already has) down another level,
so that xfs_set_inode* can make the proper decision about
acceptable AGs for inode allocation in the potentially
newly-added AGs.

This has been broken since 3.7, when these two
xfs_set_inode* functions were added in commit 2d2194f.
Prior to that, we looped over "agcount" not sb_agblocks
in these calculations.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-07-24 20:51:54 +10:00
..
libxfs xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
Kconfig
kmem.c xfs: use NOIO contexts for vm_map_ram 2014-03-07 16:19:14 +11:00
kmem.h
Makefile libxfs: move source files 2014-06-25 14:57:53 +10:00
mrlock.h
time.h
uuid.c
uuid.h
xfs_acl.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_acl.h
xfs_aops.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_aops.h
xfs_attr_inactive.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_attr_list.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_attr.h
xfs_bit.c
xfs_bmap_util.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_bmap_util.h
xfs_buf_item.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_buf_item.h
xfs_buf.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_buf.h xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_dir2_readdir.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_discard.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_discard.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_dquot.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_dquot.h
xfs_error.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_error.h xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_export.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_extfree_item.h
xfs_file.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_filestream.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_filestream.h
xfs_fs.h xfs: report finobt status in fs geometry 2014-04-24 16:01:41 +10:00
xfs_fsops.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_fsops.h
xfs_globals.c
xfs_icache.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_icache.h xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode_item.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_inode_item.h
xfs_inode.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_inode.h
xfs_ioctl32.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_ioctl32.h
xfs_ioctl.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_ioctl.h
xfs_iomap.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_iomap.h
xfs_iops.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_iops.h
xfs_itable.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_itable.h
xfs_linux.h
xfs_log_cil.c xfs: fix cil push sequence after log recovery 2014-07-24 20:49:40 +10:00
xfs_log_priv.h
xfs_log_recover.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_log.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_log.h
xfs_message.c
xfs_message.h
xfs_mount.c xfs: allow inode allocations in post-growfs disk space 2014-07-24 20:51:54 +10:00
xfs_mount.h
xfs_mru_cache.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_mru_cache.h
xfs_qm_bhv.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_qm_syscalls.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_qm.c xfs: mark xfs_qm_quotacheck as static 2014-07-24 20:49:57 +10:00
xfs_qm.h xfs: mark xfs_qm_quotacheck as static 2014-07-24 20:49:57 +10:00
xfs_quota.h
xfs_quotaops.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_rtalloc.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_rtalloc.h xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_stats.c
xfs_stats.h
xfs_super.c xfs: allow inode allocations in post-growfs disk space 2014-07-24 20:51:54 +10:00
xfs_super.h xfs: allow inode allocations in post-growfs disk space 2014-07-24 20:51:54 +10:00
xfs_symlink.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_trace.c
xfs_trace.h
xfs_trans_ail.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_trans_buf.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_trans_dquot.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h
xfs_trans.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs_trans.h
xfs_types.h
xfs_vnode.h
xfs_xattr.c xfs: global error sign conversion 2014-06-25 14:58:08 +10:00
xfs.h xfs: introduce CONFIG_XFS_WARN 2013-05-07 18:45:36 -05:00