linux/fs/xfs
Dave Chinner 03e01349c6 xfs: null unused quota inodes when quota is on
When quota is on, it is expected that unused quota inodes have a
value of NULLFSINO. The changes to support a separate project quota
in 3.12 broken this rule for non-project quota inode enabled
filesystem, as the code now refuses to write the group quota inode
if neither group or project quotas are enabled. This regression was
introduced by commit d892d58 ("xfs: Start using pquotaino from the
superblock").

In this case, we should be writing NULLFSINO rather than nothing to
ensure that we leave the group quota inode in a valid state while
quotas are enabled.

Failure to do so doesn't cause a current kernel to break - the
separate project quota inodes introduced translation code to always
treat a zero inode as NULLFSINO. This was introduced by commit
0102629 ("xfs: Initialize all quota inodes to be NULLFSINO") with is
also in 3.12 but older kernels do not do this and hence taking a
filesystem back to an older kernel can result in quotas failing
initialisation at mount time. When that happens, we see this in
dmesg:

[ 1649.215390] XFS (sdb): Mounting Filesystem
[ 1649.316894] XFS (sdb): Failed to initialize disk quotas.
[ 1649.316902] XFS (sdb): Ending clean mount

By ensuring that we write NULLFSINO to quota inodes that aren't
active, we avoid this problem. We have to be really careful when
determining if the quota inodes are active or not, because we don't
want to write a NULLFSINO if the quota inodes are active and we
simply aren't updating them.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-07-15 07:28:41 +10:00
..
Kconfig
kmem.c
kmem.h
Makefile
mrlock.h
time.h
uuid.c
uuid.h
xfs.h
xfs_acl.c
xfs_acl.h
xfs_ag.h
xfs_alloc.c xfs: Fix rounding in xfs_alloc_fix_len() 2014-06-06 16:06:37 +10:00
xfs_alloc.h
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_aops.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-06-12 10:30:18 -07:00
xfs_aops.h
xfs_attr.c xfs: remove redundant geometry information from xfs_da_state 2014-06-06 15:22:04 +10:00
xfs_attr.h
xfs_attr_inactive.c
xfs_attr_leaf.c xfs: remove redundant geometry information from xfs_da_state 2014-06-06 15:22:04 +10:00
xfs_attr_leaf.h xfs: pass xfs_da_args to xfs_attr_leaf_newentsize 2014-06-06 15:21:27 +10:00
xfs_attr_list.c xfs: introduce directory geometry structure 2014-06-06 15:01:58 +10:00
xfs_attr_remote.c xfs: replace attr LBSIZE with xfs_da_geometry 2014-06-06 15:21:45 +10:00
xfs_attr_remote.h
xfs_attr_sf.h
xfs_bit.c
xfs_bit.h xfs: small cleanup in xfs_lowbit64() 2014-06-06 16:04:42 +10:00
xfs_bmap.c xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_bmap.h xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_bmap_btree.c
xfs_bmap_btree.h
xfs_bmap_util.c xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_bmap_util.h xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_btree.c xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_btree.h Merge branch 'xfs-free-inode-btree' into for-next 2014-05-15 09:37:44 +10:00
xfs_buf.c Merge branch 'xfs-unused-args-cleanup' into for-next 2014-05-15 09:36:35 +10:00
xfs_buf.h Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_buf_item.c Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_buf_item.h
xfs_cksum.h
xfs_da_btree.c Merge branch 'xfs-da-geom' into for-next 2014-06-10 07:32:41 +10:00
xfs_da_btree.h xfs: remove redundant geometry information from xfs_da_state 2014-06-06 15:22:04 +10:00
xfs_da_format.c xfs: convert m_dirblksize to xfs_da_geometry 2014-06-06 15:15:59 +10:00
xfs_da_format.h xfs: replace attr LBSIZE with xfs_da_geometry 2014-06-06 15:21:45 +10:00
xfs_dinode.h
xfs_dir2.c Merge branch 'xfs-da-geom' into for-next 2014-06-10 07:32:41 +10:00
xfs_dir2.h xfs: remove mp->m_dir_geo from directory logging 2014-06-06 15:20:54 +10:00
xfs_dir2_block.c xfs: remove mp->m_dir_geo from directory logging 2014-06-06 15:20:54 +10:00
xfs_dir2_data.c xfs: remove mp->m_dir_geo from directory logging 2014-06-06 15:20:54 +10:00
xfs_dir2_leaf.c xfs: remove mp->m_dir_geo from directory logging 2014-06-06 15:20:54 +10:00
xfs_dir2_node.c xfs: remove redundant geometry information from xfs_da_state 2014-06-06 15:22:04 +10:00
xfs_dir2_priv.h xfs: remove mp->m_dir_geo from directory logging 2014-06-06 15:20:54 +10:00
xfs_dir2_readdir.c xfs: fix xfs_da_args sparse warning in xfs_readdir 2014-06-10 07:30:36 +10:00
xfs_dir2_sf.c xfs: convert m_dirblksize to xfs_da_geometry 2014-06-06 15:15:59 +10:00
xfs_discard.c
xfs_discard.h
xfs_dquot.c Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_dquot.h
xfs_dquot_buf.c
xfs_dquot_item.c
xfs_dquot_item.h
xfs_error.c
xfs_error.h
xfs_export.c xfs: xfs_commit_metadata returns wrong errno 2014-05-15 09:21:52 +10:00
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-06-12 10:30:18 -07:00
xfs_filestream.c
xfs_filestream.h
xfs_format.h
xfs_fs.h
xfs_fsops.c Merge branch 'xfs-da-geom' into for-next 2014-06-10 07:32:41 +10:00
xfs_fsops.h
xfs_globals.c
xfs_ialloc.c Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_ialloc.h xfs: fix compile error when libxfs header used in C++ code 2014-05-20 08:52:21 +10:00
xfs_ialloc_btree.c Merge branch 'xfs-free-inode-btree' into for-next 2014-05-15 09:37:44 +10:00
xfs_ialloc_btree.h
xfs_icache.c
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode.c Merge branch 'xfs-feature-bit-cleanup' into for-next 2014-05-20 08:57:02 +10:00
xfs_inode.h Merge branch 'xfs-feature-bit-cleanup' into for-next 2014-05-20 08:57:02 +10:00
xfs_inode_buf.c xfs: turn NLINK feature on by default 2014-05-20 07:46:40 +10:00
xfs_inode_buf.h
xfs_inode_fork.c
xfs_inode_fork.h
xfs_inode_item.c xfs: turn NLINK feature on by default 2014-05-20 07:46:40 +10:00
xfs_inode_item.h
xfs_inum.h
xfs_ioctl.c xfs: update for 3.16-rc1 2014-06-11 09:03:47 -07:00
xfs_ioctl.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_iomap.c xfs: refine the allocation stack switch 2014-07-15 07:08:24 +10:00
xfs_iomap.h
xfs_iops.c Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next 2014-05-15 09:38:15 +10:00
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_linux.h
xfs_log.c Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_log.h xfs: log vector rounding leaks log space 2014-05-20 08:18:09 +10:00
xfs_log_cil.c Merge branch 'xfs-misc-fixes-2-for-3.16' into for-next 2014-05-20 08:56:00 +10:00
xfs_log_format.h
xfs_log_priv.h
xfs_log_recover.c Merge branch 'xfs-free-inode-btree' into for-next 2014-05-15 09:37:44 +10:00
xfs_log_recover.h
xfs_log_rlimit.c xfs: use xfs_da_geometry for block size in attr code 2014-06-06 15:21:10 +10:00
xfs_message.c
xfs_message.h
xfs_mount.c Merge branch 'xfs-misc-fixes-3-for-3.16' into for-next 2014-06-10 07:32:56 +10:00
xfs_mount.h xfs: move node entry counts to xfs_da_geometry 2014-06-06 15:20:02 +10:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_qm.c Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next 2014-05-15 09:38:15 +10:00
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next 2014-05-15 09:38:15 +10:00
xfs_quota.h
xfs_quota_defs.h
xfs_quotaops.c
xfs_rtalloc.c
xfs_rtalloc.h
xfs_rtbitmap.c xfs: kill xfs_buf_geterror() 2014-06-06 16:02:12 +10:00
xfs_sb.c xfs: null unused quota inodes when quota is on 2014-07-15 07:28:41 +10:00
xfs_sb.h Merge branch 'xfs-feature-bit-cleanup' into for-next 2014-05-20 08:57:02 +10:00
xfs_shared.h
xfs_stats.c
xfs_stats.h
xfs_super.c Merge branch 'xfs-filestreams-lookup' into for-next 2014-05-15 09:36:59 +10:00
xfs_super.h
xfs_symlink.c xfs: convert m_dirblkfsbs to xfs_da_geometry 2014-06-06 15:14:11 +10:00
xfs_symlink.h
xfs_symlink_remote.c
xfs_sysctl.c
xfs_sysctl.h
xfs_trace.c
xfs_trace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-06-12 10:30:18 -07:00
xfs_trans.c
xfs_trans.h
xfs_trans_ail.c
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h
xfs_trans_resv.c xfs: convert m_dirblksize to xfs_da_geometry 2014-06-06 15:15:59 +10:00
xfs_trans_resv.h
xfs_trans_space.h xfs: convert m_dirblkfsbs to xfs_da_geometry 2014-06-06 15:14:11 +10:00
xfs_types.h
xfs_vnode.h
xfs_xattr.c