From: Andi Kleen Subject: Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek Date: Mon, 28 Jan 2008 09:17:52 +0100 Message-ID: <200801280917.52574.ak@suse.de> References: <20080127317.043953000@suse.de> <200801280538.25345.ak@suse.de> <20080127211345.6e73fa0b.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Trond Myklebust , Steve French , swhiteho@redhat.com, sfrench@samba.org, vandrove@vc.cvut.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Andrew Morton Return-path: Received: from ns2.suse.de ([195.135.220.15]:43272 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbYA1ITU (ORCPT ); Mon, 28 Jan 2008 03:19:20 -0500 In-Reply-To: <20080127211345.6e73fa0b.akpm@linux-foundation.org> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > I completely agree. If one thread writes A and another writes B then the > kernel should record either A or B, not ((A & 0xffffffff00000000) | (B & > 0xffffffff)) The problem is pretty nasty unfortunately. To solve it properly I think the file_operations->read/write prototypes would need to be changed because otherwise it is not possible to do atomic relative updates of f_pos. Right now the actual update is burrowed deeply in the low level read/write implementation. But that would be a huge impact all over the tree :/ Or maybe define a new read/write64 and keep the default as 32bit only-- i suppose most users don't really need 64bit. Still would be a nasty API change. -Andi