Re: RFC: one solution to sys_sync livelock fix

From: Bill Davidsen (davidsen@tmr.com)
Date: Sun Feb 17 2002 - 07:36:36 EST


On Fri, 15 Feb 2002, Stephen C. Tweedie wrote:

> On Wed, Feb 13, 2002 at 05:37:42PM -0500, Bill Davidsen wrote:
>
> > What would happen if the sync(2) call from a non-root user were treated as
> > if it were an fsync(2) call on every file open for write?
>
> Then you'd lose writes for files you have written to but since
> closed; and you'd seriously hurt the users of journaling filesystems
> who assume you can "sync" as an unprivileged user and then turn power
> off.

My first thought is that people who do that are going to lose data anyway
if they leave processes writing, since there is pleanty of time between
human perception of the sync ending and the actual power dropping.

And I bet in most cases they don't actually wait for it to come back, or
they would be seeing the long delays which are the symptom of livelock. I
suspect they hit ENTER and then the power switch, something not even the
current sync can help.

I can't see why people would do that anyway, shutdown only take 4-5 sec,
except on Redhat where it sings and dances for ages. I just tried a
Slackware shutdown, 4 sec from ENTER to lights out, less than the five sec
timeout on holding the power switch to force it down.

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:12 EST