Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp912954ybc; Tue, 12 Nov 2019 11:11:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyQY6N8kb/rjuWZ3BKtfUVWeGRf7sWa5vqsy11diKRCjF4IaE9AKU/fJ2gSXJESUSh8xTrL X-Received: by 2002:a17:906:3393:: with SMTP id v19mr4747213eja.117.1573585880035; Tue, 12 Nov 2019 11:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573585880; cv=none; d=google.com; s=arc-20160816; b=jbNC+8i2GFe2r8SX9rNavJTePKZ0bLMjY+VqQ5k6yZS4AMZSeM+Ly61iawEO97NSUD zK1SQRXpUEvT5cSYJAwZjQvNdx2nGd1qiW/TZW5BEyN+ykqf2qer0ouAwqkqswNIdZrP 7cNHwRJw1giIe619mLLKUBdeESaYIAS03g6yqLd4O0wyQdmjxu83WcI27crmjEtAfxwe 01pSifMV3QtBJw1cbEoR0yTBNUildVE/UJYhiTXMmMS8d5s2gnAoElLIlpKbisY4zJy8 EEgddtoSr1gR3gEu/lwUQmr1LzydnIvOLGzkMoU9glbLFxUFBF/iibuPY3kGZble1ytc fk2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2FPgM7SKFCN9msWXuyWzvDA0G+gWYRF9TEdVYJj4UX4=; b=Y3fqwT/7qh38yvV9hrZxH93YMV/CIXGnvAkmHp+1NRvTYFcogVrmFp7dVaJQnQl4xZ PCY7zaDB54Xdqh1GICcmDLHL9iYPcCf1v0FfFBYP0T4eQyhxPgwJR8d6z+4qnmw2EjyH f/zW3ujLRxGmvoV5cwKdE+CZ96CsjakXw8hi1sXDZriV39+BAiPc6Q2x6Dh5PwwBmgr9 eTL2mTdE2+ObO3FHarICdeBAtttMDoUsCZzmel7WaPDRJX4B2Q45rMFddKBbiTDE2+DW xojU77qAg+3WeIUcrhrHg35cx8MAQjoW7gZZUIsuPgsszzEyjzLqZ/Yw1OdM2+ncMM8/ iN4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LAr3PctE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33si15622763edc.279.2019.11.12.11.10.54; Tue, 12 Nov 2019 11:11:20 -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=pass header.i=@chromium.org header.s=google header.b=LAr3PctE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbfKLTJs (ORCPT + 99 others); Tue, 12 Nov 2019 14:09:48 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38699 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726982AbfKLTJs (ORCPT ); Tue, 12 Nov 2019 14:09:48 -0500 Received: by mail-lf1-f65.google.com with SMTP id q28so13799863lfa.5 for ; Tue, 12 Nov 2019 11:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2FPgM7SKFCN9msWXuyWzvDA0G+gWYRF9TEdVYJj4UX4=; b=LAr3PctEvf0Qp97K3E1zPlt4STnZtx88R2lMOGizjf8Qv9n3YYDLOdCeA6Psx+7cKw 5JREarMdzn92YHkL67Rqpw4BU4RaeAAWEl6NKOMIGvya/yqlPa33AxGrCE9r/JOsXvcf 2XZUsajCtPg7eoVXew31WlRhJKOw7o705SzR8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2FPgM7SKFCN9msWXuyWzvDA0G+gWYRF9TEdVYJj4UX4=; b=d9ipHEg0GPOrtuvZxpwI+jO/KuPjW2LeGBrwD6lvxBBL2x4kNtVArTEkSSmdp9lgG6 ktl9g4BjLQDcurGp2DBEzyh3QMoaUnXJwZgLD4++mCDVZ2nJVwVNSKD5qzHxrtMKnOm0 fEKvCCMgeNw5fypS5q2hHAdzTPiukIOTj+wNI3TtQCx8Iakdk2fa800Zptb9UX2a4eHf YKjxznbju//xZLyqbXkKX/1z8bBS8Jd6o53/qE/GVGr6/x3vaK7shukm/7viUIELLDAB p2a6BBH5lCRGKZvFJlhMkPpq5aCrR9WHwQOS2hTMUvUSasTEUMwuliMQIMLP1j695Ncf louA== X-Gm-Message-State: APjAAAXrlSYTzbkYcLNN22onFeZD6LP8XwbA6dAd2tywUvPFIU7o2sbS P0VuUvE9DF+WM17icqcI3+horW353U4= X-Received: by 2002:ac2:43a3:: with SMTP id t3mr5067651lfl.150.1573585785994; Tue, 12 Nov 2019 11:09:45 -0800 (PST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id n8sm223782lfe.31.2019.11.12.11.09.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2019 11:09:45 -0800 (PST) Received: by mail-lf1-f49.google.com with SMTP id z188so6567578lfa.11 for ; Tue, 12 Nov 2019 11:09:44 -0800 (PST) X-Received: by 2002:a19:40cf:: with SMTP id n198mr20776284lfa.189.1573585784155; Tue, 12 Nov 2019 11:09:44 -0800 (PST) MIME-Version: 1.0 References: <20191111185030.215451-1-evgreen@chromium.org> <20191111185030.215451-2-evgreen@chromium.org> <20191112083208.GA1848@infradead.org> In-Reply-To: <20191112083208.GA1848@infradead.org> From: Evan Green Date: Tue, 12 Nov 2019 11:09:07 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 1/2] loop: Report EOPNOTSUPP properly To: Christoph Hellwig Cc: Jens Axboe , Martin K Petersen , Gwendal Grignou , Ming Lei , "Darrick J . Wong" , Alexis Savery , Douglas Anderson , Bart Van Assche , Chaitanya Kulkarni , linux-block , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 12:32 AM Christoph Hellwig wrote: > > 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. Seems reasonable, I can switch to that.