Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a new lfs header file: lfs_accessors.h.
details: https://anonhg.NetBSD.org/src/rev/657b9f62d063
branches: trunk
changeset: 339544:657b9f62d063
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Jul 28 05:09:34 2015 +0000
description:
Add a new lfs header file: lfs_accessors.h.
This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
diffstat:
distrib/sets/lists/comp/mi | 3 +-
libexec/lfs_cleanerd/cleaner.h | 9 +
libexec/lfs_cleanerd/coalesce.c | 3 +-
sbin/dump/dump.h | 3 +-
sbin/fsck_lfs/dir.c | 3 +-
sbin/fsck_lfs/inode.c | 3 +-
sbin/fsck_lfs/lfs.c | 3 +-
sbin/fsck_lfs/main.c | 4 +-
sbin/fsck_lfs/pass0.c | 3 +-
sbin/fsck_lfs/pass1.c | 3 +-
sbin/fsck_lfs/pass4.c | 3 +-
sbin/fsck_lfs/pass5.c | 3 +-
sbin/fsck_lfs/pass6.c | 3 +-
sbin/fsck_lfs/segwrite.c | 3 +-
sbin/fsck_lfs/setup.c | 3 +-
sbin/fsck_lfs/utilities.c | 3 +-
sbin/newfs_lfs/make_lfs.c | 5 +-
sbin/resize_lfs/resize_lfs.c | 3 +-
sbin/scan_ffs/scan_ffs.c | 5 +-
sys/lib/libsa/ufs.c | 5 +-
sys/ufs/lfs/Makefile | 4 +-
sys/ufs/lfs/lfs.h | 450 +----------------------------
sys/ufs/lfs/lfs_accessors.h | 627 ++++++++++++++++++++++++++++++++++++++++
sys/ufs/lfs/lfs_alloc.c | 5 +-
sys/ufs/lfs/lfs_balloc.c | 5 +-
sys/ufs/lfs/lfs_bio.c | 5 +-
sys/ufs/lfs/lfs_debug.c | 5 +-
sys/ufs/lfs/lfs_inode.c | 5 +-
sys/ufs/lfs/lfs_itimes.c | 5 +-
sys/ufs/lfs/lfs_pages.c | 5 +-
sys/ufs/lfs/lfs_rfw.c | 5 +-
sys/ufs/lfs/lfs_segment.c | 5 +-
sys/ufs/lfs/lfs_subr.c | 5 +-
sys/ufs/lfs/lfs_syscalls.c | 5 +-
sys/ufs/lfs/lfs_vfsops.c | 5 +-
sys/ufs/lfs/lfs_vnops.c | 5 +-
sys/ufs/lfs/ulfs_quota2.c | 6 +-
usr.sbin/dumplfs/dumplfs.c | 5 +-
38 files changed, 727 insertions(+), 503 deletions(-)
diffs (truncated from 1927 to 300 lines):
diff -r 8f236da484aa -r 657b9f62d063 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Tue Jul 28 01:57:55 2015 +0000
+++ b/distrib/sets/lists/comp/mi Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1972 2015/07/26 02:20:30 kamil Exp $
+# $NetBSD: mi,v 1.1973 2015/07/28 05:09:34 dholland Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -3394,6 +3394,7 @@
./usr/include/ufs/ffs/ffs_extern.h comp-c-include
./usr/include/ufs/ffs/fs.h comp-c-include
./usr/include/ufs/lfs/lfs.h comp-c-include
+./usr/include/ufs/lfs/lfs_accessors.h comp-c-include
./usr/include/ufs/lfs/lfs_extern.h comp-c-include
./usr/include/ufs/lfs/lfs_inode.h comp-c-include
./usr/include/ufs/mfs/mfs_extern.h comp-c-include
diff -r 8f236da484aa -r 657b9f62d063 libexec/lfs_cleanerd/cleaner.h
--- a/libexec/lfs_cleanerd/cleaner.h Tue Jul 28 01:57:55 2015 +0000
+++ b/libexec/lfs_cleanerd/cleaner.h Tue Jul 28 05:09:34 2015 +0000
@@ -37,6 +37,9 @@
int clfs_onhold; /* If cleaning this fs is on hold */
};
+// XXX temporary
+#include <ufs/lfs/lfs_accessors.h>
+
/* ugh... */
#define CLFS_DEF_SB_ACCESSOR(type, field) \
static __unused inline type \
@@ -115,6 +118,12 @@
#define lfs_sb_getfsmnt(fs) clfs_sb_getfsmnt(fs)
/*
+ * This needs to come after the definition of struct clfs. (XXX blah)
+ */
+//#define STRUCT_LFS struct clfs
+//#include <ufs/lfs/lfs_accessors.h>
+
+/*
* Fraction of the could-be-clean segments required to be clean.
*/
#define BUSY_LIM 0.5
diff -r 8f236da484aa -r 657b9f62d063 libexec/lfs_cleanerd/coalesce.c
--- a/libexec/lfs_cleanerd/coalesce.c Tue Jul 28 01:57:55 2015 +0000
+++ b/libexec/lfs_cleanerd/coalesce.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coalesce.c,v 1.26 2015/07/24 06:59:31 dholland Exp $ */
+/* $NetBSD: coalesce.c,v 1.27 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
#include <sys/mman.h>
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <fcntl.h>
#include <signal.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/dump/dump.h
--- a/sbin/dump/dump.h Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/dump/dump.h Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dump.h,v 1.51 2013/06/15 01:27:19 christos Exp $ */
+/* $NetBSD: dump.h,v 1.52 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,6 +34,7 @@
#include <machine/bswap.h>
#ifdef DUMP_LFS
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#endif
#include <ufs/ufs/dinode.h>
#include <protocols/dumprestore.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/dir.c
--- a/sbin/fsck_lfs/dir.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/dir.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.34 2015/07/24 06:56:41 dholland Exp $ */
+/* $NetBSD: dir.c,v 1.35 2015/07/28 05:09:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -36,6 +36,7 @@
#include <sys/mount.h>
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#include <err.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/inode.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.56 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: inode.c,v 1.57 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -66,6 +66,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/lfs.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.47 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.48 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -72,6 +72,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/main.c
--- a/sbin/fsck_lfs/main.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/main.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.51 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: main.c,v 1.52 2015/07/28 05:09:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -32,7 +32,9 @@
#include <sys/param.h>
#include <sys/time.h>
#include <sys/mount.h>
+
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <fstab.h>
#include <stdbool.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/pass0.c
--- a/sbin/fsck_lfs/pass0.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/pass0.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass0.c,v 1.36 2015/07/24 06:56:41 dholland Exp $ */
+/* $NetBSD: pass0.c,v 1.37 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -65,6 +65,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/pass1.c
--- a/sbin/fsck_lfs/pass1.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/pass1.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.39 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: pass1.c,v 1.40 2015/07/28 05:09:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -36,6 +36,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/pass4.c
--- a/sbin/fsck_lfs/pass4.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/pass4.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass4.c,v 1.24 2015/07/24 06:56:41 dholland Exp $ */
+/* $NetBSD: pass4.c,v 1.25 2015/07/28 05:09:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -37,6 +37,7 @@
#define buf ubuf
#define panic call_panic
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#include <err.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/pass5.c
--- a/sbin/fsck_lfs/pass5.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/pass5.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass5.c,v 1.31 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: pass5.c,v 1.32 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/pass6.c
--- a/sbin/fsck_lfs/pass6.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/pass6.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass6.c,v 1.36 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: pass6.c,v 1.37 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
#define VU_DIROP 0x01000000 /* XXX XXX from sys/vnode.h */
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/segwrite.c
--- a/sbin/fsck_lfs/segwrite.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/segwrite.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: segwrite.c,v 1.33 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: segwrite.c,v 1.34 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -74,6 +74,7 @@
#define panic call_panic
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#include <assert.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/setup.c
--- a/sbin/fsck_lfs/setup.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/setup.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.48 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: setup.c,v 1.49 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -73,6 +73,7 @@
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <ufs/lfs/lfs_inode.h>
#undef vnode
diff -r 8f236da484aa -r 657b9f62d063 sbin/fsck_lfs/utilities.c
--- a/sbin/fsck_lfs/utilities.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/fsck_lfs/utilities.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utilities.c,v 1.39 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: utilities.c,v 1.40 2015/07/28 05:09:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -36,6 +36,7 @@
#define buf ubuf
#define vnode uvnode
#include <ufs/lfs/lfs.h>
+#include <ufs/lfs/lfs_accessors.h>
#include <err.h>
#include <stdio.h>
diff -r 8f236da484aa -r 657b9f62d063 sbin/newfs_lfs/make_lfs.c
--- a/sbin/newfs_lfs/make_lfs.c Tue Jul 28 01:57:55 2015 +0000
+++ b/sbin/newfs_lfs/make_lfs.c Tue Jul 28 05:09:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make_lfs.c,v 1.33 2015/07/24 06:59:32 dholland Exp $ */
+/* $NetBSD: make_lfs.c,v 1.34 2015/07/28 05:09:34 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
#if 0
static char sccsid[] = "@(#)lfs.c 8.5 (Berkeley) 5/24/95";
#else
-__RCSID("$NetBSD: make_lfs.c,v 1.33 2015/07/24 06:59:32 dholland Exp $");
+__RCSID("$NetBSD: make_lfs.c,v 1.34 2015/07/28 05:09:34 dholland Exp $");
#endif
#endif /* not lint */
Home |
Main Index |
Thread Index |
Old Index