Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Restrict the run of cluster blocks to on-disk co...
details: https://anonhg.NetBSD.org/src/rev/0aedf63fe9ab
branches: trunk
changeset: 546473:0aedf63fe9ab
user: perseant <perseant%NetBSD.org@localhost>
date: Tue Apr 29 17:45:11 2003 +0000
description:
Restrict the run of cluster blocks to on-disk contiguous blocks (back out
part of rev 1.115), to avoid writing over holes. This is the lesser of two
evils, to be replaced soon.
diffstat:
sys/ufs/lfs/lfs_vfsops.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 38e0afeef5c9 -r 0aedf63fe9ab sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Tue Apr 29 17:22:01 2003 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Tue Apr 29 17:45:11 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.115 2003/04/23 07:20:38 perseant Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.116 2003/04/29 17:45:11 perseant Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.115 2003/04/23 07:20:38 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.116 2003/04/29 17:45:11 perseant Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -1898,9 +1898,13 @@
break;
}
- iobytes = MIN(MAXPHYS, bytes);
+ /*
+ * XXX this finds holes for us, but it also doesn't cluster
+ * XXX pages which are not already contiguous on disk.
+ */
+ iobytes = MIN((((off_t)lbn + 1 + run) << fs_bshift) - offset,
+ bytes);
if (blkno == (daddr_t)-1) {
- iobytes = MIN(fs->lfs_bsize, bytes);
skipbytes += iobytes;
continue;
}
Home |
Main Index |
Thread Index |
Old Index