Sergey Bugaev, le jeu. 15 juin 2023 11:52:24 +0300, a ecrit:
> On Thu, Jun 15, 2023 at 2:14 AM Samuel Thibault <samuel.thiba...@gnu.org> 
> wrote:
> > > So the installed system is not to blame, it must be that the installer
> > > is corrupting the FS somehow.
> >
> > Possibly some missing disk cache flush. I believe we have done fixes
> > there in the past, but possibly some things are still missing...
> 
> Hmm, I might be looking in the wrong places for it, but where does
> disk flushing happen at all?

I thought we had it somewhere, but I don't find it either (no 0xE7
or 0xEA in linux/src/include/linux/hdreg.h). It could be called from
host_reboot() at least.

> What I can see from looking through the source is: sync(1) or whatever
> -> fsys_syncfs -> diskfs_sync_everything -> pager_sync ->
> file_pager_write_page -> pending_blocks_write -> store_write ->
> device_write -> (*dev->emul_ops->write) -> (*bd->ds->fops->write) ->
> block_write

The device interface itself would need to get an additionnal RPC to
trigger such a flush. Then libstore support it, libpager support it,
etc.

That being said, in principle a machine reboot shouldn't require such
flush? When a DMA write is reported as done, the device should be
supposed actually write data even if another OS instance comes up?

> > Or perhaps.
> 
> (truncated message?)

No, I was thinking about something but eventually dropped it but missed
dropping that part.

Samuel

Reply via email to