From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761814AbYDPIOu (ORCPT ); Wed, 16 Apr 2008 04:14:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752708AbYDPIOg (ORCPT ); Wed, 16 Apr 2008 04:14:36 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.31.123]:51373 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752176AbYDPIOe (ORCPT ); Wed, 16 Apr 2008 04:14:34 -0400 Date: Wed, 16 Apr 2008 10:15:23 +0200 From: Pavel Machek To: Peter Zijlstra Cc: Lennart Sorensen , Jan Kara , Bodo Eggert <7eggert@gmx.de>, Diego Calleja , Jiri Kosina , Michal Hocko , Meelis Roos , Linux Kernel list , linux-fsdevel@vger.kernel.org Subject: Re: file offset corruption on 32-bit machines? Message-ID: <20080416081523.GB5105@elf.ucw.cz> References: <20080414190308.GJ15824@duck.suse.cz> <20080414192928.GM7385@csclub.uwaterloo.ca> <20080415085740.GA7603@atrey.karlin.mff.cuni.cz> <20080415153221.GD7387@csclub.uwaterloo.ca> <20080415173430.GB4994@elf.ucw.cz> <20080415182453.GR7385@csclub.uwaterloo.ca> <20080415191238.GC4994@elf.ucw.cz> <20080415194922.GT7385@csclub.uwaterloo.ca> <20080415200647.GF4994@elf.ucw.cz> <1208291336.7053.16.camel@lappy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1208291336.7053.16.camel@lappy> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2008-04-15 22:28:55, Peter Zijlstra wrote: > On Tue, 2008-04-15 at 22:06 +0200, Pavel Machek wrote: > > > > > I'm not saying this kernel bug is likely to hit in practice. It is > > > > still a kernel bug. > > > > > > > > Is the slowdown of lseek worth getting rid of this minor bug? Not > > > > sure, probably yes. > > > > > > I think a slow down is the worse choice. Adding a note to the > > > documentation saying that "By the way, on 32bit systems the seek call is > > > not atomic for 64bit file offsets, so if you happen to issue two at > > > > That would be very wrong addition to documentation. If you really > > wanted to do something like this, you would probably want to say > > something like > > > > "Doing concurrent seeks on one file is undefined. Kernel may end up > > with seeking to some other place." > > > > Unfortunately, you'd have to get this addition into POSIX standard... > > Is not treating the point not similar to undefined? And undefined > semantics cover pretty much anything, including the current behaviour. > > FWIW I really think this issue is a non-issue; one cannot expect sane > behaviour of unsynchronized usage of a shared resource. Why not? Kernel syscalls are traditionally atomic, and Lennard seems to have found sentence in POSIX that says so. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html