Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs i/o optimization for wapbl flush - only sync sup...
details: https://anonhg.NetBSD.org/src/rev/90f23bb8f7fa
branches: trunk
changeset: 347944:90f23bb8f7fa
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Sep 24 20:59:51 2016 +0000
description:
i/o optimization for wapbl flush - only sync superblock and cgs when
they were actually changed
diffstat:
sys/ufs/ffs/ffs_wapbl.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 106dc00feba8 -r 90f23bb8f7fa sys/ufs/ffs/ffs_wapbl.c
--- a/sys/ufs/ffs/ffs_wapbl.c Sat Sep 24 20:13:48 2016 +0000
+++ b/sys/ufs/ffs/ffs_wapbl.c Sat Sep 24 20:59:51 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_wapbl.c,v 1.30 2015/03/28 19:24:04 maxv Exp $ */
+/* $NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $ */
/*-
* Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.30 2015/03/28 19:24:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $");
#define WAPBL_INTERNAL
@@ -174,6 +174,8 @@
struct fs *fs = ump->um_fs;
int i, error __diagused;
+ UFS_WAPBL_JLOCK_ASSERT(mp);
+
#ifdef WAPBL_DEBUG_INODES
ufs_wapbl_verify_inodes(mp, "ffs_wapbl_sync_metadata");
#endif
@@ -187,10 +189,12 @@
FFS_DBTOFSB(fs, deallocblks[i]), dealloclens[i], -1);
}
- fs->fs_fmod = 0;
- fs->fs_time = time_second;
- error = ffs_cgupdate(ump, 0);
- KASSERT(error == 0);
+ if (fs->fs_fmod != 0) {
+ fs->fs_fmod = 0;
+ fs->fs_time = time_second;
+ error = ffs_cgupdate(ump, 0);
+ KASSERT(error != 0);
+ }
}
void
Home |
Main Index |
Thread Index |
Old Index