Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Split lfs from ufs step 4:
details: https://anonhg.NetBSD.org/src/rev/c5a68872b58c
branches: trunk
changeset: 787201:c5a68872b58c
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Jun 06 00:48:04 2013 +0000
description:
Split lfs from ufs step 4:
Massedit all ufs symbols to be "ulfs" instead, to make sure there are
no conflicts with ufs. Confirmed with grep.
(This required changing a few comments that maybe should have been
left alone to say "ulfs", but we'll survive that.)
diffstat:
sys/ufs/lfs/lfs.h | 18 +-
sys/ufs/lfs/lfs_alloc.c | 30 +-
sys/ufs/lfs/lfs_balloc.c | 22 +-
sys/ufs/lfs/lfs_bio.c | 10 +-
sys/ufs/lfs/lfs_debug.c | 10 +-
sys/ufs/lfs/lfs_extern.h | 10 +-
sys/ufs/lfs/lfs_inode.c | 56 ++--
sys/ufs/lfs/lfs_rfw.c | 28 +-
sys/ufs/lfs/lfs_segment.c | 62 ++--
sys/ufs/lfs/lfs_syscalls.c | 66 ++--
sys/ufs/lfs/lfs_vfsops.c | 130 +++++-----
sys/ufs/lfs/lfs_vnops.c | 150 ++++++------
sys/ufs/lfs/ulfs_bmap.c | 120 +++++-----
sys/ufs/lfs/ulfs_bswap.h | 46 ++--
sys/ufs/lfs/ulfs_dinode.h | 50 ++--
sys/ufs/lfs/ulfs_dir.h | 8 +-
sys/ufs/lfs/ulfs_dirhash.c | 290 +++++++++++++-------------
sys/ufs/lfs/ulfs_dirhash.h | 38 +-
sys/ufs/lfs/ulfs_extattr.c | 452 ++++++++++++++++++++--------------------
sys/ufs/lfs/ulfs_extattr.h | 88 +++---
sys/ufs/lfs/ulfs_extern.h | 212 +++++++++---------
sys/ufs/lfs/ulfs_ihash.c | 54 ++--
sys/ufs/lfs/ulfs_inode.c | 52 ++--
sys/ufs/lfs/ulfs_inode.h | 36 +-
sys/ufs/lfs/ulfs_lookup.c | 246 +++++++++++-----------
sys/ufs/lfs/ulfs_quota.c | 142 ++++++------
sys/ufs/lfs/ulfs_quota.h | 38 +-
sys/ufs/lfs/ulfs_quota1.c | 54 ++--
sys/ufs/lfs/ulfs_quota1.h | 10 +-
sys/ufs/lfs/ulfs_quota2.c | 214 +++++++++---------
sys/ufs/lfs/ulfs_quota2.h | 14 +-
sys/ufs/lfs/ulfs_quota2_subr.c | 34 +-
sys/ufs/lfs/ulfs_quotacommon.h | 34 +-
sys/ufs/lfs/ulfs_readwrite.c | 44 +-
sys/ufs/lfs/ulfs_rename.c | 250 +++++++++++-----------
sys/ufs/lfs/ulfs_vfsops.c | 54 ++--
sys/ufs/lfs/ulfs_vnops.c | 400 ++++++++++++++++++------------------
sys/ufs/lfs/ulfs_wapbl.c | 10 +-
sys/ufs/lfs/ulfs_wapbl.h | 104 ++++----
sys/ufs/lfs/ulfsmount.h | 102 ++++----
40 files changed, 1894 insertions(+), 1894 deletions(-)
diffs (truncated from 10998 to 300 lines):
diff -r f139fdd75444 -r c5a68872b58c sys/ufs/lfs/lfs.h
--- a/sys/ufs/lfs/lfs.h Thu Jun 06 00:46:40 2013 +0000
+++ b/sys/ufs/lfs/lfs.h Thu Jun 06 00:48:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.h,v 1.137 2013/01/22 09:39:17 dholland Exp $ */
+/* $NetBSD: lfs.h,v 1.138 2013/06/06 00:48:04 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -303,7 +303,7 @@
*/
/* Address calculations for metadata located in the inode */
-#define S_INDIR(fs) -UFS_NDADDR
+#define S_INDIR(fs) -ULFS_NDADDR
#define D_INDIR(fs) (S_INDIR(fs) - NINDIR(fs) - 1)
#define T_INDIR(fs) (D_INDIR(fs) - NINDIR(fs) * NINDIR(fs) - 1)
@@ -856,7 +856,7 @@
#define INOPF(fs) ((fs)->lfs_inopf)
#define blksize(fs, ip, lbn) \
- (((lbn) >= UFS_NDADDR || (ip)->i_ffs1_size >= ((lbn) + 1) << (fs)->lfs_bshift) \
+ (((lbn) >= ULFS_NDADDR || (ip)->i_ffs1_size >= ((lbn) + 1) << (fs)->lfs_bshift) \
? (fs)->lfs_bsize \
: (fragroundup(fs, blkoff(fs, (ip)->i_ffs1_size))))
#define blkoff(fs, loc) ((int)((loc) & (fs)->lfs_bmask))
@@ -892,7 +892,7 @@
#define blknum(fs, fsb) /* calculates rounddown(fsb, fs->lfs_frag) */ \
((fsb) &~ ((fs)->lfs_frag - 1))
#define dblksize(fs, dp, lbn) \
- (((lbn) >= UFS_NDADDR || (dp)->di_size >= ((lbn) + 1) << (fs)->lfs_bshift)\
+ (((lbn) >= ULFS_NDADDR || (dp)->di_size >= ((lbn) + 1) << (fs)->lfs_bshift)\
? (fs)->lfs_bsize \
: (fragroundup(fs, blkoff(fs, (dp)->di_size))))
@@ -939,7 +939,7 @@
struct buf **cbpp; /* pointer to next available bp */
struct buf **start_bpp; /* pointer to first bp in this set */
struct buf *ibp; /* buffer pointer to inode page */
- struct ufs1_dinode *idp; /* pointer to ifile dinode */
+ struct ulfs1_dinode *idp; /* pointer to ifile dinode */
struct finfo *fip; /* current fileinfo pointer */
struct vnode *vp; /* vnode being gathered */
void *segsum; /* segment summary info */
@@ -991,7 +991,7 @@
struct lfs_inode_ext {
off_t lfs_osize; /* size of file on disk */
u_int32_t lfs_effnblocks; /* number of blocks when i/o completes */
- size_t lfs_fragsize[UFS_NDADDR]; /* size of on-disk direct blocks */
+ size_t lfs_fragsize[ULFS_NDADDR]; /* size of on-disk direct blocks */
TAILQ_ENTRY(inode) lfs_dchain; /* Dirop chain. */
TAILQ_ENTRY(inode) lfs_pchain; /* Paging chain. */
#define LFSI_NO_GOP_WRITE 0x01
@@ -1069,10 +1069,10 @@
/*
* The minimum number of blocks to create a new inode. This is:
- * directory direct block (1) + UFS_NIADDR indirect blocks + inode block (1) +
- * ifile direct block (1) + UFS_NIADDR indirect blocks = 3 + 2 * UFS_NIADDR blocks.
+ * directory direct block (1) + ULFS_NIADDR indirect blocks + inode block (1) +
+ * ifile direct block (1) + ULFS_NIADDR indirect blocks = 3 + 2 * ULFS_NIADDR blocks.
*/
-#define LFS_NRESERVE(F) (btofsb((F), (2 * UFS_NIADDR + 3) << (F)->lfs_bshift))
+#define LFS_NRESERVE(F) (btofsb((F), (2 * ULFS_NIADDR + 3) << (F)->lfs_bshift))
/* Statistics Counters */
struct lfs_stats { /* Must match sysctl list in lfs_vfsops.h ! */
diff -r f139fdd75444 -r c5a68872b58c sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Thu Jun 06 00:46:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Thu Jun 06 00:48:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.115 2013/06/06 00:46:40 dholland Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.116 2013/06/06 00:48:04 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.115 2013/06/06 00:46:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.116 2013/06/06 00:48:04 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -268,7 +268,7 @@
ASSERT_NO_SEGLOCK(fs);
vp = *vpp;
- mutex_enter(&ufs_hashlock);
+ mutex_enter(&ulfs_hashlock);
/* Create an inode to associate with the vnode. */
lfs_vcreate(pvp->v_mount, new_ino, vp);
@@ -289,14 +289,14 @@
}
/* Insert into the inode hash table. */
- ufs_ihashins(ip);
- mutex_exit(&ufs_hashlock);
+ ulfs_ihashins(ip);
+ mutex_exit(&ulfs_hashlock);
- ufs_vinit(vp->v_mount, lfs_specop_p, lfs_fifoop_p, vpp);
+ ulfs_vinit(vp->v_mount, lfs_specop_p, lfs_fifoop_p, vpp);
vp = *vpp;
ip = VTOI(vp);
- memset(ip->i_lfs_fragsize, 0, UFS_NDADDR * sizeof(*ip->i_lfs_fragsize));
+ memset(ip->i_lfs_fragsize, 0, ULFS_NDADDR * sizeof(*ip->i_lfs_fragsize));
uvm_vnp_setsize(vp, 0);
lfs_mark_vnode(vp);
@@ -310,11 +310,11 @@
lfs_vcreate(struct mount *mp, ino_t ino, struct vnode *vp)
{
struct inode *ip;
- struct ufs1_dinode *dp;
- struct ufsmount *ump;
+ struct ulfs1_dinode *dp;
+ struct ulfsmount *ump;
/* Get a pointer to the private mount structure. */
- ump = VFSTOUFS(mp);
+ ump = VFSTOULFS(mp);
ASSERT_NO_SEGLOCK(ump->um_lfs);
@@ -338,7 +338,7 @@
ip->i_lfs_nbtree = 0;
LIST_INIT(&ip->i_lfs_segdhd);
#ifdef LFS_QUOTA
- ufsquota_init(ip);
+ ulfsquota_init(ip);
#endif
}
@@ -551,17 +551,17 @@
if (old_iaddr != LFS_UNUSED_DADDR) {
LFS_SEGENTRY(sup, fs, dtosn(fs, old_iaddr), bp);
#ifdef DIAGNOSTIC
- if (sup->su_nbytes < sizeof (struct ufs1_dinode)) {
+ if (sup->su_nbytes < sizeof (struct ulfs1_dinode)) {
printf("lfs_vfree: negative byte count"
" (segment %" PRIu32 " short by %d)\n",
dtosn(fs, old_iaddr),
- (int)sizeof (struct ufs1_dinode) -
+ (int)sizeof (struct ulfs1_dinode) -
sup->su_nbytes);
panic("lfs_vfree: negative byte count");
- sup->su_nbytes = sizeof (struct ufs1_dinode);
+ sup->su_nbytes = sizeof (struct ulfs1_dinode);
}
#endif
- sup->su_nbytes -= sizeof (struct ufs1_dinode);
+ sup->su_nbytes -= sizeof (struct ulfs1_dinode);
LFS_WRITESEGENTRY(sup, fs, dtosn(fs, old_iaddr), bp); /* Ifile */
}
diff -r f139fdd75444 -r c5a68872b58c sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c Thu Jun 06 00:46:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c Thu Jun 06 00:48:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_balloc.c,v 1.74 2013/06/06 00:46:40 dholland Exp $ */
+/* $NetBSD: lfs_balloc.c,v 1.75 2013/06/06 00:48:04 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.74 2013/06/06 00:46:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.75 2013/06/06 00:48:04 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -99,14 +99,14 @@
* this block to be created.
*
* Blocks which have never been accounted for (i.e., which "do not exist")
- * have disk address 0, which is translated by ufs_bmap to the special value
- * UNASSIGNED == -1, as in the historical UFS.
+ * have disk address 0, which is translated by ulfs_bmap to the special value
+ * UNASSIGNED == -1, as in the historical ULFS.
*
* Blocks which have been accounted for but which have not yet been written
* to disk are given the new special disk address UNWRITTEN == -2, so that
* they can be differentiated from completely new blocks.
*/
-/* VOP_BWRITE UFS_NIADDR+2 times */
+/* VOP_BWRITE ULFS_NIADDR+2 times */
int
lfs_balloc(struct vnode *vp, off_t startoffset, int iosize, kauth_cred_t cred,
int flags, struct buf **bpp)
@@ -116,7 +116,7 @@
struct buf *ibp, *bp;
struct inode *ip;
struct lfs *fs;
- struct indir indirs[UFS_NIADDR+2], *idp;
+ struct indir indirs[ULFS_NIADDR+2], *idp;
daddr_t lbn, lastblock;
int bcount;
int error, frags, i, nsize, osize, num;
@@ -151,7 +151,7 @@
/* Check for block beyond end of file and fragment extension needed. */
lastblock = lblkno(fs, ip->i_size);
- if (lastblock < UFS_NDADDR && lastblock < lbn) {
+ if (lastblock < ULFS_NDADDR && lastblock < lbn) {
osize = blksize(fs, ip, lastblock);
if (osize < fs->lfs_bsize && osize > 0) {
if ((error = lfs_fragextend(vp, osize, fs->lfs_bsize,
@@ -175,7 +175,7 @@
* size or it already exists and contains some fragments and
* may need to extend it.
*/
- if (lbn < UFS_NDADDR && lblkno(fs, ip->i_size) <= lbn) {
+ if (lbn < ULFS_NDADDR && lblkno(fs, ip->i_size) <= lbn) {
osize = blksize(fs, ip, lbn);
nsize = fragroundup(fs, offset + iosize);
if (lblktosize(fs, lbn) >= ip->i_size) {
@@ -213,7 +213,7 @@
return 0;
}
- error = ufs_bmaparray(vp, lbn, &daddr, &indirs[0], &num, NULL, NULL);
+ error = ulfs_bmaparray(vp, lbn, &daddr, &indirs[0], &num, NULL, NULL);
if (error)
return (error);
@@ -224,7 +224,7 @@
* Do byte accounting all at once, so we can gracefully fail *before*
* we start assigning blocks.
*/
- frags = VFSTOUFS(vp->v_mount)->um_seqinc;
+ frags = VFSTOULFS(vp->v_mount)->um_seqinc;
bcount = 0;
if (daddr == UNASSIGNED) {
bcount = frags;
@@ -306,7 +306,7 @@
* The block we are writing may be a brand new block
* in which case we need to do accounting.
*
- * We can tell a truly new block because ufs_bmaparray will say
+ * We can tell a truly new block because ulfs_bmaparray will say
* it is UNASSIGNED. Once we allocate it we will assign it the
* disk address UNWRITTEN.
*/
diff -r f139fdd75444 -r c5a68872b58c sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c Thu Jun 06 00:46:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_bio.c Thu Jun 06 00:48:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.123 2013/06/06 00:44:40 dholland Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.124 2013/06/06 00:48:04 dholland Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.123 2013/06/06 00:44:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.124 2013/06/06 00:48:04 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -426,7 +426,7 @@
int fsb;
vp = bp->b_vp;
- fs = VFSTOUFS(vp->v_mount)->um_lfs;
+ fs = VFSTOULFS(vp->v_mount)->um_lfs;
ASSERT_MAYBE_SEGLOCK(fs);
KASSERT(bp->b_cflags & BC_BUSY);
@@ -577,7 +577,7 @@
}
if (strncmp(&mp->mnt_stat.f_fstypename[0], MOUNT_LFS,
sizeof(mp->mnt_stat.f_fstypename)) == 0) {
- tfs = VFSTOUFS(mp)->um_lfs;
+ tfs = VFSTOULFS(mp)->um_lfs;
mutex_enter(&lfs_lock);
lfs_flush_fs(tfs, flags);
mutex_exit(&lfs_lock);
@@ -597,7 +597,7 @@
}
#define INOCOUNT(fs) howmany((fs)->lfs_uinodes, INOPB(fs))
-#define INOBYTES(fs) ((fs)->lfs_uinodes * sizeof (struct ufs1_dinode))
+#define INOBYTES(fs) ((fs)->lfs_uinodes * sizeof (struct ulfs1_dinode))
/*
* make sure that we don't have too many locked buffers.
diff -r f139fdd75444 -r c5a68872b58c sys/ufs/lfs/lfs_debug.c
--- a/sys/ufs/lfs/lfs_debug.c Thu Jun 06 00:46:40 2013 +0000
+++ b/sys/ufs/lfs/lfs_debug.c Thu Jun 06 00:48:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_debug.c,v 1.41 2013/06/06 00:44:40 dholland Exp $ */
Home |
Main Index |
Thread Index |
Old Index