Skip to content

Commit

Permalink
Merge tag 'rename-eofblocks-5.14_2021-06-08' of https://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2

xfs: rename struct xfs_eofblocks

In the old days, struct xfs_eofblocks was an optional parameter to the
speculative post-EOF allocation garbage collector to narrow the scope of
a scan to files fitting specific criteria.  Nowadays it is used for all
other kinds of inode cache walks (reclaim, quotaoff, inactivation), so
the name is no longer fitting.  Change the flag namespace and rename the
structure to something more appropriate for what it does.

v2: separate the inode cache walk flag namespace from eofblocks

* tag 'rename-eofblocks-5.14_2021-06-08' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: rename struct xfs_eofblocks to xfs_icwalk
  xfs: change the prefix of XFS_EOF_FLAGS_* to XFS_ICWALK_FLAG_
  • Loading branch information
Darrick J. Wong committed Jun 8, 2021
2 parents 295abff + b26b2bf commit 68b2c8b
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 135 deletions.
8 changes: 4 additions & 4 deletions fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,18 +769,18 @@ xfs_file_buffered_write(
*/
if (ret == -EDQUOT && !cleared_space) {
xfs_iunlock(ip, iolock);
xfs_blockgc_free_quota(ip, XFS_EOF_FLAGS_SYNC);
xfs_blockgc_free_quota(ip, XFS_ICWALK_FLAG_SYNC);
cleared_space = true;
goto write_retry;
} else if (ret == -ENOSPC && !cleared_space) {
struct xfs_eofblocks eofb = {0};
struct xfs_icwalk icw = {0};

cleared_space = true;
xfs_flush_inodes(ip->i_mount);

xfs_iunlock(ip, iolock);
eofb.eof_flags = XFS_EOF_FLAGS_SYNC;
xfs_blockgc_free_space(ip->i_mount, &eofb);
icw.icw_flags = XFS_ICWALK_FLAG_SYNC;
xfs_blockgc_free_space(ip->i_mount, &icw);
goto write_retry;
}

Expand Down
Loading

0 comments on commit 68b2c8b

Please sign in to comment.