Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 16:09:00 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Request for the major device number
Message-ID:  <Pine.BSF.4.10.10004241538440.3515-100000@lion.butya.kz>
In-Reply-To: <390402D3.41C67EA6@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Apr 2000, Julian Elischer wrote:

> >         in the near future I'm going to release beta 
> > version of native,
> > kernel side SMB/CIFS filesytem for FreeBSD. It uses 
> > device /dev/net/nsmbX
> > for the userland <-> kernel interaction. Currently it uses 
> > major number
> > assigned to the 'joystick' device which can make some 
> > peoples unhappy :).
> 
> 
>  Can you explain a little more, what interaction there is between
>  the userland and kernel that requires the device?
>  (I am truely curious, and not trying be difficult)

	Sure. smbfs actually consists of two major parts - SMB requester
and filesystem itself. SMB requester handles all protocol details and
gives clear interface like 'connect to server', 'connect to share', 'send
request' etc. An opened device used as a handle for above primitives and
this saves some code which should track these handles.

	For example: any new connection established by userland process
should be dropped when the process-owner is terminated. This can be done
via at_exit handler and set of syscalls, but why to reinvent the wheel ?
Kernel already does this job and does it well. (at_exit technique used in
the netncp code and I don't like it much :)

	Of course, said above doesn't mean that mount_smbfs will hang as a
daemon.

	The only disadvantage is the necessity to create N nsmb devices,
but this should gone when device clones will be available (in fact,
clones are implemented, but there is some unnegotiated conventions with
Poul-Henning and lack of spare time).

--
Boris Popov



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10004241538440.3515-100000>