[PATCH v2 4/6] cmd: Add flush support for all blk devices

Sean Anderson seanga2 at gmail.com
Wed Jun 3 19:43:10 CEST 2026


On 5/28/26 23:44, dmukhin at ford.com wrote:
> From: Denis Mukhin <dmukhin at ford.com>
> 
> Introduce `flush` subcommand for all blk devices to allow committing
> dirty data explicitly to the given block device.

Shouldn't this be done automatically as part of blk_write? Similar to
how all FS operations in U-Boot look like

- Mount FS
- Perform operation
- Unmount FS

so the FS is never in an inconsistent state once an operation completes.

Is the performance impact too much? I'm just concerned that a lot of
existing code assumes that blk_write is persistent and that it's OK
to e.g. immediately reset after blk_write returns.

--Sean


More information about the U-Boot mailing list