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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9AB0C433E0 for ; Fri, 31 Jul 2020 13:11:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91CE9206FA for ; Fri, 31 Jul 2020 13:11:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="M2D7p7M+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730952AbgGaNLO (ORCPT ); Fri, 31 Jul 2020 09:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730291AbgGaNLN (ORCPT ); Fri, 31 Jul 2020 09:11:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B11DC061574 for ; Fri, 31 Jul 2020 06:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PFWfBZ4q8OVm2xOhbYpzuKcyALtkma9PfQ40uHYLTnw=; b=M2D7p7M+F2o3o4VWc7QevPmvo2 HDEsCtmZND4pVl1Y0UEcNCN77kaOzjRhIn+IIMKaqpP0kzWWEwAQtmxJaaV6PRZwr5sx/zkcubqDn mGONjkkt2eCUBF4q6l9eywNgC7KFEGATnuEFPSmPxPjvEtXQvL9HWGI9tQWs/H3tJ1xecYhq7PNCf 0197KH3aE4tq4iajcnmgcjnVMtYmXnKiCdnAsFk/Ohpb5q62B4tPJwQIJw6yqIOCTsyJFzDdlFbvb SeGGlVkIDR9SI+EGA8WttVf7fT8FryJWg8IcKQqwAyQUF/zAR12CnZYaygS3+whQfghPbftfw305a hSc67LSQ==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1UoZ-0004ov-Hc; Fri, 31 Jul 2020 13:11:11 +0000 Date: Fri, 31 Jul 2020 14:11:11 +0100 From: Christoph Hellwig To: Avi Kivity Cc: Goldwyn Rodrigues , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org Subject: Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT Message-ID: <20200731131111.GA18024@infradead.org> References: <20181213115306.fm2mjc3qszjiwkgf@merlin> <833af9cb-7c94-9e69-65cb-abd3cee5af65@scylladb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <833af9cb-7c94-9e69-65cb-abd3cee5af65@scylladb.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Jul 22, 2020 at 07:08:21PM +0300, Avi Kivity wrote: > > On 13/12/2018 13.53, Goldwyn Rodrigues wrote: > > For AIO+DIO with RWF_NOWAIT, if the block layer does not support REQ_NOWAIT, > > it returns EIO. Return EOPNOTSUPP to represent the correct error code. > > > > Signed-off-by: Goldwyn Rodrigues I think the main problem is the EOPNOTSUPP return value. Everywhere else we treat the lack of support as BLK_STS_AGAIN / -EAGAIN, so it should return that. Independ of that the legacy direct I/O code really should just use blk_status_to_errno like most of the other infrastructure instead of havings it's own conversion and dropping the detailed error status on the floor.