NetBSD-Bugs archive

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

kern/53468: chfs unmount corrupts the flash contents



>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@localhost:/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:



Home | Main Index | Thread Index | Old Index