From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Fix ext2 error reporting on fsync Date: Wed, 18 Jan 2006 15:06:46 -0800 Message-ID: <20060118150646.7514ba5f.akpm@osdl.org> References: <20060111174302.GD16728@atrey.karlin.mff.cuni.cz> <20060112142656.GB14235@atrey.karlin.mff.cuni.cz> <20060112124717.6e242802.akpm@osdl.org> <200601122108.55103.mason@suse.com> <20060112181628.63c4bf39.akpm@osdl.org> <20060118224652.GA6434@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mason@suse.com, linux-fsdevel@vger.kernel.org Return-path: Received: from smtp.osdl.org ([65.172.181.4]:28103 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1030438AbWARXHH (ORCPT ); Wed, 18 Jan 2006 18:07:07 -0500 To: Jan Kara In-Reply-To: <20060118224652.GA6434@atrey.karlin.mff.cuni.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Jan Kara wrote: > > > It's not much complexity: a few set_bits and test_and_clear_bits in three > > places. The main drawback is a larger buffer_head. > > > > Yeah, it's a pita, but it is a data-integrity correctness thing. > There's a way to avoid the extra pointer in buffer_head: we could > change the circular linked list b_assoc_buffers to a non-circular one > (probably use hlists). Then if we find a buffer with IO error, we could > find a list head and from it compute the pointer to the mapping... It > would not be fast but on IO error I think we could afford it. Do you think > it's a good idea? I don't understand. We have a pointer to a buffer_head against the blockdev mapping and we want to find, from that, the S_ISREG address_space which has connected that buffer to itself. Precisely how are you proposing that we do that? (If you're saying that the hlist space saving would allow us to add an address_space* pointer to the bh at no space cost then yes). (If you're proposing that we walk the buffer_head list until we somehow find the list_head or hlist_head which is embedded within the desired address_space then yes2, but how do we know where to terminate the search?)