Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libkvm only do bounce buffering for character devices.



details:   https://anonhg.NetBSD.org/src/rev/29646f960a4f
branches:  trunk
changeset: 1008000:29646f960a4f
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Mar 08 00:06:42 2020 +0000

description:
only do bounce buffering for character devices.

diffstat:

 lib/libkvm/kvm.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 1849de9e8168 -r 29646f960a4f lib/libkvm/kvm.c
--- a/lib/libkvm/kvm.c  Sun Mar 08 00:04:11 2020 +0000
+++ b/lib/libkvm/kvm.c  Sun Mar 08 00:06:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $    */
+/*     $NetBSD: kvm.c,v 1.105 2020/03/08 00:06:42 chs Exp $    */
 
 /*-
  * Copyright (c) 1989, 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)kvm.c      8.2 (Berkeley) 2/13/94";
 #else
-__RCSID("$NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $");
+__RCSID("$NetBSD: kvm.c,v 1.105 2020/03/08 00:06:42 chs Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -352,7 +352,12 @@
                        /* swap is not configured?  not fatal */
                }
        } else {
-               kd->fdalign = DEV_BSIZE;        /* XXX */
+               if (S_ISCHR(st.st_mode)) {
+                       kd->fdalign = DEV_BSIZE;
+               } else {
+                       kd->fdalign = 1;
+               }
+
                /*
                 * This is a crash dump.
                 * Initialize the virtual address translation machinery.



Home | Main Index | Thread Index | Old Index