NetBSD Problem Report #18116
Received: (qmail 19732 invoked by uid 605); 30 Aug 2002 10:18:11 -0000
Message-Id: <20020830101809.F186911122@narn.netbsd.org>
Date: Fri, 30 Aug 2002 03:18:09 -0700 (PDT)
From: manu@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: manu@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: vnd driver flush to target file is broken
X-Send-Pr-Version: www-1.0
>Number: 18116
>Category: kern
>Synopsis: vnd driver flush to target file is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 30 10:19:00 +0000 2002
>Closed-Date:
>Last-Modified: Sun Sep 24 10:21:29 +0000 2006
>Originator: Emmanuel Dreyfus
>Release: NetBSD-1.5.3
>Organization:
The NetBSD Project
>Environment:
NetBSD crapulax 1.5.3 NetBSD 1.5.3 (GENERIC) #34: Mon Jul 1 21:36:06 CEST 2002 he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
When the vnd driver is used on a file, the file is not updated after the umounc, not after the vnconfig -u. sync does not help.
The problem also exists on the 1.6 branch.
>How-To-Repeat:
#!/bin/sh
vnconfig -u /dev/vndO
rm -f /tmp/ramdisk /tmp/ramdisk2
dd if=/dev/zero of=/tmp/ramdisk bs=1k count=8192
md5 /tmp/ramdisk
vnconfig /dev/vnd0 /tmp/ramdisk
export EDITOR=/bin/ed
disklabel -I -e /dev/vnd0 << EOT
/^ b:/
d
d
d
>Fix:
>Release-Note:
>Audit-Trail:
From: manu@netbsd.org (Emmanuel Dreyfus)
To: gnats-bugs@netbsd.org
Cc: jrf@adresearch.com (Jason R. Fink)
Subject: kern/18116 vnd driver flush to target file is broken
Date: Thu, 31 Oct 2002 22:17:47 +0100
The script demonstrating the problem was not complete:
#!/bin/sh
vnconfig -u /dev/vnd0c
rm -f /tmp/ramdisk /tmp/ramdisk2
dd if=/dev/zero of=/tmp/ramdisk bs=1k count=8192
md5 /tmp/ramdisk
vnconfig /dev/vnd0c /tmp/ramdisk
export EDITOR=/bin/ed
disklabel -I -e /dev/vnd0c << EOT
/^ b:/
d
d
d
d
w
Q
EOT
newfs /dev/vnd0a
echo "done newfs"
md5 /tmp/ramdisk
mount /dev/vnd0a /mnt
echo "done mount"
md5 /tmp/ramdisk
cp /etc/passwd /mnt/
echo "done copy to ramdisk"
md5 /tmp/ramdisk
umount /mnt
echo "done umount"
md5 /tmp/ramdisk
vnconfig -u /dev/vnd0c
echo "done vnconfig"
md5 /tmp/ramdisk
cp /tmp/ramdisk /tmp/ramdisk2
echo "done ramdisk copy"
md5 /tmp/ramdisk
md5 /tmp/ramdisk2
vnconfig /dev/vnd0c /tmp/ramdisk
echo "done vnconfig again"
md5 /tmp/ramdisk
md5 /tmp/ramdisk2
vnconfig -u /dev/vnd0c
echo "done vnconfig -u again"
md5 /tmp/ramdisk
md5 /tmp/ramdisk2
The script output:
vnconfig: /dev/vnd0c: VNDIOCCLR: Device not configured
8192+0 records in
8192+0 records out
8388608 bytes transferred in 6.421 secs (1306433 bytes/sec)
MD5 (/tmp/ramdisk) = 96995b58d4cbf6aaa9041b4f00c7f6ae
605
?
/dev/vnd0a: 16384 sectors in 8 cylinders of 64 tracks, 32 sectors
8.0MB in 1 cyl groups (11 c/g, 11.00MB/g, 3936 i/g)
super-block backups (for fsck -b #) at:
32,
done newfs
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
done mount
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
done copy to ramdisk
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
done umount
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
done vnconfig
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
done ramdisk copy
MD5 (/tmp/ramdisk) = 11ecac090203cfb8b7627cc6cd5aff79
MD5 (/tmp/ramdisk2) = 11ecac090203cfb8b7627cc6cd5aff79
done vnconfig again
MD5 (/tmp/ramdisk) = ff9a01968ac924777369f09f53c053df
MD5 (/tmp/ramdisk2) = 11ecac090203cfb8b7627cc6cd5aff79
done vnconfig -u again
MD5 (/tmp/ramdisk) = ff9a01968ac924777369f09f53c053df
MD5 (/tmp/ramdisk2) = 11ecac090203cfb8b7627cc6cd5aff79
--
Emmanuel Dreyfus.
manu@netbsd.org
State-Changed-From-To: open->feedback
State-Changed-By: mrg@netbsd.org
State-Changed-When: Sun, 24 Sep 2006 05:48:37 +0000
State-Changed-Why:
is this still a problem with -current?
From: manu@netbsd.org (Emmanuel Dreyfus)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, mrg@netbsd.org
Cc:
Subject: Re: kern/18116 (vnd driver flush to target file is broken)
Date: Sun, 24 Sep 2006 09:14:08 +0200
<mrg@netbsd.org> wrote:
> Synopsis: vnd driver flush to target file is broken
>
> State-Changed-From-To: open->feedback
> State-Changed-By: mrg@netbsd.org
> State-Changed-When: Sun, 24 Sep 2006 05:48:37 +0000
> State-Changed-Why:
> is this still a problem with -current?
Yes, it is. Please re-open that PR.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@netbsd.org
State-Changed-From-To: feedback->open
State-Changed-By: elad@netbsd.org
State-Changed-When: Sun, 24 Sep 2006 10:21:29 +0000
State-Changed-Why:
submitter says bug is still there, re-open at his request
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.