[moving to tech@]
On Tuesday, 20 September 2016 08:03:32 CEST Stefan Fritsch wrote:
> On Tue, 20 Sep 2016, Darren Tucker wrote:
> > On Tue, Sep 20, 2016 at 1:43 AM, Jan Stary <h...@stare.cz> wrote:
> > > This is current/i386 on an ALIX.1E (demsg below).
> > > I have an USB disk connected for /backup.
> > >
> > > Upon every reboot, the filesystem on that disk is dirty:
> > > WARNING: R/W mount of /backup denied. Filesystem is not clean - run
> > > fsck
> > I saw something similar on an APU where the root disk was on
> > (USB-attached) sdcard:
> > http://marc.info/?l=openbsd-misc&m=144237305322074&w=2
> > It seems to be a race. There used to be a 4sec pause in the kernel
> > that was removed:
> > """
> > Remove 4 second delay on reboot/shutdown that was added 8 years
> > ago to "workaround MP timeout/splhigh/scsi race at reboot time".
> > """
> I think before we re-add some arbitrary delays, we should check if we are
> actually sending an explicit cache flush command to the disk controllers.
> I have some code somewhere that does this for umount and mount -ur. I will
> look for it and send it to tech@, but probably not today.
I found a few cases, where we should send a cache flush but don't.
Unfortunately, none of these cases explain the problem seen by Jan and Darren.
The cases I have found are:
* When a R/W mount is updated to R/O. I will send patches for this in a
* When a R/W mount is unmounted but there is still another partition from the
same disk mounted.
* When sync(2) is called. Though I am not 100% sure if we really want to do a
cache flush for every sync. Thoughts?
For the usb disk issue, some more debugging is necessary.