From owner-freebsd-hackers Mon Apr 24 2: 9:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 3D89837B900 for ; Mon, 24 Apr 2000 02:09:14 -0700 (PDT) (envelope-from bp@butya.kz) Received: from bp (helo=localhost) by relay.butya.kz with local-esmtp (Exim 3.13 #1) id 12jerU-0000xt-00; Mon, 24 Apr 2000 16:09:00 +0700 Date: Mon, 24 Apr 2000 16:09:00 +0700 (ALMST) From: Boris Popov To: Julian Elischer Cc: freebsd-hackers@freebsd.org Subject: Re: Request for the major device number In-Reply-To: <390402D3.41C67EA6@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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