NetBSD Problem Report #53468
From www@NetBSD.org Tue Jul 24 09:22:13 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 776A67A104
for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Jul 2018 09:22:13 +0000 (UTC)
Message-Id: <20180724092212.65C6E7A1E5@mollari.NetBSD.org>
Date: Tue, 24 Jul 2018 09:22:12 +0000 (UTC)
From: mariusz.a.ptak@gmail.com
Reply-To: mariusz.a.ptak@gmail.com
To: gnats-bugs@NetBSD.org
Subject: chfs unmount corrupts the flash contents
X-Send-Pr-Version: www-1.0
>Number: 53468
>Category: kern
>Synopsis: chfs unmount corrupts the flash contents
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 24 09:25:00 +0000 2018
>Originator: Mariusz Ptak
>Release: 8.0
>Organization:
>Environment:
NetBSD localhost 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
Hi
There's a problem with CHFS filesystem driver. Seems that unmounting the flash device corrupts its contents.
Ex. I copied some file of 700000 bytes to mounted flash, until unmounting the device, the file is correct, the md5 sum of the origin and the copy is the same, diff shows nothing.
After unmounting and mounting again, the file on the flash can not be checked with md5 - there's input/output error. The file size is ok, but the source and copy on the flash differ.
The free used / free sizes on the flash differ before unmounting and remounting.
Best regards
Mariusz
>How-To-Repeat:
1. mount -t chfs /dev/flash0 /mnt/
2. cp [some file, 700000 bytes large] /mnt/
3. df -h
localhost# df -h /mnt/
Filesystem Size Used Avail %Cap Mounted on
/dev/flash0 31M 744K 29M 2% /mnt
4. umount /mnt/
5. mount -t chfs /dev/flash0 /mnt/
6. df -h /mnt/
Filesystem Size Used Avail %Cap Mounted on
/dev/flash0 31M 248K 30M 0% /mnt
>Fix:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.