Re: Add ioctl for disk cache flush

2016-10-31 Thread Stefan Fritsch
On Sunday, 30 October 2016 19:06:57 CET Theo de Raadt wrote: > > > From: David Gwynne > > > whats the use of the ioctl though? why do we need extra sync cache > > > things? > > > > Right. This smells like papering over real bugs. If there is a power loss or a usb disk

Re: Add ioctl for disk cache flush

2016-10-30 Thread Theo de Raadt
> > From: David Gwynne > > Date: Mon, 31 Oct 2016 10:38:49 +1000 > > > > > On 31 Oct 2016, at 09:18, Stefan Fritsch wrote: > > > > > > On Sun, 30 Oct 2016, Stefan Fritsch wrote: > > >> I agree with all your comments (and should have reviewed the initial >

Re: Add ioctl for disk cache flush

2016-10-30 Thread Mark Kettenis
> From: David Gwynne > Date: Mon, 31 Oct 2016 10:38:49 +1000 > > > On 31 Oct 2016, at 09:18, Stefan Fritsch wrote: > > > > On Sun, 30 Oct 2016, Stefan Fritsch wrote: > >> I agree with all your comments (and should have reviewed the initial patch > >>

Re: Add ioctl for disk cache flush

2016-10-30 Thread Stefan Fritsch
On Sun, 30 Oct 2016, Stefan Fritsch wrote: > I agree with all your comments (and should have reviewed the initial patch > better). Here is an updated diff. The FWRITE check was missing in wdioctl(). Next try: diff --git sys/dev/ata/wd.c sys/dev/ata/wd.c index 5e2461f..ca5ac90 100644 ---

Re: Add ioctl for disk cache flush

2016-10-30 Thread Stefan Fritsch
On Mon, 17 Oct 2016, Alexander Bluhm wrote: > > Part 1: Add an ioctl: > > > > > > add DIOCCACHESYNC > > > > Add an ioctl to tell storage devices to flush their internal caches. > > Ported from netbsd by pedro@ > > > > OK? > > Some remarks inline Sorry for the long delay, I was very busy

Re: Add ioctl for disk cache flush

2016-10-17 Thread Alexander Bluhm
On Sun, Oct 16, 2016 at 10:19:53AM +0200, Stefan Fritsch wrote: > On Sun, 16 Oct 2016, Stefan Fritsch wrote: > > * When a R/W mount is updated to R/O. I will send patches for this in a > > separate mail. > > Part 1: Add an ioctl: > > > add DIOCCACHESYNC > > Add an ioctl to tell storage

Add ioctl for disk cache flush

2016-10-16 Thread Stefan Fritsch
On Sun, 16 Oct 2016, Stefan Fritsch wrote: > * When a R/W mount is updated to R/O. I will send patches for this in a > separate mail. Part 1: Add an ioctl: add DIOCCACHESYNC Add an ioctl to tell storage devices to flush their internal caches. Ported from netbsd by pedro@ OK? diff --git