Bug 85558 - initdiskless should not generate memory disks with soft-updates enabled
Summary: initdiskless should not generate memory disks with soft-updates enabled
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 5.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-01 09:50 UTC by Ralf Wenk
Modified: 2024-03-29 18:12 UTC (History)
2 users (show)

See Also:


Attachments
initdiskless.udiff (336 bytes, text/plain)
2005-09-01 09:50 UTC, Ralf Wenk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Wenk 2005-09-01 09:50:13 UTC
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.
Comment 1 Matteo Riondato freebsd_committer freebsd_triage 2005-11-04 21:04:34 UTC
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
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2006-01-11 21:59:56 UTC
State Changed
From-To: open->patched

Fixed in HEAD.
Comment 3 Brooks Davis freebsd_committer freebsd_triage 2006-01-24 05:55:25 UTC
State Changed
From-To: patched->closed

MFCd to RELENG_6 and RELENG_5.  Thanks for your submission!
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-03-20 04:59:12 UTC
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(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-03-29 18:12:41 UTC
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(-)