Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern rev.1.55 didn't handle BUFQ_SORT_CYLINDER case corr...
details: https://anonhg.NetBSD.org/src/rev/ce2a57f60241
branches: trunk
changeset: 556044:ce2a57f60241
user: yamt <yamt%NetBSD.org@localhost>
date: Sat Dec 06 17:23:22 2003 +0000
description:
rev.1.55 didn't handle BUFQ_SORT_CYLINDER case correctly.
pointed by Juergen Hannken-Illjes. patch provided by him.
diffstat:
sys/kern/subr_disk.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 2231cccb8b5b -r ce2a57f60241 sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c Sat Dec 06 17:04:50 2003 +0000
+++ b/sys/kern/subr_disk.c Sat Dec 06 17:23:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk.c,v 1.56 2003/12/06 01:21:23 he Exp $ */
+/* $NetBSD: subr_disk.c,v 1.57 2003/12/06 17:23:22 yamt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.56 2003/12/06 01:21:23 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.57 2003/12/06 17:23:22 yamt Exp $");
#include "opt_compat_netbsd.h"
@@ -496,10 +496,13 @@
if (bp == NULL || bq == NULL)
return (bq == NULL);
- if (sortby == BUFQ_SORT_CYLINDER && bp->b_cylinder < bq->b_cylinder)
- return 1;
-
- return (bp->b_rawblkno < bq->b_rawblkno);
+ if (sortby == BUFQ_SORT_CYLINDER) {
+ if (bp->b_cylinder != bq->b_cylinder)
+ return bp->b_cylinder < bq->b_cylinder;
+ else
+ return bp->b_rawblkno < bq->b_rawblkno;
+ } else
+ return bp->b_rawblkno < bq->b_rawblkno;
}
Home |
Main Index |
Thread Index |
Old Index