summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-01-23 01:48:36 +0100
committerDarrick J. Wong <djwong@kernel.org>2021-02-03 18:18:49 +0100
commit111068f80eac00173816c2e822c52c316b650df3 (patch)
treec41f02db7838a1a33e58ee687d6df2335f48ea0d /fs/xfs/xfs_file.c
parentxfs: move and rename xfs_inode_free_quota_blocks to avoid conflicts (diff)
downloadlinux-111068f80eac00173816c2e822c52c316b650df3.tar.xz
linux-111068f80eac00173816c2e822c52c316b650df3.zip
xfs: pass flags and return gc errors from xfs_blockgc_free_quota
Change the signature of xfs_blockgc_free_quota in preparation for the next few patches. Callers can now pass EOF_FLAGS into the function to control scan parameters; and the function will now pass back any corruption errors seen while scanning, though for our retry loops we'll just try again unconditionally. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index eade63d53be5..8546dbf6c5ac 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -702,14 +702,14 @@ write_retry:
* metadata space. This reduces the chances that the eofblocks scan
* waits on dirty mappings. Since xfs_flush_inodes() is serialized, this
* also behaves as a filter to prevent too many eofblocks scans from
- * running at the same time.
+ * running at the same time. Use a synchronous scan to increase the
+ * effectiveness of the scan.
*/
if (ret == -EDQUOT && !cleared_space) {
xfs_iunlock(ip, iolock);
- cleared_space = xfs_blockgc_free_quota(ip);
- if (cleared_space)
- goto write_retry;
- iolock = 0;
+ xfs_blockgc_free_quota(ip, XFS_EOF_FLAGS_SYNC);
+ cleared_space = true;
+ goto write_retry;
} else if (ret == -ENOSPC && !cleared_space) {
struct xfs_eofblocks eofb = {0};