Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Revert r1.272 fix to PR kern/52301, the performa...
details: https://anonhg.NetBSD.org/src/rev/7004786ae150
branches: trunk
changeset: 355347:7004786ae150
user: maya <maya%NetBSD.org@localhost>
date: Wed Jul 26 15:07:27 2017 +0000
description:
Revert r1.272 fix to PR kern/52301, the performance hit is making things
unusable.
diffstat:
sys/ufs/lfs/lfs_segment.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (58 lines):
diff -r 82237e48a3b6 -r 7004786ae150 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Wed Jul 26 14:38:59 2017 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Wed Jul 26 15:07:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.272 2017/06/15 14:37:30 maya Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.273 2017/07/26 15:07:27 maya 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_segment.c,v 1.272 2017/06/15 14:37:30 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.273 2017/07/26 15:07:27 maya Exp $");
#ifdef DEBUG
# define vndebug(vp, str) do { \
@@ -603,6 +603,7 @@
SEGUSE *segusep;
int do_ckp, did_ckp, error;
unsigned n, segleft, maxseg, sn, i, curseg;
+ int writer_set = 0;
int dirty;
int redo;
SEGSUM *ssp;
@@ -627,8 +628,6 @@
if (do_ckp)
flags &= ~SEGM_SINGLE;
- lfs_writer_enter(fs, "lfs segwrite");
-
lfs_seglock(fs, flags | (do_ckp ? SEGM_CKP : 0));
sp = fs->lfs_sp;
if (sp->seg_flags & (SEGM_CLEAN | SEGM_CKP))
@@ -654,7 +653,11 @@
break;
}
- if (do_ckp) {
+ if (do_ckp || fs->lfs_dirops == 0) {
+ if (!writer_set) {
+ lfs_writer_enter(fs, "lfs writer");
+ writer_set = 1;
+ }
error = lfs_writevnodes(fs, mp, sp, VN_DIROP);
if (um_error == 0)
um_error = error;
@@ -803,7 +806,8 @@
/* Note Ifile no longer needs to be written */
fs->lfs_doifile = 0;
- lfs_writer_leave(fs);
+ if (writer_set)
+ lfs_writer_leave(fs);
/*
* If we didn't write the Ifile, we didn't really do anything.
Home |
Main Index |
Thread Index |
Old Index