From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [RFC 0/5] dio: clean up completion phase of direct_io_worker() Date: Wed, 06 Sep 2006 14:13:14 -0400 Message-ID: References: <20060905235732.29630.3950.sendpatchset@tetsuo.zabbo.net> <44FEFB5A.7060905@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-kernel@vger.kernel.org Return-path: Received: from mx1.redhat.com ([66.187.233.31]:63892 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1751479AbWIFSNZ (ORCPT ); Wed, 6 Sep 2006 14:13:25 -0400 To: Zach Brown In-Reply-To: <44FEFB5A.7060905@oracle.com> (Zach Brown's message of "Wed, 06 Sep 2006 09:46:18 -0700") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org ==> Regarding Re: [RFC 0/5] dio: clean up completion phase of direct_io_worker(); Zach Brown adds: >> This all looks good, the code is much easier to follow. What do you think >> about making dio->result an unsigned quantity? It should never be negative >> now that there is an io_error field. zach.brown> Yeah, that has always bugged me too. I considered renaming it zach.brown> 'issued', or something, as part of this patchset but thought we zach.brown> could do it later. I figured since you were doing some house-keeping, we might as well clean up as much as possible. It's up to you, though. ;) zach.brown> While we're on this topic, I'm nervious that we increment it zach.brown> when do_direct_IO fails. It might be sound, but that we zach.brown> consider it the amount of work "transferred" for dio->end_io zach.brown> makes me want to make sure there aren't confusing corner cases zach.brown> here. It does look non-obvious when reading the code. However, I'm pretty sure it's right. dio->block_in_file is only updated if there is no error returned from submit_page_section. As such, it really does reflect how much work was done before the error, right? It does seem odd that we do this math in two separate places, though. -Jeff