From owner-freebsd-stable Sun Dec 23 12:21:10 2001 Delivered-To: freebsd-stable@freebsd.org Received: from tensor.xs4all.nl (tensor.xs4all.nl [213.84.53.200]) by hub.freebsd.org (Postfix) with ESMTP id 122DD37B405 for ; Sun, 23 Dec 2001 12:21:03 -0800 (PST) Received: from kilgore.xs4all.nl (kilgore.xs4all.nl [192.168.1.3]) by tensor.xs4all.nl (Postfix) with ESMTP id 8F3BE3E38 for ; Sun, 23 Dec 2001 21:21:01 +0100 (CET) Date: Sun, 23 Dec 2001 21:20:49 +0100 From: Dimitry Andric X-Mailer: The Bat! (v1.54 Beta/19) Business Reply-To: Dimitry Andric X-Priority: 3 (Normal) Message-ID: <136964834.20011223212049@xs4all.nl> To: freebsd-stable@freebsd.org Subject: Can't link smbfs statically into kernel MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 After seeing that smbfs and its corresponding tools have (finally!) made it into 4.5-PRERELEASE, I wanted to try getting rid of the smbfs module again, by statically linking it into the kernel. I updated kernel + world to -PRERELEASE, and added the following lines to my kernel config: options NETSMB #SMB/CIFS requester options NETSMBCRYPTO #encrypted password support for SMB options LIBMCHAIN #mbuf management library options LIBICONV #Kernel side iconv library However, this causes mount_smbfs to fail: % sudo mount_smbfs //luser@winbox/share /mnt module_register: module dev_netsmb already exists! linker_file_sysinit "smbfs.ko" failed to register! 17 mount_smbfs: vfsload(smbfs): File exists It is caused by mount_smbfs not being able to find smbfs as a configured filesystem, via getvfsbyname(3). (This seems like a bug to me.) Then it of course tries to load smbfs, via vfsload(3), which fails too, because it is already present. Even though mount_smbfs gives this error, there still seems to be a smbfs LKM loaded anyway, which can't be unloaded anymore: % kldstat Id Refs Address Size Name 1 3 0xc0100000 1fb1bc kernel 2 1 0xc0984000 14000 linux.ko 3 1 0xc0a14000 1a000 smbfs.ko % sudo kldunload smbfs linkerunload: attempt to unload file that was loaded by the kernel kldunload: can't unload file: Device busy But smbfs isn't part of the list of vfs's: % vfslist index 1: msdos (refcount 0, flags 0x0) index 2: nfs (refcount 0, flags 0x20000) index 3: procfs (refcount 1, flags 0x80000) index 4: mfs (refcount 0, flags 0x0) index 5: ufs (refcount 5, flags 0x0) index 6: cd9660 (refcount 0, flags 0x40000) Is there any way to statically link smbfs into the kernel, or is it "module-only"? If that is the case, please remove the NETSMB option from LINT, which could perhaps minimize confusions about it. Cheers, - -- Dimitry Andric PGP Key: http://www.xs4all.nl/~dim/dim.asc Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3 Lbh ner abj va ivbyngvba bs gur QZPN -----BEGIN PGP SIGNATURE----- Version: PGP 6.5i Comment: http://www.gn.apc.org/duncan/stoa_cover.htm iQA/AwUBPCYumrBeowouIJajEQKdHgCg8rR08EDaq+waaLmmvzViQzTM05sAn2Jb xU8Tjn9lR+vFes2HLY2yf51d =4DD3 -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message