Re: Deprecating smbfs(5) and removing it before FreeBSD 14

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Mon, 01 Nov 2021 15:55:52 UTC
Miroslav Lachman wrote:
[good stuff snipped]
> Apple sources can be found there
> https://opensource.apple.com/source/smb/ with all the history from SMBv1
> to SMBv3. The files have original copyright header from 2001 Boris Popov
> (same as FreeBSD) but otherwise it is very different code due to
> different kernel interfaces and so on.
> With Apple and Illumos sources it is possible to have smbfs in FreeBSD
> upgraded to v2 or v3 but very skilled programmer is needed for this
> work. And for the past years there is none interested in this work.

Although I agree that it would be a non-trivial exercise, a lot of the Apple
differences are in the "smoke and mirrors" category.
Around OSX 10.4, they changed their VFS/VOP to typedefs and accessor
functions. For example:
       "struct vnode *vp" became "vnode_t vp"
and "vp->v_type" became "vnode_type(vp)"

Ten years ago, the actual semantics were very close to what FreeBSD used.
If you look at sys/fs/nfs/nfskpiport.h in older sources (around FreeBSD 10),
you'll see a bunch of macros I used to allow the Apple port to also build/run
on FreeBSD (a couple, such as vnode_t are still left because I've never gotten
around to doing the edit to replace them).

The hard part will be dealing with the actual VFS/VOP semantics changes that
have occurred in the last 10 years.

Did they stick APSLs on the files? (If so, I think it could still be ok, since the APSL
is a lot like the CDDL. However, I'm not sure if the APSL has ever been blessed
by FreeBSD as of yet?)

Don't assume anything will happen, but I *might* take a look in the winter,
since outstanding NFS changes should be done by the end of 2021.

It does sound like there is some interest in this and that fuse doesn't solve
the problem (at least for everyone).

rick

Miroslav Lachman