HomeFreeBSD

Add kf_file_nlink field to kf_file and populate it

Description

Add kf_file_nlink field to kf_file and populate it

This will allow user-space programs (e.g. lsof) to locate deleted files
whose nlink equals zero. Prior to this commit, programs has to use
stat(kf_path) to get nlink, but that will fail if the file is deleted.

[mjg: s/fail/file in the commit message]

Reviewed by: mjg
Differential Revision: https://reviews.freebsd.org/D38169

Details

Provenance
c_jia.jeAuthored on Jan 23 2023, 4:36 PM
mjgCommitted on Jan 23 2023, 5:09 PM
Reviewer
mjg
Differential Revision
D38169: Add kf_file_nlink field to kf_file and populate it
Parents
rG8089749d3878: blacklistd: diff reduction against upstream
Branches
Unknown
Tags
Unknown