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

Simon Glass sjg at chromium.org
Thu Jun 4 19:01:39 CEST 2026


Hi Sean,

On Wed, 3 Jun 2026 at 11:43, Sean Anderson <seanga2 at gmail.com> wrote:
>
> 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.

This is actually for a device-level flush, so more like a Linux 'sync'
than just a write. If the hardware supports / requires it, then it
seems valuable to me.

Regards,
Simon


More information about the U-Boot mailing list