]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix incorrect root dquot corruption error when switching group/project quota...
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Feb 2021 19:13:58 +0000 (11:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 4 Feb 2021 17:10:38 +0000 (09:10 -0800)
commit71954c98cf570cb1ccc5bc6654ced6edb54d76bc
tree913d3a1d29c620dfdf71218e4745523b61ef7a83
parentec1c2f07327d9536af1e1c877ec038027a0f99fc
xfs: fix incorrect root dquot corruption error when switching group/project quota types

While writing up a regression test for broken behavior when a chprojid
request fails, I noticed that we were logging corruption notices about
the root dquot of the group/project quota file at mount time when
testing V4 filesystems.

In commit 08778bdc229e, I was trying to improve ondisk dquot validation
by making sure that when we load an ondisk dquot into memory on behalf
of an incore dquot, the dquot id and type matches.  Unfortunately, I
forgot that V4 filesystems only have two quota files, and can switch
that file between group and project quota types at mount time.  When we
perform that switch, we'll try to load the default quota limits from the
root dquot prior to running quotacheck and log a corruption error when
the types don't match.

This is inconsequential because quotacheck will reset the second quota
file as part of doing the switch, but we shouldn't leave scary messages
in the kernel log.

Fixes: 08778bdc229e ("xfs: validate ondisk/incore dquot flags")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
fs/xfs/xfs_dquot.c