mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
d3a36e4b74
When fsck_ffs(8) runs in background, it creates a snapshot named fsck_snapshot in the filesystem's .snap directory. The fsck_snapshot file was removed when the background fsck finished. If the system crashed or the fsck exited unexpectedly, the fsck_snapshot file would remain. The snapshot would consume ever more space as the filesystem changed over time until it was removed by a system administrator or a future run of background fsck removed it to create a new snapshot file. This commit unlinks the .snap/fsck_snapshot file immediately after opening it so that it will be reclaimed when fsck closes it at the conclusion of its run. After a system crash, it will be removed as part of the filesystem cleanup because of its zero reference count. As only a few milliseconds pass between its creation and unlinking, there is far less opportunity for it to be accidentally left behind. PR: 106107 MFC-after: 1 week |
||
---|---|---|
.. | ||
dir.c | ||
ea.c | ||
fsck.h | ||
fsck_ffs.8 | ||
fsutil.c | ||
gjournal.c | ||
globs.c | ||
inode.c | ||
main.c | ||
Makefile | ||
Makefile.depend | ||
pass1.c | ||
pass1b.c | ||
pass2.c | ||
pass3.c | ||
pass4.c | ||
pass5.c | ||
setup.c | ||
suj.c | ||
utilities.c |