aboutsummaryrefslogtreecommitdiff
path: root/source/Symbol/LineEntry.cpp
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2026-09-03 07:33:31 +0000
committerXin LI <delphij@FreeBSD.org>2026-09-03 07:56:24 +0000
commit37aec55d0a7165960f686e5277f030ab3d44cf45 (patch)
tree64213e1983ed586fdda0044573f74a31b5e1df77 /source/Symbol/LineEntry.cpp
parentd3c5464fee7b178a39c189363e48806a11fd3da4 (diff)
fsck_msdosfs: add a test for reconnecting on volumes larger than 4 GiBHEADmain
Build a 4.5 GiB FAT32 image whose LOST.DIR cluster sits exactly 4 GiB above the single cluster of a PAYLOAD.BIN, so that truncating the offset of the former to 32 bits yields the offset of the latter, then inject a lost cluster chain and let fsck_msdosfs(8) reconnect it. The test asserts both halves of the bug fixed in the previous commit: that PAYLOAD.BIN's cluster is unchanged, and that a second pass no longer reports the chain as lost, which it only stops doing once the directory entry reaches the real LOST.DIR. newfs_msdos(8) -C only calls ftruncate(2) and nothing outside the reserved area, the FATs and a handful of clusters is ever written, so the image stays sparse and costs about 2 MiB on disk. The geometry is read back out of the BPB rather than assumed, so newfs_msdos(8) stays free to lay the file system out differently; the test fails with a clear message if the volume ever becomes too small to hold a cluster a full 4 GiB beyond the data area. MFC after: 1 week
Diffstat (limited to 'source/Symbol/LineEntry.cpp')
0 files changed, 0 insertions, 0 deletions