Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs Split lfs from ufs step 3: rearrange config stuff.
details: https://anonhg.NetBSD.org/src/rev/f139fdd75444
branches: trunk
changeset: 787200:f139fdd75444
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Jun 06 00:46:40 2013 +0000
description:
Split lfs from ufs step 3: rearrange config stuff.
Add new options:
LFS_EI
LFS_DIRHASH
LFS_EXTATTR
LFS_EXTATTR_AUTOSTART
LFS_QUOTA
LFS_QUOTA2
and update code referring to the corresponding FFS and UFS config
symbols to use the LFS versions. Disable the one extant reference
to APPLE_UFS in the ulfs files. Use opt_lfs.h only, not opt_ffs.h.
diffstat:
sys/ufs/files.ufs | 64 +++++++++++++++++++++++++++---------------
sys/ufs/lfs/lfs_alloc.c | 6 ++--
sys/ufs/lfs/lfs_balloc.c | 8 ++--
sys/ufs/lfs/lfs_inode.c | 6 ++--
sys/ufs/lfs/lfs_vfsops.c | 8 ++--
sys/ufs/lfs/ulfs_bswap.h | 8 ++--
sys/ufs/lfs/ulfs_extattr.c | 6 ++--
sys/ufs/lfs/ulfs_inode.c | 18 ++++++------
sys/ufs/lfs/ulfs_lookup.c | 30 ++++++++++----------
sys/ufs/lfs/ulfs_quota.c | 68 +++++++++++++++++++++++-----------------------
sys/ufs/lfs/ulfs_quota2.c | 14 ++++----
sys/ufs/lfs/ulfs_vfsops.c | 24 ++++++++--------
sys/ufs/lfs/ulfs_vnops.c | 26 ++++++++--------
sys/ufs/lfs/ulfsmount.h | 6 ++--
14 files changed, 155 insertions(+), 137 deletions(-)
diffs (truncated from 1042 to 300 lines):
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/files.ufs
--- a/sys/ufs/files.ufs Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/files.ufs Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.ufs,v 1.29 2012/05/09 00:21:17 riastradh Exp $
+# $NetBSD: files.ufs,v 1.30 2013/06/06 00:46:40 dholland Exp $
deffs FFS
deffs EXT2FS
@@ -10,7 +10,10 @@
UFS_DIRHASH
UFS_EXTATTR UFS_EXTATTR_AUTOSTART
-defflag opt_lfs.h LFS_KERNEL_RFW
+defflag opt_lfs.h LFS_EI LFS_KERNEL_RFW
+ LFS_DIRHASH
+ LFS_EXTATTR LFS_EXTATTR_AUTOSTART
+ LFS_QUOTA LFS_QUOTA2
file ufs/ext2fs/ext2fs_alloc.c ext2fs
file ufs/ext2fs/ext2fs_balloc.c ext2fs
@@ -42,18 +45,18 @@
file ufs/chfs/chfs_vfsops.c chfs
file ufs/chfs/chfs_readinode.c chfs
-file ufs/ffs/ffs_alloc.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_balloc.c ffs | lfs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_alloc.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_balloc.c ffs | mfs | ext2fs | chfs
file ufs/ffs/ffs_bswap.c (ffs | mfs) & ffs_ei
-file ufs/ffs/ffs_inode.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_snapshot.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_subr.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_tables.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_vfsops.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ffs/ffs_vnops.c ffs | lfs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_inode.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_snapshot.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_subr.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_tables.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_vfsops.c ffs | mfs | ext2fs | chfs
+file ufs/ffs/ffs_vnops.c ffs | mfs | ext2fs | chfs
file ufs/ffs/ffs_wapbl.c ffs & wapbl
file ufs/ffs/ffs_appleufs.c ffs & apple_ufs
-file ufs/ffs/ffs_quota2.c quota2 & (ffs | lfs | mfs | ext2fs | chfs)
+file ufs/ffs/ffs_quota2.c quota2 & (ffs | mfs | ext2fs | chfs)
file ufs/lfs/lfs_alloc.c lfs
file ufs/lfs/lfs_balloc.c lfs
@@ -68,23 +71,38 @@
file ufs/lfs/lfs_syscalls.c lfs
file ufs/lfs/lfs_vfsops.c lfs
file ufs/lfs/lfs_vnops.c lfs
+file ufs/lfs/ulfs_bmap.c lfs
+file ufs/lfs/ulfs_dirhash.c lfs & lfs_dirhash
+file ufs/lfs/ulfs_extattr.c lfs & lfs_extattr
+file ufs/lfs/ulfs_ihash.c lfs
+file ufs/lfs/ulfs_inode.c lfs
+file ufs/lfs/ulfs_lookup.c lfs
+file ufs/lfs/ulfs_quota.c lfs & (lfs_quota | lfs_quota2)
+file ufs/lfs/ulfs_quota1.c lfs & lfs_quota
+file ufs/lfs/ulfs_quota2.c lfs & lfs_quota2
+file ufs/lfs/ulfs_quota1_subr.c lfs
+file ufs/lfs/ulfs_quota2_subr.c lfs & lfs_quota2
+file ufs/lfs/ulfs_rename.c lfs
+file ufs/lfs/ulfs_vfsops.c lfs
+file ufs/lfs/ulfs_vnops.c lfs
+file ufs/lfs/ulfs_wapbl.c lfs
file ufs/mfs/mfs_vfsops.c mfs
file ufs/mfs/mfs_vnops.c mfs
file ufs/mfs/mfs_miniroot.c
-file ufs/ufs/ufs_bmap.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ufs/ufs_dirhash.c (ffs | lfs | mfs | ext2fs | chfs) & ufs_dirhash
+file ufs/ufs/ufs_bmap.c ffs | mfs | ext2fs | chfs
+file ufs/ufs/ufs_dirhash.c (ffs | mfs | ext2fs | chfs) & ufs_dirhash
file ufs/ufs/ufs_extattr.c (ffs | mfs) & ufs_extattr
-file ufs/ufs/ufs_ihash.c ffs | lfs | mfs | ext2fs
-file ufs/ufs/ufs_inode.c ffs | lfs | mfs | ext2fs
-file ufs/ufs/ufs_lookup.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ufs/ufs_quota.c (quota | quota2) & (ffs | lfs | mfs | ext2fs | chfs)
-file ufs/ufs/ufs_quota1.c quota & (ffs | lfs | mfs | ext2fs | chfs)
-file ufs/ufs/ufs_quota2.c quota2 & (ffs | lfs | mfs | ext2fs | chfs)
+file ufs/ufs/ufs_ihash.c ffs | mfs | ext2fs
+file ufs/ufs/ufs_inode.c ffs | mfs | ext2fs
+file ufs/ufs/ufs_lookup.c ffs | mfs | ext2fs | chfs
+file ufs/ufs/ufs_quota.c (quota | quota2) & (ffs | mfs | ext2fs | chfs)
+file ufs/ufs/ufs_quota1.c quota & (ffs | mfs | ext2fs | chfs)
+file ufs/ufs/ufs_quota2.c quota2 & (ffs | mfs | ext2fs | chfs)
file ufs/ufs/quota1_subr.c
-file ufs/ufs/quota2_subr.c quota2 & (ffs | lfs | mfs | ext2fs | chfs)
-file ufs/ufs/ufs_rename.c ffs | lfs | mfs | chfs
-file ufs/ufs/ufs_vfsops.c ffs | lfs | mfs | ext2fs | chfs
-file ufs/ufs/ufs_vnops.c ffs | lfs | mfs | ext2fs | chfs
+file ufs/ufs/quota2_subr.c quota2 & (ffs | mfs | ext2fs | chfs)
+file ufs/ufs/ufs_rename.c ffs | mfs | chfs
+file ufs/ufs/ufs_vfsops.c ffs | mfs | ext2fs | chfs
+file ufs/ufs/ufs_vnops.c ffs | mfs | ext2fs | chfs
file ufs/ufs/ufs_wapbl.c ffs & wapbl
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.114 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.115 2013/06/06 00:46:40 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.114 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.115 2013/06/06 00:46:40 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -337,7 +337,7 @@
SPLAY_INIT(&ip->i_lfs_lbtree);
ip->i_lfs_nbtree = 0;
LIST_INIT(&ip->i_lfs_segdhd);
-#ifdef QUOTA
+#ifdef LFS_QUOTA
ufsquota_init(ip);
#endif
}
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_balloc.c,v 1.73 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: lfs_balloc.c,v 1.74 2013/06/06 00:46:40 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.73 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.74 2013/06/06 00:46:40 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -411,7 +411,7 @@
if (bpp && (error = bread(vp, lbn, osize, NOCRED, 0, bpp))) {
goto out;
}
-#ifdef QUOTA
+#ifdef LFS_QUOTA
if ((error = chkdq(ip, frags, cred, 0))) {
if (bpp)
brelse(*bpp, 0);
@@ -429,7 +429,7 @@
if (!lfs_fits(fs, frags)) {
if (bpp)
brelse(*bpp, 0);
-#ifdef QUOTA
+#ifdef LFS_QUOTA
chkdq(ip, -frags, cred, 0);
#endif
rw_exit(&fs->lfs_fraglock);
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/lfs_inode.c
--- a/sys/ufs/lfs/lfs_inode.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_inode.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_inode.c,v 1.128 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: lfs_inode.c,v 1.129 2013/06/06 00:46:40 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.128 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.129 2013/06/06 00:46:40 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -586,7 +586,7 @@
mutex_exit(&lfs_lock);
oip->i_flag |= IN_CHANGE;
-#ifdef QUOTA
+#ifdef LFS_QUOTA
(void) chkdq(oip, -blocksreleased, NOCRED, 0);
#endif
lfs_reserve(fs, ovp, NULL,
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.299 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.300 2013/06/06 00:46:40 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.299 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.300 2013/06/06 00:46:40 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -1190,7 +1190,7 @@
&lfs_lock);
mutex_exit(&lfs_lock);
-#ifdef QUOTA
+#ifdef LFS_QUOTA
if ((error = quota1_umount(mp, flags)) != 0)
return (error);
#endif
@@ -1328,7 +1328,7 @@
DLOG((DLOG_FLUSH, "lfs_sync at 0x%x\n", fs->lfs_offset));
error = lfs_segwrite(mp, SEGM_CKP | (waitfor ? SEGM_SYNC : 0));
lfs_writer_leave(fs);
-#ifdef QUOTA
+#ifdef LFS_QUOTA
qsync(mp);
#endif
return (error);
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/ulfs_bswap.h
--- a/sys/ufs/lfs/ulfs_bswap.h Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/ulfs_bswap.h Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_bswap.h,v 1.1 2013/06/06 00:40:55 dholland Exp $ */
+/* $NetBSD: ulfs_bswap.h,v 1.2 2013/06/06 00:46:40 dholland Exp $ */
/* from NetBSD: ufs_bswap.h,v 1.19 2009/10/19 18:41:17 bouyer Exp */
/*
@@ -30,13 +30,13 @@
#define _UFS_UFS_BSWAP_H_
#if defined(_KERNEL_OPT)
-#include "opt_ffs.h"
+#include "opt_lfs.h"
#endif
#include <sys/bswap.h>
/* Macros to access UFS flags */
-#ifdef FFS_EI
+#ifdef LFS_EI
#define UFS_MPNEEDSWAP(ump) ((ump)->um_flags & UFS_NEEDSWAP)
#define UFS_FSNEEDSWAP(fs) ((fs)->fs_flags & FS_SWAPPED)
#define UFS_IPNEEDSWAP(ip) UFS_MPNEEDSWAP((ip)->i_ump)
@@ -46,7 +46,7 @@
#define UFS_IPNEEDSWAP(ip) (0)
#endif
-#if !defined(_KERNEL) || defined(FFS_EI)
+#if !defined(_KERNEL) || defined(LFS_EI)
/* inlines for access to swapped data */
static inline u_int16_t
ufs_rw16(uint16_t a, int ns)
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/ulfs_extattr.c
--- a/sys/ufs/lfs/ulfs_extattr.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/ulfs_extattr.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_extattr.c,v 1.2 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: ulfs_extattr.c,v 1.3 2013/06/06 00:46:40 dholland Exp $ */
/* from NetBSD: ufs_extattr.c,v 1.41 2012/12/08 13:42:36 manu Exp */
/*-
@@ -49,10 +49,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_extattr.c,v 1.2 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_extattr.c,v 1.3 2013/06/06 00:46:40 dholland Exp $");
#ifdef _KERNEL_OPT
-#include "opt_ffs.h"
+#include "opt_lfs.h"
#endif
#include <sys/param.h>
diff -r e428cbf63cf9 -r f139fdd75444 sys/ufs/lfs/ulfs_inode.c
--- a/sys/ufs/lfs/ulfs_inode.c Thu Jun 06 00:44:40 2013 +0000
+++ b/sys/ufs/lfs/ulfs_inode.c Thu Jun 06 00:46:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_inode.c,v 1.2 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: ulfs_inode.c,v 1.3 2013/06/06 00:46:40 dholland Exp $ */
/* from NetBSD: ufs_inode.c,v 1.89 2013/01/22 09:39:18 dholland Exp */
/*
@@ -38,10 +38,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.2 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.3 2013/06/06 00:46:40 dholland Exp $");
#if defined(_KERNEL_OPT)
-#include "opt_ffs.h"
Home |
Main Index |
Thread Index |
Old Index