diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-11-04 05:19:01 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-11-05 22:38:34 +0100 |
commit | 9dc31acb01a1c7649c35b7954562a9a33b817c33 (patch) | |
tree | dc7aaf34984584a6db53374318ae29adea960886 /fs/xfs/Makefile | |
parent | xfs: check the metadata directory inumber in superblocks (diff) | |
download | linux-9dc31acb01a1c7649c35b7954562a9a33b817c33.tar.xz linux-9dc31acb01a1c7649c35b7954562a9a33b817c33.zip |
xfs: move repair temporary files to the metadata directory tree
Due to resource acquisition rules, we have to create the ondisk
temporary files used to stage a filesystem repair before we can acquire
a reference to the inode that we actually want to repair. Therefore,
we do not know at tempfile creation time whether the tempfile will
belong to the regular directory tree or the metadata directory tree.
This distinction becomes important when the swapext code tries to figure
out the quota accounting of the two files whose mappings are being
swapped. The swapext code assumes that accounting updates are required
for a file if dqattach attaches dquots. Metadir files are never
accounted in quota, which means that swapext must not update the quota
accounting when swapping in a repaired directory/xattr/rtbitmap structure.
Prior to the swapext call, therefore, both files must be marked as
METADIR for dqattach so that dqattach will ignore them. Add support for
a repair tempfile to be switched to the metadir tree and switched back
before being released so that ifree will just free the file.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/Makefile')
0 files changed, 0 insertions, 0 deletions