Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Fix missing <sys/evcnt.h> by removing the evcnts...
details: https://anonhg.NetBSD.org/src/rev/681a444812ad
branches: trunk
changeset: 969583:681a444812ad
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 23 15:23:08 2020 +0000
description:
Fix missing <sys/evcnt.h> by removing the evcnts instead.
Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.
diffstat:
sys/ufs/lfs/lfs_subr.c | 12 +++---------
sys/ufs/lfs/lfs_vnops.c | 12 +++---------
2 files changed, 6 insertions(+), 18 deletions(-)
diffs (82 lines):
diff -r 29c0783ad711 -r 681a444812ad sys/ufs/lfs/lfs_subr.c
--- a/sys/ufs/lfs/lfs_subr.c Sun Feb 23 15:12:18 2020 +0000
+++ b/sys/ufs/lfs/lfs_subr.c Sun Feb 23 15:23:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $ */
+/* $NetBSD: lfs_subr.c,v 1.102 2020/02/23 15:23:08 riastradh 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_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.102 2020/02/23 15:23:08 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -337,10 +337,6 @@
static void lfs_unmark_dirop(struct lfs *);
-static struct evcnt lfs_dchain_marker_pass_dirop =
- EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "lfs", "dchain marker pass dirop");
-EVCNT_ATTACH_STATIC(lfs_dchain_marker_pass_dirop);
-
static void
lfs_unmark_dirop(struct lfs *fs)
{
@@ -371,10 +367,8 @@
TAILQ_REMOVE(&fs->lfs_dchainhd, marker, i_lfs_dchain);
TAILQ_INSERT_AFTER(&fs->lfs_dchainhd, ip, marker,
i_lfs_dchain);
- if (ip->i_state & IN_MARKER) {
- lfs_dchain_marker_pass_dirop.ev_count++;
+ if (ip->i_state & IN_MARKER)
continue;
- }
vp = ITOV(ip);
if ((ip->i_state & (IN_ADIROP | IN_CDIROP)) == IN_CDIROP) {
--lfs_dirvcount;
diff -r 29c0783ad711 -r 681a444812ad sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Sun Feb 23 15:12:18 2020 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Sun Feb 23 15:23:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.330 2020/02/23 15:23:08 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.330 2020/02/23 15:23:08 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1595,10 +1595,6 @@
return VOP_STRATEGY(vp, bp);
}
-static struct evcnt lfs_dchain_marker_pass_flush =
- EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "lfs", "dchain marker pass flush");
-EVCNT_ATTACH_STATIC(lfs_dchain_marker_pass_flush);
-
/*
* Inline lfs_segwrite/lfs_writevnodes, but just for dirops.
* Technically this is a checkpoint (the on-disk state is valid)
@@ -1662,10 +1658,8 @@
TAILQ_REMOVE(&fs->lfs_dchainhd, marker, i_lfs_dchain);
TAILQ_INSERT_AFTER(&fs->lfs_dchainhd, ip, marker,
i_lfs_dchain);
- if (ip->i_state & IN_MARKER) {
- lfs_dchain_marker_pass_flush.ev_count++;
+ if (ip->i_state & IN_MARKER)
continue;
- }
vp = ITOV(ip);
/*
Home |
Main Index |
Thread Index |
Old Index