Re: 2.4.21-pre2 stalls out when running unixbench

Stephen C. Tweedie (sct@redhat.com)
06 Jan 2003 13:20:35 +0000


Hi,

On Mon, 2003-01-06 at 12:15, John Bradford wrote:

> What!? I'm suprised that no userspace applications were broken by
> sync returning before the data is safely on oxide, even though it
> doesn't violate the POSIX spec.

sync(2) syncs _everything_ --- every M/O or floppy disk, every
filesystem no matter if it's fat or native Unix. It's way too
heavyweight for most applications which have synchronisation
requirements, when fsync() or O_SYNC are much more precise.

I think I can recall one or two mutterings about people worried about
theoretical risks of doing things like "lilo; sync; reboot", but that's
a different class of risk altogether. (It's complicated by the problem
that after a sync, ext3 guarantees that the data and metadata is on
disk, but it may still be in the journal, so lilo won't necessarily see
the right stuff with sync() alone --- ext3 plays extra tricks when it
sees bmap to try to solve this.)

--Stephen

-
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/