Re: Lockless file reading

From: Martin Konold
Date: Wed Aug 27 2003 - 07:49:52 EST


Am Wednesday 27 August 2003 02:37 pm schrieb Timo Sirainen:

Hi,

> The question is what can happen if I read() a file that's being
> simultaneously updated by a write() in another process?

The behaviour is undefined.

> 123 over XXX, is it possible that read() returns 1X3 in some conditions?

Yes. The actual order stuff is written to the disk is not guaranteed.

Regards,
-- martin

Dipl.-Phys. Martin Konold
e r f r a k o n
Erlewein, Frank, Konold & Partner - Beratende Ingenieure und Physiker
Nobelstrasse 15, 70569 Stuttgart, Germany
fon: 0711 67400963, fax: 0711 67400959
email: martin.konold@xxxxxxxxxxx

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