Product SiteDocumentation Site

4.2. Unlinked Pointer

The di_next_unlinked value in the inode is used to track inodes that have been unlinked (deleted) but which are still referenced. When an inode is unlinked and there is still an outstanding reference, the inode is added to one of the AGI's (Section 3.3, “AG Inode Management”) agi_unlinked hash buckets. The AGI unlinked bucket points to an inode and the di_next_unlinked value points to the next inode in the chain. The last inode in the chain has di_next_unlinked set to NULL (-1).
Once the last reference is released, the inode is removed from the unlinked hash chain, and di_next_unlinked is set to NULL. In the case of a system crash, XFS recovery will complete the unlink process for any inodes found in these lists.
The only time the unlinked fields can be seen to be used on disk is either on an active filesystem or a crashed system. A cleanly unmounted or recovered filesystem will not have any inodes in these unlink hash chains.