From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBC41C77B7E for ; Thu, 25 May 2023 23:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232645AbjEYXEg (ORCPT ); Thu, 25 May 2023 19:04:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjEYXEf (ORCPT ); Thu, 25 May 2023 19:04:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D834AE2; Thu, 25 May 2023 16:04:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6446764BC3; Thu, 25 May 2023 23:04:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E110C433EF; Thu, 25 May 2023 23:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685055872; bh=XdOmX0J4cMjw/F8WqcmMWlj3q2i0+z3j4UltRDsxXas=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jPAS+ejc27tlKAjqH0sSeK26lSC+pzZBMxMiVfvfOGF3r7Xaj2BNyzz1O9GohGZiQ gH7vJKASVwfO4wv4I6YddGKdksSLzjyfaY08n8v5lJC3UbQe16EkR1GJUjo1m+SNCP TkU50vJ9HnhrSL1H0TnqmdjwU/066gcw2iPvp7BH1eLhfKZd5u+kPftBCn81ahKWcJ PTeXWWf8bK2A07eIxJBXJOagUJ3tNg406KzzcOUPqhG6yworxHonCLGzqrIkPONcLo AGUL+jSnREV1cguhgYPm7Txv8qLIvG39Bk1708mGINY6gd+DdRYSx6szcAt4YGZmcf JiMHWtr+il98A== Message-ID: <9d1a3d1a-b726-5144-4911-de6b77d9bf02@kernel.org> Date: Fri, 26 May 2023 08:04:30 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read() To: Matthew Wilcox , David Howells Cc: Naohiro Aota , Johannes Thumshirn , Christoph Hellwig , Al Viro , Jens Axboe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-kernel@kvack.org References: <3788353.1685003937@warthog.procyon.org.uk> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 5/26/23 00:21, Matthew Wilcox wrote: > On Thu, May 25, 2023 at 09:38:57AM +0100, David Howells wrote: >> >> Call zonefs_io_error() after getting any error from filemap_splice_read() >> in zonefs_file_splice_read(), including non-fatal errors such as ENOMEM, >> EINTR and EAGAIN. >> >> Suggested-by: Damien Le Moal >> Link: https://lore.kernel.org/r/5d327bed-b532-ad3b-a211-52ad0a3e276a@kernel.org/ > > This seems like a bizarre thing to do. Let's suppose you got an > -ENOMEM. blkdev_report_zones() is also likely to report -ENOMEM in > that case, which will cause a zonefs_err() to be called. Surely > that can't be the desired outcome from getting -ENOMEM! Right... What I want to make sure here is that the error we get is not the result of a failed IO. Beside EIO, are there any other cases ? I can think of at least: 1) -ETIMEDOUT -> the drive is not responding. In this case, calling zonefs_io_error() may not be useful either. 2) -ETIME: The IO was done with a duration limit (e.g. active time limit) and was aborted by the drive because it took too long. Calling zonefs_io_error() for this case is also not useful. But I am thinking block layer (blk_status_t to errno conversion) here. Does the folio code *always* return EIO if it could not get a page/folio, regardless of the actual bio status ? -- Damien Le Moal Western Digital Research