WSL2-Linux-Kernel/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
Makefile
kmem.c xfs: use NOIO contexts for vm_map_ram 2014-03-07 16:19:14 +11:00
kmem.h
mrlock.h
time.h
uuid.c
uuid.h
xfs.h
xfs_acl.c xfs: return -E2BIG if hit the maximum size limits of ACLs 2014-02-07 15:26:11 +11:00
xfs_acl.h
xfs_ag.h xfs: support the XFS_BTNUM_FINOBT free inode btree type 2014-04-24 16:00:52 +10:00
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: remove unused length arg from alloc_block ops 2014-04-14 19:03:53 +10:00
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: remove unused length arg from alloc_block ops 2014-04-14 19:03:53 +10:00
xfs_bmap_btree.h xfs: remove unused mp arg from xfs_bmdr_maxrecs() 2014-04-14 18:58:51 +10:00
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: Use defines for CRC offsets in all cases 2014-02-27 15:15:27 +11:00
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: remove dquot hints 2014-05-05 17:30:15 +10:00
xfs_dquot_buf.c xfs: remove unused mp arg from xfs_calc_dquots_per_chunk() 2014-04-14 19:03:34 +10:00
xfs_dquot_item.c
xfs_dquot_item.h
xfs_error.c xfs: print useful caller information in xfs_error_report 2014-02-27 15:21:37 +11:00
xfs_error.h xfs: add xfs_verifier_error() 2014-02-27 15:21:07 +11:00
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: add filestream allocator tracepoints 2014-04-23 07:11:52 +10:00
xfs_filestream.h xfs: add filestream allocator tracepoints 2014-04-23 07:11:52 +10:00
xfs_format.h xfs: support the XFS_BTNUM_FINOBT free inode btree type 2014-04-24 16:00:52 +10:00
xfs_fs.h xfs: report finobt status in fs geometry 2014-04-24 16:01:41 +10:00
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: refactor xfs_ialloc_btree.c to support multiple inobt numbers 2014-04-24 16:00:50 +10:00
xfs_icache.c xfs: remove unused pag ptr arg from iterator execute functions 2014-04-14 19:04:19 +10:00
xfs_icache.h xfs: remove unused pag ptr arg from iterator execute functions 2014-04-14 19:04:19 +10:00
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: remove unused bp arg from xfs_iflush_fork() 2014-04-14 19:04:46 +10:00
xfs_inode_fork.h xfs: remove unused bp arg from xfs_iflush_fork() 2014-04-14 19:04:46 +10:00
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: Fix wrong error codes being returned 2014-05-05 17:30:20 +10:00
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: refactor xfs_ialloc_btree.c to support multiple inobt numbers 2014-04-24 16:00:50 +10:00
xfs_itable.h
xfs_linux.h xfs: add xfs_verifier_error() 2014-02-27 15:21:07 +11:00
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: embedd mru_elem into parent structure 2014-04-23 07:11:51 +10:00
xfs_mru_cache.h xfs: embedd mru_elem into parent structure 2014-04-23 07:11:51 +10:00
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: remove unused mp arg from xfs_calc_dquots_per_chunk() 2014-04-14 19:03:34 +10:00
xfs_quotaops.c xfs: fix Q_XQUOTARM ioctl 2014-05-05 17:25:50 +10:00
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: remove unused xfs_mount arg from xfs_symlink_hdr_ok() 2014-04-14 19:05:43 +10:00
xfs_stats.c xfs: support the XFS_BTNUM_FINOBT free inode btree type 2014-04-24 16:00:52 +10:00
xfs_stats.h xfs: support the XFS_BTNUM_FINOBT free inode btree type 2014-04-24 16:00:52 +10:00
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: remove unused xfs_mount arg from xfs_symlink_hdr_ok() 2014-04-14 19:05:43 +10:00
xfs_sysctl.c
xfs_sysctl.h
xfs_trace.c xfs: add filestream allocator tracepoints 2014-04-23 07:11:52 +10:00
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: remove unused ail pointer arg from xfs_trans_ail_cursor_done() 2014-04-14 19:06:05 +10:00
xfs_trans.h
xfs_trans_ail.c xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done() 2014-04-14 19:06:05 +10:00
xfs_trans_buf.c xfs: don't leak EFSBADCRC to userspace 2014-03-07 16:19:14 +11:00
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h xfs: remove unused ail pointer arg from xfs_trans_ail_cursor_done() 2014-04-14 19:06:05 +10:00
xfs_trans_resv.c xfs: convert m_dirblksize to xfs_da_geometry 2014-06-06 15:15:59 +10:00
xfs_trans_resv.h Merge branch 'xfs-O_TMPFILE-support' into for-next 2014-03-13 19:14:43 +11:00
xfs_trans_space.h xfs: convert m_dirblkfsbs to xfs_da_geometry 2014-06-06 15:14:11 +10:00
xfs_types.h xfs: support the XFS_BTNUM_FINOBT free inode btree type 2014-04-24 16:00:52 +10:00
xfs_vnode.h
xfs_xattr.c