Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3828645ybc; Thu, 14 Nov 2019 15:23:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxDQQVXk93QipeZ2KWgCthuwDCNe/aV0tmVuPLj/zzjFd/h4a6GBdVWiyz2l8pFnuWNeu1o X-Received: by 2002:a1c:544e:: with SMTP id p14mr10726429wmi.17.1573773797152; Thu, 14 Nov 2019 15:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573773797; cv=none; d=google.com; s=arc-20160816; b=DWQTd7P036GB9wT4uDGAlOBdQZuC1p67FUoCXVHzp/nhrvbfjyx5wQQj6v4CXeDxLy aI+btA01IHqscfJK8EYxlHXA8QyE8/NGLuabciSDSddNbMPnQhChVQHJaJsBztBmgwdP lt3fVMb1OgSHnPcg2xFXieqCf1Wxy61aWyUrEEQeHgR4KpC4dvyPn1YCA3Sv1LYSbteQ iRgyFAXRNIYO9FRBiTIykKHmKPzS6z9uF/VCSDM9pr0eJ+CPXcHxH9zB3BjtPqsZoaGu x3obxgcF+KLRICHjV4cahVs0KSd+QvZrst8zXFhSglijeXOipyXwcK+HgWI1i2DA4Njm J99A== 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=ICrO0QRstvenGdVeXDhZbaKDYu3NwTrJocm24+ZpLeM=; b=ghetWer1QLuMZKcBKCAu/gRb3Rzr5FdP0R+kN/Lt3bhVorWp+IKRvLaNDs4iDiBlWA XtQ/z9aXXqJuqhFn+Xzg4DgSQ/WFhXzAXte6D3x6aiU1JFjuW9W/wHkMBa6kV7yHLOgA tcM7Ekw8GpDHnRfTQZjiP4LgX4OHcK9rfutRLUuruc3twb6w3djvj3U+2/l0J1E+38Zi I8t+Bhi0MUzaK+4T5xQqQG9BoVdnaFPdXUrRiG+7ahiZPgHhBNtUZPSxMD1rumFBpInD p9LGp1ZlJtbUonXGLOIyFcihVK1lfiA33/Z+lwpE3/Q1yz4SO04CRCImKDrgySuyIkQQ 1hqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ev1bBGx7; 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 va7si4211707ejb.18.2019.11.14.15.22.52; Thu, 14 Nov 2019 15:23:17 -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=ev1bBGx7; 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 S1727112AbfKNXTo (ORCPT + 99 others); Thu, 14 Nov 2019 18:19:44 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33824 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfKNXTo (ORCPT ); Thu, 14 Nov 2019 18:19:44 -0500 Received: by mail-lj1-f195.google.com with SMTP id 139so8585922ljf.1 for ; Thu, 14 Nov 2019 15:19:42 -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=ICrO0QRstvenGdVeXDhZbaKDYu3NwTrJocm24+ZpLeM=; b=ev1bBGx7lLlrnl26b7rac/GdwfVDNkM6VDvIUf7VBtsxoiUazG/I7hXMGRVkH4s9Zr 5n1Q/xO5/Ub03hzKELw/qorFGTCAcInMY/IBmyOxe45PHOoaJixrg1e5WMT5xWskDhnR F0c0xW4ygk84ZQZhlsONe5gHFlDxIFEJ6FKYQ= 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=ICrO0QRstvenGdVeXDhZbaKDYu3NwTrJocm24+ZpLeM=; b=ulA3IJ2erZytJZHWkpygoESw325M5VTbpg9LSPr25qL8zhmkllW7eiQRltUXZMObaI Ba+5L+4sGj5fNoaYDVecgLFZ6FGIdhed0Sea8kslJg6NbxjWzp0+W9iEV6YewrsFtEbk H+efNXxyB96ZcaU4+yllN6hhNDBI5i7xdCK90uHOg2wRyDjeeUO1sspRDJJNavUsnjz/ R6fDr3pql08L8CINml1OgXYcdwxhSTFwfsvb0/l5/HkKMV0YhfwoQxt5HFBHm4gxfYdk wXEKclRV1Tv4D7JT80pRExZo1JbosQEI6OkLKySj419HLTkbJD/UnkSKs2TA6CNzQEgE fVlA== X-Gm-Message-State: APjAAAWs2AICoIeYLRGNOFnKc0TsWcVeDdrOfPDNqTwkXX1TEdQiI1tK VuFJn5HewhxeiOH2nRQ/3ew5dMUrQKE= X-Received: by 2002:a2e:9842:: with SMTP id e2mr8727150ljj.93.1573773581802; Thu, 14 Nov 2019 15:19:41 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id 186sm3671976lfb.28.2019.11.14.15.19.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Nov 2019 15:19:40 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id z188so6433366lfa.11 for ; Thu, 14 Nov 2019 15:19:40 -0800 (PST) X-Received: by 2002:a05:6512:21c:: with SMTP id a28mr8857425lfo.79.1573773578349; Thu, 14 Nov 2019 15:19:38 -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: From: Evan Green Date: Thu, 14 Nov 2019 15:19:02 -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 11:09 AM Evan Green wrote: > > 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. Oh wait, the other hunk doesn't deal with blk_status_t at all. Before, it just translated any errno into -EIO. Now, it translates almost any errno to -EIO (the almost being EOPNOTSUPP). So I'll change just the first hunk you pointed out. -Evan