Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Get rid of the ulfs_ops table as we only have on...
details: https://anonhg.NetBSD.org/src/rev/82be3e8dc9bb
branches: trunk
changeset: 788894:82be3e8dc9bb
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jul 28 00:29:18 2013 +0000
description:
Get rid of the ulfs_ops table as we only have one fs in here now.
diffstat:
sys/ufs/lfs/lfs_vfsops.c | 15 ++-------------
sys/ufs/lfs/ulfs_inode.c | 6 ++++--
sys/ufs/lfs/ulfs_lookup.c | 6 ++++--
sys/ufs/lfs/ulfs_quota2.c | 6 ++++--
sys/ufs/lfs/ulfsmount.h | 34 ++++++++--------------------------
5 files changed, 22 insertions(+), 45 deletions(-)
diffs (186 lines):
diff -r a4f97a0b82cb -r 82be3e8dc9bb sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Sun Jul 28 00:28:33 2013 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Sun Jul 28 00:29:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.307 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.308 2013/07/28 00:29:18 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.307 2013/06/18 18:18:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.308 2013/07/28 00:29:18 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -177,16 +177,6 @@
.gop_markupdate = ulfs_gop_markupdate,
};
-static const struct ulfs_ops lfs_ulfsops = {
- .uo_itimes = NULL,
- .uo_update = lfs_update,
- .uo_truncate = lfs_truncate,
- .uo_valloc = lfs_valloc,
- .uo_vfree = lfs_vfree,
- .uo_balloc = lfs_balloc,
- .uo_unmark_vnode = lfs_unmark_vnode,
-};
-
struct shortlong {
const char *sname;
const char *lname;
@@ -965,7 +955,6 @@
ump = kmem_zalloc(sizeof(*ump), KM_SLEEP);
ump->um_lfs = fs;
- ump->um_ops = &lfs_ulfsops;
ump->um_fstype = ULFS1;
if (sizeof(struct lfs) < LFS_SBPAD) { /* XXX why? */
brelse(bp, BC_INVAL);
diff -r a4f97a0b82cb -r 82be3e8dc9bb sys/ufs/lfs/ulfs_inode.c
--- a/sys/ufs/lfs/ulfs_inode.c Sun Jul 28 00:28:33 2013 +0000
+++ b/sys/ufs/lfs/ulfs_inode.c Sun Jul 28 00:29:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_inode.c,v 1.7 2013/06/08 22:05:15 dholland Exp $ */
+/* $NetBSD: ulfs_inode.c,v 1.8 2013/07/28 00:29:18 dholland Exp $ */
/* from NetBSD: ufs_inode.c,v 1.89 2013/01/22 09:39:18 dholland Exp */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.7 2013/06/08 22:05:15 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.8 2013/07/28 00:29:18 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -58,6 +58,8 @@
#include <sys/fstrans.h>
#include <sys/kmem.h>
+#include <ufs/lfs/lfs_extern.h>
+
#include <ufs/lfs/ulfs_inode.h>
#include <ufs/lfs/ulfsmount.h>
#include <ufs/lfs/ulfs_extern.h>
diff -r a4f97a0b82cb -r 82be3e8dc9bb sys/ufs/lfs/ulfs_lookup.c
--- a/sys/ufs/lfs/ulfs_lookup.c Sun Jul 28 00:28:33 2013 +0000
+++ b/sys/ufs/lfs/ulfs_lookup.c Sun Jul 28 00:29:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_lookup.c,v 1.12 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: ulfs_lookup.c,v 1.13 2013/07/28 00:29:18 dholland Exp $ */
/* from NetBSD: ufs_lookup.c,v 1.122 2013/01/22 09:39:18 dholland Exp */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.12 2013/06/18 18:18:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.13 2013/07/28 00:29:18 dholland Exp $");
#ifdef _KERNEL_OPT
#include "opt_lfs.h"
@@ -59,6 +59,8 @@
#include <sys/proc.h>
#include <sys/kmem.h>
+#include <ufs/lfs/lfs_extern.h>
+
#include <ufs/lfs/ulfs_inode.h>
#ifdef LFS_DIRHASH
#include <ufs/lfs/ulfs_dirhash.h>
diff -r a4f97a0b82cb -r 82be3e8dc9bb sys/ufs/lfs/ulfs_quota2.c
--- a/sys/ufs/lfs/ulfs_quota2.c Sun Jul 28 00:28:33 2013 +0000
+++ b/sys/ufs/lfs/ulfs_quota2.c Sun Jul 28 00:29:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_quota2.c,v 1.6 2013/06/08 22:05:15 dholland Exp $ */
+/* $NetBSD: ulfs_quota2.c,v 1.7 2013/07/28 00:29:18 dholland Exp $ */
/* from NetBSD: ufs_quota2.c,v 1.35 2012/09/27 07:47:56 bouyer Exp */
/*-
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.6 2013/06/08 22:05:15 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.7 2013/07/28 00:29:18 dholland Exp $");
#include <sys/buf.h>
#include <sys/param.h>
@@ -45,6 +45,8 @@
#include <sys/quota.h>
#include <sys/quotactl.h>
+#include <ufs/lfs/lfs_extern.h>
+
#include <ufs/lfs/ulfs_quota2.h>
#include <ufs/lfs/ulfs_inode.h>
#include <ufs/lfs/ulfsmount.h>
diff -r a4f97a0b82cb -r 82be3e8dc9bb sys/ufs/lfs/ulfsmount.h
--- a/sys/ufs/lfs/ulfsmount.h Sun Jul 28 00:28:33 2013 +0000
+++ b/sys/ufs/lfs/ulfsmount.h Sun Jul 28 00:29:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfsmount.h,v 1.9 2013/07/28 00:28:33 dholland Exp $ */
+/* $NetBSD: ulfsmount.h,v 1.10 2013/07/28 00:29:18 dholland Exp $ */
/* from NetBSD: ufsmount.h,v 1.39 2012/10/19 17:09:08 drochner Exp */
/*
@@ -70,9 +70,6 @@
/* pointer to the filesystem-specific filesystem structure */
struct lfs *um_lfs;
- /* ops table for per-filesystem dispatch */
- const struct ulfs_ops *um_ops;
-
/* ULFS-level information */
u_int32_t um_flags; /* ULFS flags (below) */
u_long um_nindir; /* indirect ptrs per block */
@@ -107,35 +104,20 @@
#define umq2_bmask um_q.um_q2.q2_bmask
};
-struct ulfs_ops {
- void (*uo_itimes)(struct inode *ip, const struct timespec *,
- const struct timespec *, const struct timespec *);
- int (*uo_update)(struct vnode *, const struct timespec *,
- const struct timespec *, int);
- int (*uo_truncate)(struct vnode *, off_t, int, kauth_cred_t);
- int (*uo_valloc)(struct vnode *, int, kauth_cred_t, struct vnode **);
- int (*uo_vfree)(struct vnode *, ino_t, int);
- int (*uo_balloc)(struct vnode *, off_t, int, kauth_cred_t, int,
- struct buf **);
- void (*uo_unmark_vnode)(struct vnode *);
-};
-
-#define ULFS_OPS(vp) (VFSTOULFS((vp)->v_mount)->um_ops)
-
#define ULFS_ITIMES(vp, acc, mod, cre) \
- (*ULFS_OPS(vp)->uo_itimes)(VTOI(vp), (acc), (mod), (cre))
+ ((void)0)
#define ULFS_UPDATE(vp, acc, mod, flags) \
- (*ULFS_OPS(vp)->uo_update)((vp), (acc), (mod), (flags))
+ lfs_update((vp), (acc), (mod), (flags))
#define ULFS_TRUNCATE(vp, off, flags, cr) \
- (*ULFS_OPS(vp)->uo_truncate)((vp), (off), (flags), (cr))
+ lfs_truncate((vp), (off), (flags), (cr))
#define ULFS_VALLOC(vp, mode, cr, vpp) \
- (*ULFS_OPS(vp)->uo_valloc)((vp), (mode), (cr), (vpp))
+ lfs_valloc((vp), (mode), (cr), (vpp))
#define ULFS_VFREE(vp, ino, mode) \
- (*ULFS_OPS(vp)->uo_vfree)((vp), (ino), (mode))
+ lfs_vfree((vp), (ino), (mode))
#define ULFS_BALLOC(vp, off, size, cr, flags, bpp) \
- (*ULFS_OPS(vp)->uo_balloc)((vp), (off), (size), (cr), (flags), (bpp))
+ lfs_balloc((vp), (off), (size), (cr), (flags), (bpp))
#define ULFS_UNMARK_VNODE(vp) \
- (*ULFS_OPS(vp)->uo_unmark_vnode)((vp))
+ lfs_unmark_vnode((vp))
/* ULFS-specific flags for um_flags */
#define ULFS_NEEDSWAP 0x01 /* filesystem metadata need byte-swapping */
Home |
Main Index |
Thread Index |
Old Index