Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs There is no WAPBL in LFS.
details: https://anonhg.NetBSD.org/src/rev/94cf7f8af84e
branches: trunk
changeset: 787261:94cf7f8af84e
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Jun 08 22:05:15 2013 +0000
description:
There is no WAPBL in LFS.
diffstat:
sys/ufs/lfs/ulfs_inode.c | 31 ++---------
sys/ufs/lfs/ulfs_lookup.c | 16 +-----
sys/ufs/lfs/ulfs_quota2.c | 19 +------
sys/ufs/lfs/ulfs_readwrite.c | 30 ++---------
sys/ufs/lfs/ulfs_rename.c | 22 ++------
sys/ufs/lfs/ulfs_snapshot.c | 5 +-
sys/ufs/lfs/ulfs_vnops.c | 113 +-----------------------------------------
sys/ufs/lfs/ulfs_wapbl.c | 96 +-----------------------------------
sys/ufs/lfs/ulfs_wapbl.h | 101 +--------------------------------------
9 files changed, 34 insertions(+), 399 deletions(-)
diffs (truncated from 1050 to 300 lines):
diff -r 03d4479f9cd8 -r 94cf7f8af84e sys/ufs/lfs/ulfs_inode.c
--- a/sys/ufs/lfs/ulfs_inode.c Sat Jun 08 21:40:27 2013 +0000
+++ b/sys/ufs/lfs/ulfs_inode.c Sat Jun 08 22:05:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_inode.c,v 1.6 2013/06/08 21:40:27 dholland Exp $ */
+/* $NetBSD: ulfs_inode.c,v 1.7 2013/06/08 22:05:15 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.6 2013/06/08 21:40:27 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_inode.c,v 1.7 2013/06/08 22:05:15 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -61,7 +61,6 @@
#include <ufs/lfs/ulfs_inode.h>
#include <ufs/lfs/ulfsmount.h>
#include <ufs/lfs/ulfs_extern.h>
-#include <ufs/lfs/ulfs_wapbl.h>
#ifdef LFS_DIRHASH
#include <ufs/lfs/ulfs_dirhash.h>
#endif
@@ -88,9 +87,6 @@
struct mount *transmp;
mode_t mode;
int error = 0;
- int logged = 0;
-
- ULFS_WAPBL_JUNLOCK_ASSERT(vp->v_mount);
transmp = vp->v_mount;
fstrans_start(transmp, FSTRANS_LAZY);
@@ -103,13 +99,8 @@
#ifdef LFS_EXTATTR
ulfs_extattr_vnode_inactive(vp, curlwp);
#endif
- error = ULFS_WAPBL_BEGIN(vp->v_mount);
- if (error)
- goto out;
- logged = 1;
if (ip->i_size != 0) {
- if (!error)
- error = ULFS_TRUNCATE(vp, (off_t)0, 0, NOCRED);
+ error = ULFS_TRUNCATE(vp, (off_t)0, 0, NOCRED);
}
#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
(void)lfs_chkiq(ip, -1, NOCRED, 0);
@@ -126,16 +117,9 @@
}
if (ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) {
- if (!logged++) {
- int err;
- err = ULFS_WAPBL_BEGIN(vp->v_mount);
- if (err)
- goto out;
- }
ULFS_UPDATE(vp, NULL, NULL, 0);
}
- if (logged)
- ULFS_WAPBL_END(vp->v_mount);
+
out:
/*
* If we are done with the inode, reclaim it
@@ -158,10 +142,9 @@
if (prtactive && vp->v_usecount > 1)
vprint("ulfs_reclaim: pushing active", vp);
- if (!ULFS_WAPBL_BEGIN(vp->v_mount)) {
- ULFS_UPDATE(vp, NULL, NULL, UPDATE_CLOSE);
- ULFS_WAPBL_END(vp->v_mount);
- }
+ /* 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);
/*
diff -r 03d4479f9cd8 -r 94cf7f8af84e sys/ufs/lfs/ulfs_lookup.c
--- a/sys/ufs/lfs/ulfs_lookup.c Sat Jun 08 21:40:27 2013 +0000
+++ b/sys/ufs/lfs/ulfs_lookup.c Sat Jun 08 22:05:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_lookup.c,v 1.9 2013/06/08 02:14:46 dholland Exp $ */
+/* $NetBSD: ulfs_lookup.c,v 1.10 2013/06/08 22:05:15 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.9 2013/06/08 02:14:46 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.10 2013/06/08 22:05:15 dholland Exp $");
#ifdef _KERNEL_OPT
#include "opt_lfs.h"
@@ -67,7 +67,6 @@
#include <ufs/lfs/ulfsmount.h>
#include <ufs/lfs/ulfs_extern.h>
#include <ufs/lfs/ulfs_bswap.h>
-#include <ufs/lfs/ulfs_wapbl.h>
#include <miscfs/genfs/genfs.h>
@@ -535,7 +534,6 @@
results->ulr_offset + LFS_DIRSIZ(FSFMT(vdp), ep, needswap);
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_flag |= IN_CHANGE | IN_UPDATE;
- ULFS_WAPBL_UPDATE(vdp, NULL, NULL, UPDATE_DIROP);
}
brelse(bp, 0);
@@ -827,8 +825,6 @@
const int needswap = ULFS_MPNEEDSWAP(ump);
int dirblksiz = ump->um_dirblksiz;
- ULFS_WAPBL_JLOCK_ASSERT(dvp->v_mount);
-
error = 0;
cr = cnp->cn_cred;
l = curlwp;
@@ -908,7 +904,6 @@
dp->i_size = ulr->ulr_offset + ulr->ulr_count;
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_flag |= IN_CHANGE | IN_UPDATE;
- ULFS_WAPBL_UPDATE(dvp, NULL, NULL, UPDATE_DIROP);
}
/*
* Get the block containing the space for the new directory entry.
@@ -1024,7 +1019,6 @@
#endif
(void) ULFS_TRUNCATE(dvp, (off_t)ulr->ulr_endoff, IO_SYNC, cr);
}
- ULFS_WAPBL_UPDATE(dvp, NULL, NULL, UPDATE_DIROP);
return (error);
}
@@ -1075,8 +1069,6 @@
const int needswap = ULFS_MPNEEDSWAP(dp->i_ump);
#endif
- ULFS_WAPBL_JLOCK_ASSERT(dvp->v_mount);
-
if (flags & DOWHITEOUT) {
/*
* Whiteout entry: set d_ino to ULFS_WINO.
@@ -1133,7 +1125,6 @@
ip->i_nlink--;
DIP_ASSIGN(ip, nlink, ip->i_nlink);
ip->i_flag |= IN_CHANGE;
- ULFS_WAPBL_UPDATE(ITOV(ip), NULL, NULL, 0);
}
/*
* XXX did it ever occur to anyone that it might be a good
@@ -1152,7 +1143,6 @@
if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 &&
ip->i_nlink == 0)
ulfs_snapgone(ip);
- ULFS_WAPBL_UPDATE(dvp, NULL, NULL, 0);
return (error);
}
@@ -1191,7 +1181,6 @@
oip->i_nlink--;
DIP_ASSIGN(oip, nlink, oip->i_nlink);
oip->i_flag |= IN_CHANGE;
- ULFS_WAPBL_UPDATE(ITOV(oip), NULL, NULL, UPDATE_DIROP);
error = VOP_BWRITE(bp->b_vp, bp);
dp->i_flag |= iflags;
/*
@@ -1201,7 +1190,6 @@
*/
if ((oip->i_flags & SF_SNAPSHOT) != 0 && oip->i_nlink == 0)
ulfs_snapgone(oip);
- ULFS_WAPBL_UPDATE(vdp, NULL, NULL, UPDATE_DIROP);
return (error);
}
diff -r 03d4479f9cd8 -r 94cf7f8af84e sys/ufs/lfs/ulfs_quota2.c
--- a/sys/ufs/lfs/ulfs_quota2.c Sat Jun 08 21:40:27 2013 +0000
+++ b/sys/ufs/lfs/ulfs_quota2.c Sat Jun 08 22:05:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_quota2.c,v 1.5 2013/06/06 00:49:28 dholland Exp $ */
+/* $NetBSD: ulfs_quota2.c,v 1.6 2013/06/08 22:05:15 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.5 2013/06/06 00:49:28 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.6 2013/06/08 22:05:15 dholland Exp $");
#include <sys/buf.h>
#include <sys/param.h>
@@ -51,7 +51,6 @@
#include <ufs/lfs/ulfs_bswap.h>
#include <ufs/lfs/ulfs_extern.h>
#include <ufs/lfs/ulfs_quota.h>
-#include <ufs/lfs/ulfs_wapbl.h>
/*
* LOCKING:
@@ -380,9 +379,6 @@
if (error)
return error;
- if (alloc) {
- ULFS_WAPBL_JLOCK_ASSERT(ump->um_mountp);
- }
ino_ids[ULFS_USRQUOTA] = ip->i_uid;
ino_ids[ULFS_GRPQUOTA] = ip->i_gid;
/* first get the interlock for all dquot */
@@ -594,9 +590,6 @@
if (ump->um_quotas[key->qk_idtype] == NULLVP)
return ENODEV;
- error = ULFS_WAPBL_BEGIN(ump->um_mountp);
- if (error)
- return error;
if (key->qk_id == QUOTA_DEFAULTID) {
mutex_enter(&lfs_dqlock);
@@ -641,7 +634,6 @@
mutex_exit(&dq->dq_interlock);
lfs_dqrele(NULLVP, dq);
out_wapbl:
- ULFS_WAPBL_END(ump->um_mountp);
return error;
}
@@ -720,10 +712,7 @@
error = ENOENT;
goto out_il;
}
- error = ULFS_WAPBL_BEGIN(ump->um_mountp);
- if (error)
- goto out_dq;
-
+
error = getq2e(ump, idtype, dq->dq2_lblkno, dq->dq2_blkoff,
&bp, &q2ep, B_MODIFY);
if (error)
@@ -782,10 +771,8 @@
out_dqlock:
mutex_exit(&lfs_dqlock);
out_wapbl:
- ULFS_WAPBL_END(ump->um_mountp);
out_il:
mutex_exit(&dq->dq_interlock);
-out_dq:
lfs_dqrele(NULLVP, dq);
return error;
}
diff -r 03d4479f9cd8 -r 94cf7f8af84e sys/ufs/lfs/ulfs_readwrite.c
--- a/sys/ufs/lfs/ulfs_readwrite.c Sat Jun 08 21:40:27 2013 +0000
+++ b/sys/ufs/lfs/ulfs_readwrite.c Sat Jun 08 22:05:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_readwrite.c,v 1.2 2013/06/06 00:48:04 dholland Exp $ */
+/* $NetBSD: ulfs_readwrite.c,v 1.3 2013/06/08 22:05:15 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.2 2013/06/06 00:48:04 dholland Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ulfs_readwrite.c,v 1.3 2013/06/08 22:05:15 dholland Exp $");
#ifdef LFS_READWRITE
#define FS struct lfs
@@ -44,9 +44,6 @@
#define WRITE_S "lfs_write"
#define fs_bsize lfs_bsize
#define fs_bmask lfs_bmask
-#define ULFS_WAPBL_BEGIN(mp) 0
-#define ULFS_WAPBL_END(mp) do { } while (0)
-#define ULFS_WAPBL_UPDATE(vp, access, modify, flags) do { } while (0)
#else
#define FS struct fs
#define I_FS i_fs
@@ -186,13 +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_WAPBL_BEGIN(vp->v_mount);
- if (error) {
- fstrans_done(vp->v_mount);
- return error;
- }
error = ULFS_UPDATE(vp, NULL, NULL, UPDATE_WAIT);
- ULFS_WAPBL_END(vp->v_mount);
}
Home |
Main Index |
Thread Index |
Old Index