Date: Thu, 20 Jan 2022 00:01:36 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Yuri <yuri@aetern.org>, Miroslav Lachman <000.fbsd@quip.cz>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: Deprecating smbfs(5) and removing it before FreeBSD 14 Message-ID: <YQXPR0101MB0968BAB76CAEEB3A945512DCDD599@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <bf549f03-1947-fafb-c872-e78ea28ce32a@aetern.org> References: <CAPyFy2CJKxMQQKwD3N=MTe-P4KodN77e3YCEh4z0Ssf9sXWEcQ@mail.gmail.com> <6f99f9bc-8831-aefe-4f73-72f50f8f347b@aetern.org> <79402464-f9e6-5f56-645e-cfd49640032e@quip.cz> <YQXPR0101MB0968A28AAE84DF855AF5125CDD8A9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <7db04ed9-39eb-7163-ce92-9a52c5f7d302@quip.cz> <YQXPR0101MB096856C46CC68E39E1F8EFFCDD4F9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <54704b99-7b89-76a4-0368-79bee391926d@quip.cz> <YQXPR0101MB09681E68BAF66F8D8160D6C2DD599@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <bf549f03-1947-fafb-c872-e78ea28ce32a@aetern.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Yuri <yuri@aetern.org> wrote:=0A= > Rick Macklem wrote:=0A= > > I have downloaded the final version of the opensolaris=0A= > > smbfs and it looks much more reasonable to port to=0A= > > FreeBSD.=0A= >=0A= > What do you mean by "final version of the opensolaris smbfs", the one=0A= > from 2010? Please note that illumos (actively maintained fork of=0A= > opensolaris) has a much more up to date one.=0A= I'm not surprised that illumos will have updates.=0A= I don't think it will affect the exercise at this time, since the current w= ork=0A= is to figure out what pieces of the opensolaris code needs to be pulled=0A= into the current smbfs to make the newer version work.=0A= Solaris uses a very different VFS/VOP locking model, so a direct port=0A= of the opensolaris code would be more work than I will be attempting.=0A= =0A= rick=0A= =0A= > I will be starting to work on this (and maybe Mark Saad will be=0A= > able to help).=0A= >=0A= > I have no idea when I'll have code that can be tested by others.=0A= >=0A= > rick=0A= >=0A= > ________________________________________=0A= > From: Miroslav Lachman <000.fbsd@quip.cz>=0A= > Sent: Monday, January 10, 2022 10:27 AM=0A= > To: Rick Macklem; freebsd-current@freebsd.org; freebsd-stable=0A= > Cc: Yuri=0A= > Subject: Re: Deprecating smbfs(5) and removing it before FreeBSD 14=0A= >=0A= > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca=0A= >=0A= >=0A= > Hello Rick,=0A= > thank you for the update and your time on smbfs. I hope OpenSolaris=0A= > version will be portable. (or mayby some older version from Apple?)=0A= > FreeBSD without possibility to mount smbfs is not an option for some=0A= > projects.=0A= >=0A= > Kind regards=0A= > Miroslav Lachman=0A= >=0A= >=0A= > On 09/01/2022 15:46, Rick Macklem wrote:=0A= >> Well, I took a look at the Apple code and I'm afraid I=0A= >> think porting it into FreeBSD is too big a job for me.=0A= >>=0A= >> I was hoping the code would have a layer that could=0A= >> be used as a "block box" for the VOP calls, but that=0A= >> does not seem to be the case.=0A= >> There is also a *lot* of code in it.=0A= >>=0A= >> I am going to look at the OpenSolaris code, to see if=0A= >> I think it will be an easier port.=0A= >>=0A= >> rick=0A= >>=0A= >> ________________________________________=0A= >> From: Miroslav Lachman <000.fbsd@quip.cz>=0A= >> Sent: Monday, November 1, 2021 5:47 PM=0A= >> To: Rick Macklem; freebsd-current@freebsd.org; freebsd-stable=0A= >> Cc: Yuri=0A= >> Subject: Re: Deprecating smbfs(5) and removing it before FreeBSD 14=0A= >>=0A= >> CAUTION: This email originated from outside of the University of Guelph.= Do not click links or open attachments unless you recognize the sender and= know the content is safe. If in doubt, forward suspicious emails to IThelp= @uoguelph.ca=0A= >>=0A= >>=0A= >> On 01/11/2021 16:55, Rick Macklem wrote:=0A= >>> Miroslav Lachman wrote:=0A= >>> [good stuff snipped]=0A= >>>> Apple sources can be found there=0A= >>>> https://opensource.apple.com/source/smb/ with all the history from SMB= v1=0A= >>>> to SMBv3. The files have original copyright header from 2001 Boris Pop= ov=0A= >>>> (same as FreeBSD) but otherwise it is very different code due to=0A= >>>> different kernel interfaces and so on.=0A= >>>> With Apple and Illumos sources it is possible to have smbfs in FreeBSD= =0A= >>>> upgraded to v2 or v3 but very skilled programmer is needed for this=0A= >>>> work. And for the past years there is none interested in this work.=0A= >>>=0A= >>> Although I agree that it would be a non-trivial exercise, a lot of the = Apple=0A= >>> differences are in the "smoke and mirrors" category.=0A= >>> Around OSX 10.4, they changed their VFS/VOP to typedefs and accessor=0A= >>> functions. For example:=0A= >>> "struct vnode *vp" became "vnode_t vp"=0A= >>> and "vp->v_type" became "vnode_type(vp)"=0A= >>>=0A= >>> Ten years ago, the actual semantics were very close to what FreeBSD use= d.=0A= >>> If you look at sys/fs/nfs/nfskpiport.h in older sources (around FreeBSD= 10),=0A= >>> you'll see a bunch of macros I used to allow the Apple port to also bui= ld/run=0A= >>> on FreeBSD (a couple, such as vnode_t are still left because I've never= gotten=0A= >>> around to doing the edit to replace them).=0A= >>=0A= >> If I see it right even the 10 years old Apple version of smbfs has=0A= >> support for SMBv2 so if this old version is closer to FreeBSD kernel /= =0A= >> smbfs it can be a good starting point to merge changes to our smbfs to= =0A= >> have SMBv2 support on FreeBSD.=0A= >>=0A= >>> The hard part will be dealing with the actual VFS/VOP semantics changes= that=0A= >>> have occurred in the last 10 years.=0A= >>>=0A= >>> Did they stick APSLs on the files? (If so, I think it could still be ok= , since the APSL=0A= >>> is a lot like the CDDL. However, I'm not sure if the APSL has ever been= blessed=0A= >>> by FreeBSD as of yet?)=0A= >>=0A= >> The old versions of smbfs has original copyright header and no other=0A= >> license. Newer version has some added files with different header with= =0A= >> APSL license. For example=0A= >> https://opensource.apple.com/source/smb/smb-759.40.1/kernel/smbfs/smbfs_= subr_2.h.auto.html=0A= >>=0A= >> If license is a problem then I think it can live with APSL in the ports= =0A= >> tree as a loadable kernel module. Maybe this will be the easier for=0A= >> development too?=0A= >>=0A= >>> Don't assume anything will happen, but I *might* take a look in the win= ter,=0A= >>> since outstanding NFS changes should be done by the end of 2021.=0A= >>=0A= >> I really appreciate your endless work on NFS on FreeBSD. Without your=0A= >> work the NFS will be lacking behind industry standards similar to what= =0A= >> we see with smbfs.=0A= >> And if you will have some spare time to take a look on smbfs and maybe= =0A= >> solve the SMBv2 / SMBv3 problem you will be my hero. I am waiting for it= =0A= >> for many years and I know I am not alone who needs working SMB / CIFS on= =0A= >> FreeBSD.=0A= >>=0A= >>> It does sound like there is some interest in this and that fuse doesn't= solve=0A= >>> the problem (at least for everyone).=0A= >>=0A= >> Yes, there is an interest. It was discussed few times in the past in the= =0A= >> mailing lists and web forums.freebsd.org but without anybody willing to= =0A= >> touch the code.=0A= >> FUSE alternatives have so many problems with performance, stability and= =0A= >> configuration.=0A= >> https://forums.freebsd.org/threads/getting-smbnetfs-to-work.78413/=0A= >>=0A= >> Kind regards=0A= >> Miroslav Lachman=0A= >>=0A= >=0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR0101MB0968BAB76CAEEB3A945512DCDD599>