When booting diskless initdiskless creates memory disks with soft-updates enabeld. The delayed freeing of blocks occupied by removed files causes suprious 'file system full' messages in our diskless environment while initdiskless is running and building the final /etc directory. These messages occured more often with a SMP kernel (9 times out of 10) than with a non SMP kernel (5 times out of 10). The resulting memory disk containing /etc is 84% used. This behaviour was never seen as long as we used 5.3. It was discovered almost immediately after upgrading to STABLE. I think it shows up because of the finer locking in STABLE. Fix: Add the -S switch to the mdmfs call in mount_md() in initdiskless to disable the use of soft-updates in memory disks. How-To-Repeat: Use a diskless environment and a not too big memory disk. Replace varoius files in it with the different templates initdiskless uses.
Responsible Changed From-To: freebsd-bugs->brooks Assign this PR to brooks@ since he seems to be the active committer in this field. BTW, to me, the patch looks correct
State Changed From-To: open->patched Fixed in HEAD.
State Changed From-To: patched->closed MFCd to RELENG_6 and RELENG_5. Thanks for your submission!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bb4116576f2edf466ada3885cf851599ce7a4792 commit bb4116576f2edf466ada3885cf851599ce7a4792 Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2024-03-20 04:54:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-03-20 04:54:18 +0000 rc.initdiskless: Disable soft-updates in mdmfs (again) Re-apply the -S switch to disable soft-updates in memory disks (commit 8b1292ac5219). This might be beneficial when tmpfs(5) is not present in the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to using md(4). PR: 85558 MFC after: 1 week Reviewed by: imp, emaste, brooks Differential Revision: https://reviews.freebsd.org/D43242 libexec/rc/rc.initdiskless | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=df4a9902eac75c31dd8857e94b9aadd8c88cae03 commit df4a9902eac75c31dd8857e94b9aadd8c88cae03 Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2024-03-20 04:54:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-03-29 13:53:54 +0000 rc.initdiskless: Disable soft-updates in mdmfs (again) Re-apply the -S switch to disable soft-updates in memory disks (commit 8b1292ac5219). This might be beneficial when tmpfs(5) is not present in the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to using md(4). PR: 85558 MFC after: 1 week Reviewed by: imp, emaste, brooks Differential Revision: https://reviews.freebsd.org/D43242 (cherry picked from commit bb4116576f2edf466ada3885cf851599ce7a4792) libexec/rc/rc.initdiskless | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)