NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/58902: ffs ignores fs_id
>Number: 58902
>Category: kern
>Synopsis: ffs ignores fs_id
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 13 22:45:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSD Ffsidentification
>Environment:
>Description:
Both FreeBSD and OpenBSD use the `fs_id' field of the ffs superblock to initialize the fsid which figures into NFS exports so that they aren't affected by the order of device enumeration or anything like that (PR kern/58901: nfs server should allow specifying fsid in exports(5), https://gnats.netbsd.org/58901). They adopted this in 1997 around the same time as fsirand(8) and inode randomization, but for some reason although we adopted fsirand(8) and eventually taught newfs(8) to initialize fs_id, we missed the part where the kernel uses it as the fsid for fhandles.
As a result, even though the ffs on-disk format natively supports persistent stable fsid values, our nfs server fails to use them and instead depends on device enumeration order so it's unstable under dkN renumbering.
>How-To-Repeat:
export ffs on dkN through nfs, reboot with different dkN numbering
>Fix:
Yes, please!
1. Teach ffs_vfsops.c to use struct fs::fs_id.
2. Put a prominent notice in release notes about nfs clients and stale file handles.
Home |
Main Index |
Thread Index |
Old Index