NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58901: nfs server should allow specifying fsid in exports(5)
The following reply was made to PR kern/58901; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc: yamt%NetBSD.org@localhost
Subject: Re: kern/58901: nfs server should allow specifying fsid in exports(5)
Date: Wed, 26 Aug 2026 03:51:26 +0000
The attached patch aims to implement a new exports(5) option
-fsid=0x12345678.0x0abcdef9
to set the exported fsid to {0x12345678,0x0abcdef9}, or
-fsid=0x01020304.0x05060708:0x12345678.0x0abcdef9
to verify that the local fsid is {0x01020304,0x05060708}, and if it
is, export it as {0x12345678,0x0abcdef9}. (If not, mountd(8) will
fail to export the mount point at all, so you can't accidentally
export a file system that has the wrong local fsid internally.)
I initially used `,' instead of `.' as the separator but that fell
afoul of the mountd(8) parser for exports(5) options somehow.
I have only verified that /usr/tests/fs/nfs and /usr/tests/fs/vfs
pass, and (by inserting panics into it) that it's using the new code
paths, and (by examining debug messages) that it parses the option
sensibly; I haven't verified that it actually exports the fsid as
requested. (Perhaps showmount(8) should sprout an option to dump the
raw fhandles of the mount points to make this easier.)
This should relieve some of the pressure we have to keep fsids
consistent, so we can perhaps, e.g., start using the struct fs::fs_id
member of the ffs superblock we've been initializing but not using for
decades (PR kern/58902: ffs ignores fs_id), and/or get rid of that
awful hash function in makefstype, and/or enforce fsid uniqueness
locally (PR kern/60135: fsid may not be unique).
Home |
Main Index |
Thread Index |
Old Index