diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 14:54:56 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 14:58:57 -0700 |
commit | e6c9e75fbe792e1fb3bc7e7efce5c6bb015023c5 (patch) | |
tree | d96b67161ac0bb4e5d3796de6a9d504e3dfe8714 /fs/xfs/scrub/nlinks.h | |
parent | 1e58a8ccf2597c9259a8e71a2bffac5e11e12ea0 (diff) |
xfs: move files to orphanage instead of letting nlinks drop to zero
If we encounter an inode with a nonzero link count but zero observed
links, move it to the orphanage.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/nlinks.h')
-rw-r--r-- | fs/xfs/scrub/nlinks.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/scrub/nlinks.h b/fs/xfs/scrub/nlinks.h index a950f3daf204..b820712bfd87 100644 --- a/fs/xfs/scrub/nlinks.h +++ b/fs/xfs/scrub/nlinks.h @@ -28,6 +28,13 @@ struct xchk_nlink_ctrs { * from other writer threads. */ struct xfs_dir_hook dhook; + + /* Orphanage reparenting request. */ + struct xrep_adoption adoption; + + /* Directory entry name, plus the trailing null. */ + struct xfs_name xname; + char namebuf[MAXNAMELEN]; }; /* |