Re: [patch] sys_sync livelock fix

From: Andrew Morton (akpm@zip.com.au)
Date: Wed Feb 13 2002 - 19:37:57 EST


Daniel Phillips wrote:
>
> On February 13, 2002 11:24 pm, Bill Davidsen wrote:
> > ...
> > It doesn't matter, if you write the existing dirty buffers the filesystem
> > type is irrelevant.
>
> Incorrect. The modern crop of filesystems has the concept of consistency
> points, and data written after a consistency point is irrelevant except to the
> next consistency point. IOW, it's often ok to leave some buffers dirty on a
> sync. But for a dumb filesystem you just have to guess at what's needed for
> a consistency point, and the best guess is 'whatever's dirty at the time of
> sync'.
>
> For metadata-only journalling the issues get more subtle and we need a ruling
> from the ext3 guys.

The current implementation of fsync_dev is about as good as
it'll get for journal=writeback mode - write the data,
run a commit, write the data again then wait on it all.

>
> Sorry, I don't see the connection to sync.

I don't understand the whole thread :)

The patch I sent yesterday, which is at
http://www.zip.com.au/~akpm/linux/2.4/2.4.18-pre9/sync_livelock.patch
provides sensible and safe sync semantics, and avoids livelock.

It'd be good if someone else could, like, apply and test it, rather
than sending out all this email and stuff.

-
-
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 : Fri Feb 15 2002 - 21:00:58 EST