Opened 12 years ago

Closed 9 years ago

#434 closed defect (fixed)

USB mass storage writes not flushed

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.6.0
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:


It has been reported that when you mount a file system on a USB stick, modify it and then unmount (offline?) and pull it out, some or all of the modifications do not persist on the media.

Need to investigate this. Could be there is some write cache in the stick controller that needs to be flushed somehow, either via a SCSI command or on the USB or USB-MS layer.

If this is a SCSI command, it might be useful to do the flush when the file system is unmounted, rather when the device is offlined. This would mean either doing it when the file system closes the block device or extending the block device interface with a flush method.

Change History (3)

comment:1 by Jakub Jermář, 12 years ago


Based on the 0.5.0 release bug court ruling, retargetting to 0.5.1.

comment:2 by Jiri Svoboda, 12 years ago

From SCSI SBC perspective the direct-access block device is allowed to use a non-volatile write-back cache by default. It is possible to disable write-back for individual writes (FUA, SYNC_NV). It is also possible to flush the writes using the Synchronize Cache (10, 16) commands. It would be a good idea to perform Synchronize Cache as part of unmounting a file system (synchronously or asynchronously?)

comment:3 by Jiri Svoboda, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in mainline,2188. libblock issues a synchronous sync cache command as part of block_fini().

Note: See TracTickets for help on using tickets.