Bug 295096 - mount fail on remount with tmpfs with extra args
Summary: mount fail on remount with tmpfs with extra args
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-08 06:11 UTC by Ivan Rozhuk
Modified: 2026-05-27 23:23 UTC (History)
3 users (show)

See Also:
des: mfc-stable15+
des: mfc-stable14+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2026-05-08 06:11:41 UTC
Command sequence does not work:
mkdir -p /tmp/1234567
mount -o rw -o nomtime -o pgread -o size=10m -o mode=0777 -o noexec -o nosuid -o inodes=128k -t tmpfs tmpfs /tmp/1234567
mount -u -o ro /tmp/1234567
mount: tmpfs: mount option <pgread> is unknown: Operation not supported
...
mount: tmpfs: mount option <mode> is unknown: Operation not supported
...
mount: tmpfs: mount option <inodes> is unknown: Operation not supported
...

Only
mount -o rw -o nomtime -o size=10m -o noexec -o nosuid -t tmpfs tmpfs /tmp/1234567
wokrs.


Can it be fixed?
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2026-05-18 14:33:18 UTC
https://reviews.freebsd.org/D57044
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-05-19 06:55:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1cfc208a07b64a64377a4f8fe51c28f588a929cf

commit 1cfc208a07b64a64377a4f8fe51c28f588a929cf
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-05-19 06:54:28 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-05-19 06:54:28 +0000

    tmpfs: Overhaul option handling on remount

    On remount, we must accept all the same options as on initial mount.
    For parameters which we're unable to modify on the fly, fail only if
    the new value is different from the existing one.

    PR:             295096
    MFC after:      1 week
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D57044

 sys/fs/tmpfs/tmpfs_vfsops.c | 100 +++++++++++++++++++++++++++-----------------
 1 file changed, 62 insertions(+), 38 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-05-24 16:16:03 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=0f4fd69ee282b7ab5f23d0a4d3e57ab1ef6ec26c

commit 0f4fd69ee282b7ab5f23d0a4d3e57ab1ef6ec26c
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-05-19 06:54:28 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-05-24 16:14:39 +0000

    tmpfs: Overhaul option handling on remount

    On remount, we must accept all the same options as on initial mount.
    For parameters which we're unable to modify on the fly, fail only if
    the new value is different from the existing one.

    PR:             295096
    MFC after:      1 week
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D57044

    (cherry picked from commit 1cfc208a07b64a64377a4f8fe51c28f588a929cf)

 sys/fs/tmpfs/tmpfs_vfsops.c | 100 +++++++++++++++++++++++++++-----------------
 1 file changed, 62 insertions(+), 38 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-05-24 16:16:04 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=09935bf8af363af75fc94b65bb3c33e323e9893a

commit 09935bf8af363af75fc94b65bb3c33e323e9893a
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-05-19 06:54:28 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-05-24 16:14:50 +0000

    tmpfs: Overhaul option handling on remount

    On remount, we must accept all the same options as on initial mount.
    For parameters which we're unable to modify on the fly, fail only if
    the new value is different from the existing one.

    PR:             295096
    MFC after:      1 week
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D57044

    (cherry picked from commit 1cfc208a07b64a64377a4f8fe51c28f588a929cf)

 sys/fs/tmpfs/tmpfs_vfsops.c | 100 +++++++++++++++++++++++++++-----------------
 1 file changed, 62 insertions(+), 38 deletions(-)
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2026-05-27 22:21:19 UTC
^Triage: the mfc-stable* flags are set, so this is properly still In Progress.