Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp251694ybc; Tue, 12 Nov 2019 00:33:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzHAHnTxKUYQAypmgpAjrcoRCgbD3+CRTIa2uM6YAGOJPqaymH7DdwpySkOgfGTzP/tuwfi X-Received: by 2002:a50:958d:: with SMTP id w13mr31869901eda.243.1573547628624; Tue, 12 Nov 2019 00:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573547628; cv=none; d=google.com; s=arc-20160816; b=aPaYaKVuB7UOfDa9J0+C678zOSLGVtZOHd/Uue/V8Ai108TuDKAEVCdgveJOLv4ItU Lv69Adqe9ynox3uJBUKky6x8fI70K7ajn+1J1KiuMNABTeYtbc1fPjxGLY09Y62XBSj3 7KZ9WuCpT1ayhnDjsBU/a/vX0pnjT4yfTA29xBwNqs+v1sOL+vtGA/CxOFBhVSlx8fD8 l8lDlpNs/MzMZ4l9i3RRp4DZoToJpWfvkggq83Z035TjWb6PzkgS5uEhCBcwK6TPeyAp iCTdfd9O7zEbUI6u5mXvCPKldHDr96uqJUbmeWCtCE0e//cfrq5oqRxIFJaeSGhaRkhe bvdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PnZ2Xv5QzU531/DlEw36PKsM1WpetiqrlbT9IG3dL8k=; b=tL3u68IxICdBOHPgOHJiER8hBOhLbl4HImrldQrVJ6FzSwuVjMHZAL1guMx+yQciyi fYpYkLhnRm7vA1JBSS+suDfOYLCd0CcwL+NmMbgIyrfBWW83S93dOaSByGYS+gp+PcTx Rbu8Cl5v4QI63Cs3USrvzNW9pETUODHncxXVt7AbVkfII5mUS2ftUkBAPKQ04xRC39pF xSMFFXfMLLEDi2/w2S1vXVe0AAXabfGzCtZPcMb9zZUwW8UFqXxJUgrHczGDyJ5pGzHt umSCn+s2neAQmivNVtDL2rWJFPGtzag+KFUKWkc4Lh1smipabAt90b6+0TPL9pHz/ZKT OsIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=lZgfxhZy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c36si13678929edf.165.2019.11.12.00.33.23; Tue, 12 Nov 2019 00:33:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=lZgfxhZy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbfKLIcS (ORCPT + 99 others); Tue, 12 Nov 2019 03:32:18 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55830 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbfKLIcS (ORCPT ); Tue, 12 Nov 2019 03:32:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PnZ2Xv5QzU531/DlEw36PKsM1WpetiqrlbT9IG3dL8k=; b=lZgfxhZyE0dP0kDFJj9ftdq3e yq8njdAiJAJmROqgXXkjeet9Kq0VPAvIgJiknDR8CFlDh65AYeRy4/DWFKszRy5UZvB+NVTkxFawx gt7svXxxKHexXgxjyIWB2hiDL7DFwkmm4g0Jk7KQrySSF5ZhK1G67qeJBQ5/cvZ4HDJ2o5qFUye28 E8X7WbWG1gWSWYAB/gzK5+dNVZsyE5JmXRiGkXEdxB7qCWan9PaQaO9vIjJz/xkb4Vz44vpqY3+4O QVkGADHTKd/G7ObvDP/VTZiUZ56B4RnVWkwZr74pytebO/unRAAsmSRv8Fq+FxeupcziqAT8pJVj5 aDwz1CXFg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iURaq-0001FL-To; Tue, 12 Nov 2019 08:32:08 +0000 Date: Tue, 12 Nov 2019 00:32:08 -0800 From: Christoph Hellwig To: Evan Green Cc: Jens Axboe , Martin K Petersen , Gwendal Grignou , Ming Lei , "Darrick J . Wong" , Alexis Savery , Douglas Anderson , Bart Van Assche , Chaitanya Kulkarni , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/2] loop: Report EOPNOTSUPP properly Message-ID: <20191112083208.GA1848@infradead.org> References: <20191111185030.215451-1-evgreen@chromium.org> <20191111185030.215451-2-evgreen@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191111185030.215451-2-evgreen@chromium.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 10:50:29AM -0800, Evan Green wrote: > - if (cmd->ret < 0) > + if (cmd->ret == -EOPNOTSUPP) > + ret = BLK_STS_NOTSUPP; > + else if (cmd->ret < 0) > ret = BLK_STS_IOERR; This really should use errno_to_blk_status. Same for the other hunk.