From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: Race between __sync_single_inode() and LogFS garbage collector Date: Mon, 19 Feb 2007 23:23:51 +0000 Message-ID: <20070219232351.GG7813@lazybastard.org> References: <20070219213150.GD7813@lazybastard.org> <1171926356.9771.34.camel@kleikamp.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: Dave Kleikamp Return-path: Received: from lazybastard.de ([212.112.238.170]:48085 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965535AbXBSX1q (ORCPT ); Mon, 19 Feb 2007 18:27:46 -0500 Content-Disposition: inline In-Reply-To: <1171926356.9771.34.camel@kleikamp.austin.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 19 February 2007 17:05:55 -0600, Dave Kleikamp wrote: >=20 > It'd be nice if you could drop s_w_mutex when the garbage collector > calls i_get(). Not possible. Garbage collection only happens when space is getting tight. At that moment all writes must be serialized or this race will be the least of my problems. :( > Otherwise, you may be able to call ilookup5_nowait() in the garbage > collector, and skip that inode if I_LOCK is set. Also not possible. I cannot skip that inode, or again this race will b= e a minor problem. The inode exists on the medium and I must get it by some means. Re-reading it from the medium is fine, writing is not and waiting for the write to happen brings me back to square one. It is a nasty problem that has been haunting me for about a year now. =46or a while I tried ilookup5_nowait() and just used the inode in spit= e of the lock. But that will explode spectacularly when racing against generic_drop_inode(). Double-caching or a common lock seem to be the only solutions. J=C3=B6rn --=20 My second remark is that our intellectual powers are rather geared to master static relations and that our powers to visualize processes evolving in time are relatively poorly developed. -- Edsger W. Dijkstra - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html