Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Remove the now-pointless ulfs ops macros.
details: https://anonhg.NetBSD.org/src/rev/f3cc8dd004a9
branches: trunk
changeset: 788896:f3cc8dd004a9
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jul 28 00:37:07 2013 +0000
description:
Remove the now-pointless ulfs ops macros.
diffstat:
sys/ufs/lfs/lfs_rename.c | 12 ++++++------
sys/ufs/lfs/ulfs_inode.c | 12 ++++++------
sys/ufs/lfs/ulfs_lookup.c | 10 +++++-----
sys/ufs/lfs/ulfs_quota2.c | 8 ++++----
sys/ufs/lfs/ulfs_readwrite.c | 12 ++++++------
sys/ufs/lfs/ulfs_vnops.c | 38 +++++++++++++++++++-------------------
sys/ufs/lfs/ulfsmount.h | 17 +----------------
7 files changed, 47 insertions(+), 62 deletions(-)
diffs (truncated from 431 to 300 lines):
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/lfs_rename.c
--- a/sys/ufs/lfs/lfs_rename.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/lfs_rename.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_rename.c,v 1.2 2013/07/20 20:01:24 dholland Exp $ */
+/* $NetBSD: lfs_rename.c,v 1.3 2013/07/28 00:37:07 dholland Exp $ */
/* from NetBSD: ufs_rename.c,v 1.6 2013/01/22 09:39:18 dholland Exp */
/*-
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.2 2013/07/20 20:01:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.3 2013/07/28 00:37:07 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -842,7 +842,7 @@
VTOI(fvp)->i_nlink++;
DIP_ASSIGN(VTOI(fvp), nlink, VTOI(fvp)->i_nlink);
VTOI(fvp)->i_flag |= IN_CHANGE;
- error = ULFS_UPDATE(fvp, NULL, NULL, UPDATE_DIROP);
+ error = lfs_update(fvp, NULL, NULL, UPDATE_DIROP);
if (error)
goto whymustithurtsomuch;
@@ -869,7 +869,7 @@
VTOI(tdvp)->i_nlink++;
DIP_ASSIGN(VTOI(tdvp), nlink, VTOI(tdvp)->i_nlink);
VTOI(tdvp)->i_flag |= IN_CHANGE;
- error = ULFS_UPDATE(tdvp, NULL, NULL, UPDATE_DIROP);
+ error = lfs_update(tdvp, NULL, NULL, UPDATE_DIROP);
if (error) {
/*
* Link count update didn't take --
@@ -901,7 +901,7 @@
DIP_ASSIGN(VTOI(tdvp), nlink,
VTOI(tdvp)->i_nlink);
VTOI(tdvp)->i_flag |= IN_CHANGE;
- (void)ULFS_UPDATE(tdvp, NULL, NULL,
+ (void)lfs_update(tdvp, NULL, NULL,
UPDATE_WAIT | UPDATE_DIROP);
}
goto whymustithurtsomuch;
@@ -962,7 +962,7 @@
"hard-linked directory");
VTOI(tvp)->i_nlink = 0;
DIP_ASSIGN(VTOI(tvp), nlink, 0);
- error = ULFS_TRUNCATE(tvp, (off_t)0, IO_SYNC, cred);
+ error = lfs_truncate(tvp, (off_t)0, IO_SYNC, cred);
if (error)
goto whymustithurtsomuch;
}
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/ulfs_inode.c
--- a/sys/ufs/lfs/ulfs_inode.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/ulfs_inode.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_inode.c,v 1.8 2013/07/28 00:29:18 dholland Exp $ */
+/* $NetBSD: ulfs_inode.c,v 1.9 2013/07/28 00:37:07 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.8 2013/07/28 00:29:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.9 2013/07/28 00:37:07 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -102,7 +102,7 @@
ulfs_extattr_vnode_inactive(vp, curlwp);
#endif
if (ip->i_size != 0) {
- error = ULFS_TRUNCATE(vp, (off_t)0, 0, NOCRED);
+ error = lfs_truncate(vp, (off_t)0, 0, NOCRED);
}
#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
(void)lfs_chkiq(ip, -1, NOCRED, 0);
@@ -119,7 +119,7 @@
}
if (ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) {
- ULFS_UPDATE(vp, NULL, NULL, 0);
+ lfs_update(vp, NULL, NULL, 0);
}
out:
@@ -146,8 +146,8 @@
/* XXX: do we really need two of these? */
/* note: originally the first was inside a wapbl txn */
- ULFS_UPDATE(vp, NULL, NULL, UPDATE_CLOSE);
- ULFS_UPDATE(vp, NULL, NULL, UPDATE_CLOSE);
+ lfs_update(vp, NULL, NULL, UPDATE_CLOSE);
+ lfs_update(vp, NULL, NULL, UPDATE_CLOSE);
/*
* Remove the inode from its hash chain.
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/ulfs_lookup.c
--- a/sys/ufs/lfs/ulfs_lookup.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/ulfs_lookup.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_lookup.c,v 1.13 2013/07/28 00:29:18 dholland Exp $ */
+/* $NetBSD: ulfs_lookup.c,v 1.14 2013/07/28 00:37:07 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.13 2013/07/28 00:29:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.14 2013/07/28 00:37:07 dholland Exp $");
#ifdef _KERNEL_OPT
#include "opt_lfs.h"
@@ -842,7 +842,7 @@
*/
if (ulr->ulr_offset & (dirblksiz - 1))
panic("ulfs_direnter: newblk");
- if ((error = ULFS_BALLOC(dvp, (off_t)ulr->ulr_offset, dirblksiz,
+ if ((error = lfs_balloc(dvp, (off_t)ulr->ulr_offset, dirblksiz,
cr, B_CLRBUF | B_SYNC, &bp)) != 0) {
return (error);
}
@@ -875,7 +875,7 @@
#endif
error = VOP_BWRITE(bp->b_vp, bp);
vfs_timestamp(&ts);
- ret = ULFS_UPDATE(dvp, &ts, &ts, UPDATE_DIROP);
+ ret = lfs_update(dvp, &ts, &ts, UPDATE_DIROP);
if (error == 0)
return (ret);
return (error);
@@ -1018,7 +1018,7 @@
if (dp->i_dirhash != NULL)
ulfsdirhash_dirtrunc(dp, ulr->ulr_endoff);
#endif
- (void) ULFS_TRUNCATE(dvp, (off_t)ulr->ulr_endoff, IO_SYNC, cr);
+ (void) lfs_truncate(dvp, (off_t)ulr->ulr_endoff, IO_SYNC, cr);
}
return (error);
}
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/ulfs_quota2.c
--- a/sys/ufs/lfs/ulfs_quota2.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/ulfs_quota2.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_quota2.c,v 1.7 2013/07/28 00:29:18 dholland Exp $ */
+/* $NetBSD: ulfs_quota2.c,v 1.8 2013/07/28 00:37:07 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.7 2013/07/28 00:29:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.8 2013/07/28 00:37:07 dholland Exp $");
#include <sys/buf.h>
#include <sys/param.h>
@@ -314,7 +314,7 @@
struct inode *ip = VTOI(vp);
uint64_t size = ip->i_size;
/* need to alocate a new disk block */
- error = ULFS_BALLOC(vp, size, ump->umq2_bsize,
+ error = lfs_balloc(vp, size, ump->umq2_bsize,
ump->um_cred[type], B_CLRBUF | B_SYNC, &bp);
if (error) {
brelse(hbp, 0);
@@ -328,7 +328,7 @@
lfsquota2_addfreeq2e(q2h, bp->b_data, size, ump->umq2_bsize,
needswap);
error = bwrite(bp);
- error2 = ULFS_UPDATE(vp, NULL, NULL, UPDATE_WAIT);
+ error2 = lfs_update(vp, NULL, NULL, UPDATE_WAIT);
if (error || error2) {
brelse(hbp, 0);
if (error)
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/ulfs_readwrite.c
--- a/sys/ufs/lfs/ulfs_readwrite.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/ulfs_readwrite.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_readwrite.c,v 1.4 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: ulfs_readwrite.c,v 1.5 2013/07/28 00:37:07 dholland Exp $ */
/* from NetBSD: ufs_readwrite.c,v 1.105 2013/01/22 09:39:18 dholland Exp */
/*-
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: ulfs_readwrite.c,v 1.4 2013/06/18 18:18:58 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ulfs_readwrite.c,v 1.5 2013/07/28 00:37:07 dholland Exp $");
#ifdef LFS_READWRITE
#define FS struct lfs
@@ -183,7 +183,7 @@
if (!(vp->v_mount->mnt_flag & MNT_NOATIME)) {
ip->i_flag |= IN_ACCESS;
if ((ap->a_ioflag & IO_SYNC) == IO_SYNC) {
- error = ULFS_UPDATE(vp, NULL, NULL, UPDATE_WAIT);
+ error = lfs_update(vp, NULL, NULL, UPDATE_WAIT);
}
}
@@ -436,7 +436,7 @@
break;
need_unreserve = true;
#endif
- error = ULFS_BALLOC(vp, uio->uio_offset, xfersize,
+ error = lfs_balloc(vp, uio->uio_offset, xfersize,
ap->a_cred, flags, &bp);
if (error)
@@ -514,11 +514,11 @@
if (resid > uio->uio_resid)
VN_KNOTE(vp, NOTE_WRITE | (extended ? NOTE_EXTEND : 0));
if (error) {
- (void) ULFS_TRUNCATE(vp, osize, ioflag & IO_SYNC, ap->a_cred);
+ (void) lfs_truncate(vp, osize, ioflag & IO_SYNC, ap->a_cred);
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
} else if (resid > uio->uio_resid && (ioflag & IO_SYNC) == IO_SYNC) {
- error = ULFS_UPDATE(vp, NULL, NULL, UPDATE_WAIT);
+ error = lfs_update(vp, NULL, NULL, UPDATE_WAIT);
} else {
/* nothing */
}
diff -r 889bce0fd4a2 -r f3cc8dd004a9 sys/ufs/lfs/ulfs_vnops.c
--- a/sys/ufs/lfs/ulfs_vnops.c Sun Jul 28 00:31:54 2013 +0000
+++ b/sys/ufs/lfs/ulfs_vnops.c Sun Jul 28 00:37:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_vnops.c,v 1.16 2013/07/28 00:31:54 dholland Exp $ */
+/* $NetBSD: ulfs_vnops.c,v 1.17 2013/07/28 00:37:07 dholland Exp $ */
/* from NetBSD: ufs_vnops.c,v 1.213 2013/06/08 05:47:02 kardel Exp */
/*-
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.16 2013/07/28 00:31:54 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.17 2013/07/28 00:37:07 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -384,7 +384,7 @@
error = EPERM;
goto out;
}
- error = ULFS_TRUNCATE(vp, vap->va_size, 0, cred);
+ error = lfs_truncate(vp, vap->va_size, 0, cred);
if (error)
goto out;
break;
@@ -421,7 +421,7 @@
ip->i_ffs2_birthtime = vap->va_birthtime.tv_sec;
ip->i_ffs2_birthnsec = vap->va_birthtime.tv_nsec;
}
- error = ULFS_UPDATE(vp, &vap->va_atime, &vap->va_mtime, 0);
+ error = lfs_update(vp, &vap->va_atime, &vap->va_mtime, 0);
if (error)
goto out;
}
@@ -620,7 +620,7 @@
ip->i_nlink++;
DIP_ASSIGN(ip, nlink, ip->i_nlink);
ip->i_flag |= IN_CHANGE;
- error = ULFS_UPDATE(vp, NULL, NULL, UPDATE_DIROP);
+ error = lfs_update(vp, NULL, NULL, UPDATE_DIROP);
if (!error) {
newdir = pool_cache_get(ulfs_direct_cache, PR_WAITOK);
ulfs_makedirentry(ip, cnp, newdir);
@@ -748,7 +748,7 @@
* but not have it entered in the parent directory. The entry is
* made later after writing "." and ".." entries.
*/
- if ((error = ULFS_VALLOC(dvp, dmode, cnp->cn_cred, ap->a_vpp)) != 0)
+ if ((error = lfs_valloc(dvp, dmode, cnp->cn_cred, ap->a_vpp)) != 0)
goto out;
tvp = *ap->a_vpp;
@@ -760,7 +760,7 @@
DIP_ASSIGN(ip, gid, ip->i_gid);
#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
if ((error = lfs_chkiq(ip, 1, cnp->cn_cred, 0))) {
- ULFS_VFREE(tvp, ip->i_number, dmode);
+ lfs_vfree(tvp, ip->i_number, dmode);
fstrans_done(dvp->v_mount);
vput(tvp);
vput(dvp);
@@ -786,7 +786,7 @@
dp->i_nlink++;
DIP_ASSIGN(dp, nlink, dp->i_nlink);
dp->i_flag |= IN_CHANGE;
- if ((error = ULFS_UPDATE(dvp, NULL, NULL, UPDATE_DIROP)) != 0)
Home |
Main Index |
Thread Index |
Old Index