Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Split the ufs code out of the ffs module and into its ow...
details: https://anonhg.NetBSD.org/src/rev/b08c2fe2a99a
branches: trunk
changeset: 457332:b08c2fe2a99a
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Jun 20 03:31:29 2019 +0000
description:
Split the ufs code out of the ffs module and into its own module.
Adapt chfs and ext2fs modules accordingly.
diffstat:
sys/modules/Makefile | 3 ++-
sys/modules/ffs/Makefile | 8 +-------
sys/modules/ufs/Makefile | 18 ++++++++++++++++++
sys/ufs/chfs/chfs_vfsops.c | 7 ++++---
sys/ufs/ext2fs/ext2fs_vfsops.c | 6 +++---
sys/ufs/ffs/ffs_vfsops.c | 8 ++++----
sys/ufs/ufs/ufs_vfsops.c | 38 ++++++++++++++++++++++++++++++++++++--
7 files changed, 68 insertions(+), 20 deletions(-)
diffs (212 lines):
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/modules/Makefile
--- a/sys/modules/Makefile Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/modules/Makefile Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.221 2019/03/26 00:36:14 pgoyette Exp $
+# $NetBSD: Makefile,v 1.222 2019/06/20 03:31:29 pgoyette Exp $
.include <bsd.own.mk>
@@ -160,6 +160,7 @@
SUBDIR+= ualea
SUBDIR+= uatp
SUBDIR+= udf
+SUBDIR+= ufs
SUBDIR+= umap
SUBDIR+= union
SUBDIR+= usbverbose
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/modules/ffs/Makefile
--- a/sys/modules/ffs/Makefile Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/modules/ffs/Makefile Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2019/06/17 03:32:14 christos Exp $
+# $NetBSD: Makefile,v 1.12 2019/06/20 03:31:29 pgoyette Exp $
.include "../Makefile.inc"
@@ -9,12 +9,6 @@
CWARNFLAGS.clang= -Wno-conversion
-.PATH: ${S}/ufs/ufs
-SRCS= ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_inode.c \
- ufs_lookup.c ufs_quota.c ufs_quota1.c ufs_quota2.c ufs_rename.c \
- ufs_vfsops.c ufs_vnops.c ufs_wapbl.c quota1_subr.c quota2_subr.c
-
-.PATH: ${S}/ufs/ffs
SRCS+= ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c \
ffs_vfsops.c ffs_vnops.c ffs_snapshot.c \
ffs_bswap.c ffs_wapbl.c ffs_appleufs.c ffs_quota2.c
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/modules/ufs/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/ufs/Makefile Thu Jun 20 03:31:29 2019 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2019/06/20 03:31:30 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+KMOD= ufs
+
+CPPFLAGS+= -DUFS_DIRHASH -DFFS_EI -DWAPBL -DAPPLE_UFS -DQUOTA -DQUOTA2
+
+CWARNFLAGS.clang= -Wno-conversion
+
+.PATH: ${S}/ufs/ufs
+SRCS= ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_inode.c \
+ ufs_lookup.c ufs_quota.c ufs_quota1.c ufs_quota2.c ufs_rename.c \
+ ufs_vfsops.c ufs_vnops.c ufs_wapbl.c quota1_subr.c quota2_subr.c
+
+WARNS= 3
+
+.include <bsd.kmodule.mk>
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/ufs/chfs/chfs_vfsops.c
--- a/sys/ufs/chfs/chfs_vfsops.c Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/ufs/chfs/chfs_vfsops.c Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_vfsops.c,v 1.18 2018/05/28 21:04:38 chs Exp $ */
+/* $NetBSD: chfs_vfsops.c,v 1.19 2019/06/20 03:31:30 pgoyette Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -62,8 +62,6 @@
#include "chfs.h"
#include "chfs_args.h"
-MODULE(MODULE_CLASS_VFS, chfs, "flash");
-
/* --------------------------------------------------------------------- */
/* functions */
@@ -827,6 +825,9 @@
};
/* For using CHFS as a module. */
+
+MODULE(MODULE_CLASS_VFS, chfs, "ufs,flash");
+
static int
chfs_modcmd(modcmd_t cmd, void *arg)
{
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.214 2019/06/20 03:31:30 pgoyette Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.214 2019/06/20 03:31:30 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -100,7 +100,7 @@
#include <ufs/ext2fs/ext2fs_dir.h>
#include <ufs/ext2fs/ext2fs_extern.h>
-MODULE(MODULE_CLASS_VFS, ext2fs, "ffs");
+MODULE(MODULE_CLASS_VFS, ext2fs, "ufs");
int ext2fs_sbupdate(struct ufsmount *, int);
static int ext2fs_sbfill(struct m_ext2fs *, int);
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.362 2019/06/20 03:31:30 pgoyette Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.362 2019/06/20 03:31:30 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -108,9 +108,9 @@
#include <ufs/ffs/ffs_extern.h>
#ifdef WAPBL
-MODULE(MODULE_CLASS_VFS, ffs, "wapbl");
+MODULE(MODULE_CLASS_VFS, ffs, "ufs,wapbl");
#else
-MODULE(MODULE_CLASS_VFS, ffs, NULL);
+MODULE(MODULE_CLASS_VFS, ffs, "ufs");
#endif
static int ffs_vfs_fsync(vnode_t *, int);
diff -r fc5fb8359d0e -r b08c2fe2a99a sys/ufs/ufs/ufs_vfsops.c
--- a/sys/ufs/ufs/ufs_vfsops.c Thu Jun 20 00:52:05 2019 +0000
+++ b/sys/ufs/ufs/ufs_vfsops.c Thu Jun 20 03:31:29 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vfsops.c,v 1.56 2018/12/10 14:46:25 maxv Exp $ */
+/* $NetBSD: ufs_vfsops.c,v 1.57 2019/06/20 03:31:30 pgoyette Exp $ */
/*
* Copyright (c) 1991, 1993, 1994
@@ -37,17 +37,19 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.56 2018/12/10 14:46:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.57 2019/06/20 03:31:30 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
#include "opt_quota.h"
+#include "opt_wapbl.h"
#endif
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/proc.h>
#include <sys/buf.h>
+#include <sys/module.h>
#include <sys/vnode.h>
#include <sys/kmem.h>
#include <sys/kauth.h>
@@ -305,3 +307,35 @@
ufs_extattr_done();
#endif
}
+
+/*
+ * module interface
+ */
+
+#ifdef WAPBL
+MODULE(MODULE_CLASS_MISC, ufs, "wapbl");
+#else
+MODULE(MODULE_CLASS_MISC, ufs, NULL);
+#endif
+
+static int
+ufs_modcmd(modcmd_t cmd, void *arg)
+{
+ int error;
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ ufs_init();
+ error = 0;
+ break;
+ case MODULE_CMD_FINI:
+ ufs_done();
+ error = 0;
+ break;
+ default:
+ error = ENOTTY;
+ break;
+ }
+
+ return error;
+}
Home |
Main Index |
Thread Index |
Old Index