Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Do not truncate the size of the vnd, as that will ca...



details:   https://anonhg.NetBSD.org/src/rev/bdb11084e4f3
branches:  trunk
changeset: 534757:bdb11084e4f3
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Aug 02 14:43:32 2002 +0000

description:
Do not truncate the size of the vnd, as that will cause lossage with
images with sizes that are not multiples of 1MB.  Fix as proposed by me on
tech-kern, and ok'ed by Christos.

diffstat:

 sys/dev/vnd.c |  11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diffs (32 lines):

diff -r 8a25c2409b40 -r bdb11084e4f3 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Fri Aug 02 14:35:49 2002 +0000
+++ b/sys/dev/vnd.c     Fri Aug 02 14:43:32 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.83 2002/07/26 06:16:32 enami Exp $   */
+/*     $NetBSD: vnd.c,v 1.84 2002/08/02 14:43:32 oster Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.83 2002/07/26 06:16:32 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.84 2002/08/02 14:43:32 oster Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "fs_nfs.h"
@@ -830,13 +830,6 @@
                        geomsize = 32 * 64 * vnd->sc_geom.vng_ncylinders;
                }
 
-               /*
-                * Truncate the size to that specified by
-                * the geometry.
-                * XXX Should we even bother with this?
-                */
-               vnd->sc_size = geomsize;
-
                if ((error = vndsetcred(vnd, p->p_ucred)) != 0)
                        goto close_and_exit;
                vndthrottle(vnd, vnd->sc_vp);



Home | Main Index | Thread Index | Old Index