From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve French" Subject: Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek Date: Mon, 28 Jan 2008 12:33:42 -0600 Message-ID: <524f69650801281033o542e18c5y696dc239b70f1307@mail.gmail.com> References: <20080127317.043953000@suse.de> <200801280538.25345.ak@suse.de> <20080127211345.6e73fa0b.akpm@linux-foundation.org> <200801280917.52574.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Andrew Morton" , "Trond Myklebust" , swhiteho@redhat.com, sfrench@samba.org, vandrove@vc.cvut.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: "Andi Kleen" Return-path: Received: from py-out-1112.google.com ([64.233.166.183]:60872 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753604AbYA1Sdo (ORCPT ); Mon, 28 Jan 2008 13:33:44 -0500 Received: by py-out-1112.google.com with SMTP id u52so2558156pyb.10 for ; Mon, 28 Jan 2008 10:33:44 -0800 (PST) In-Reply-To: <200801280917.52574.ak@suse.de> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Jan 28, 2008 2:17 AM, Andi Kleen wrote: > > 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 :/ If there were a wrapper around reads and writes of f_pos as there is for i_size e.g. it would hit a lot of code, but not as many as I had originally thought. the most important ones are in the vfs itself, where there are only 59 uses of the field (not all need to be changed). ext3 has fewer (25), and cifs only 12 uses. -- Thanks, Steve