Bug 19803

Summary: Ext2fs kld module submission
Product: Base System Reporter: Gaspar Chilingarov <nm>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Gaspar Chilingarov 2000-07-09 16:40:03 UTC
Just loadable version of ext2fs driver to get rid of EXT2FS from kernel :)

sorry for inconvient form of supplying patch, but all my mails got rejected because of absent reverse DNS record.

Fix: Apply this patch in /usr/src/sys/gnu/ext2fs

--cut--


and put this Makefile into /sys/modules/ext2fs
--cut--
.PATH:  ${.CURDIR}/../../gnu/ext2fs
KMOD=   ext2fs
SRCS=   vnode_if.h \
    opt_quota.h \
    opt_ddb.h \
    opt_suiddir.h \
    ext2_inode.c \
    ext2_alloc.c \
    ext2_balloc.c \
    ext2_extern.h \
    ext2_fs.h \
    ext2_fs_sb.h \
    ext2_inode_cnv.c \
    ext2_linux_balloc.c \
    ext2_linux_ialloc.c \
    ext2_lookup.c \
    ext2_readwrite.c \
    ext2_subr.c \
    ext2_vfsops.c \
    ext2_vnops.c \
    fs.h \
    i386-bitops.h
NOMAN=
.include <bsd.kmod.mk>
--cut----ab1ZhMfYBR0HOkdcXUn97mvo1TgjbzNllxosPqZzeUBvDoj0
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- ext2_readwrite.c.orig       Sun Jul  9 20:39:57 2000
+++ ext2_readwrite.c    Sun Jul  9 19:52:50 2000
@@ -48,6 +48,36 @@
 #define        WRITE                   ext2_write
 #define        WRITE_S                 "ext2_write"
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/resourcevar.h>
+#include <sys/kernel.h>
+#include <sys/stat.h>
+#include <sys/bio.h>
+#include <sys/buf.h>
+#include <sys/proc.h>
+#include <sys/mount.h>
+#include <sys/time.h>
+#include <sys/vnode.h>
+#include <sys/namei.h>
+
+#include <vm/vm.h>
+#include <vm/vm_extern.h>
+#include <vm/vnode_pager.h>
+
+#include <sys/signalvar.h>
+#include <ufs/ufs/dir.h>
+#include <ufs/ufs/extattr.h>
+#include <ufs/ufs/quota.h>
+#include <ufs/ufs/inode.h>
+#include <ufs/ufs/ufsmount.h>
+#include <ufs/ufs/ufs_extern.h>
+
+#include <gnu/ext2fs/ext2_fs_sb.h>
+#include <gnu/ext2fs/fs.h>
+#include <gnu/ext2fs/ext2_extern.h>
+#include <gnu/ext2fs/ext2_fs.h>
+
 /*
  * Vnode op for reading.
  */
--cut--
Comment 1 Bruce Evans 2000-07-10 11:37:20 UTC
> >Description:
> Just loadable version of ext2fs driver to get rid of EXT2FS from kernel :)

There is already an open PR about this (PR 14217).  I think shipping
GPLed modules would result in the whole kernel being covered by the
GPL, so the ext2fs module would have to be built specially to keep it
out of distributions.

> --- ext2_readwrite.c.orig       Sun Jul  9 20:39:57 2000
> +++ ext2_readwrite.c    Sun Jul  9 19:52:50 2000
> @@ -48,6 +48,36 @@
>  #define        WRITE                   ext2_write
>  #define        WRITE_S                 "ext2_write"
> +#include <sys/param.h>
> +#include <sys/systm.h>
> ...

This is bogus.  ext2_readwrite.c is not a standalone file.  It is included
by ext2_vnops.c for historical reasons (the ufs version of it was once
shared by ffs and lfs).  The bogusness only wastes space, since
ext2fs_readwite.c only contains static functions, so the functions don't
conflict with the ones in ext2_vnops.c.

Bruce
Comment 2 Bruce Evans freebsd_committer freebsd_triage 2000-07-10 12:14:40 UTC
State Changed
From-To: open->closed

Essentially a duplicate of PR 14217. 
Closed at originator's request.