> > From: David Gwynne <da...@gwynne.id.au> > > Date: Mon, 31 Oct 2016 10:38:49 +1000 > > > > > On 31 Oct 2016, at 09:18, Stefan Fritsch <s...@sfritsch.de> wrote: > > > > > > 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: > > > > the diff looks fine to me. > > > > whats the use of the ioctl though? why do we need extra sync cache things? > > Right. This smells like papering over real bugs.
Here's the thoughts I have exchanged with sf. This issue should not be per filesystem, not even per partition. It seems this should keep track of when any partition converts from RW -> R access (either via direct open, or via mount), and if so schedule the required sync operation (to occur sometime soon). That way if many such RW->R transitions occur, they won't serialize and create a performance hit. Furthermore I don't believe userland should have access to this. We've made it 30 years without needing this, why do we need it now.