NetBSD Problem Report #53468

From  Tue Jul 24 09:22:13 2018
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 776A67A104
	for <>; Tue, 24 Jul 2018 09:22:13 +0000 (UTC)
Message-Id: <>
Date: Tue, 24 Jul 2018 09:22:12 +0000 (UTC)
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
NetBSD localhost 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 i386


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

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


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.