Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263368AbTH0MwM (ORCPT ); Wed, 27 Aug 2003 08:52:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263374AbTH0MwM (ORCPT ); Wed, 27 Aug 2003 08:52:12 -0400 Received: from ip213-185-36-189.laajakaista.mtv3.fi ([213.185.36.189]:59964 "EHLO oma.irssi.org") by vger.kernel.org with ESMTP id S263368AbTH0MwK (ORCPT ); Wed, 27 Aug 2003 08:52:10 -0400 Subject: Re: Lockless file reading From: Timo Sirainen To: Martin Konold Cc: linux-kernel@vger.kernel.org In-Reply-To: <200308271442.48672.martin.konold@erfrakon.de> References: <1061987837.1455.107.camel@hurina> <200308271442.48672.martin.konold@erfrakon.de> Content-Type: text/plain Message-Id: <1061988729.1457.115.camel@hurina> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Wed, 27 Aug 2003 15:52:09 +0300 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 776 Lines: 22 On Wed, 2003-08-27 at 15:42, Martin Konold wrote: > > 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. So it's not such a good idea then? Hmh.. That'd solve a lot of problems for me. > > 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. It doesn't matter when it's actually written to disk, if it's only seen by read(). - 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/