xfs/108: sync filesystem before querying quota
authorDarrick J. Wong <djwong@kernel.org>
Wed, 1 Sep 2021 00:12:20 +0000 (17:12 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 12 Sep 2021 10:16:13 +0000 (18:16 +0800)
commit189eb6048564ea340d4acdbc2daf3acd72fdaa93
tree815e4c199663d8cc6307d713cba1b288de0ccf34
parentd9f1b96b33e0f583592c02bca5374f2aa02a3da2
xfs/108: sync filesystem before querying quota

The new deferred inactivation code is lazy about deallocating
deleted files, which means that we need to be more proactive about
syncing the filesystem after deleting things.  When reporting quotas,
XFS only flushes the deferred work if we query quota id 0, so we
need the explicit sync to ensure the quota numbers are not affected
by laziness.

[Eryu: replace the global sync with xfs_io syncfs command]

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/108