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 6367FC25B06 for ; Tue, 9 Aug 2022 07:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236105AbiHIHV7 (ORCPT ); Tue, 9 Aug 2022 03:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbiHIHV6 (ORCPT ); Tue, 9 Aug 2022 03:21:58 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40E2220F66; Tue, 9 Aug 2022 00:21:58 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 330FA68C7B; Tue, 9 Aug 2022 09:21:55 +0200 (CEST) Date: Tue, 9 Aug 2022 09:21:55 +0200 From: Christoph Hellwig To: Mike Christie Cc: bvanassche@acm.org, linux-block@vger.kernel.org, dm-devel@redhat.com, snitzer@kernel.org, axboe@kernel.dk, hch@lst.de, linux-nvme@lists.infradead.org, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Subject: Re: [PATCH v2 12/20] block,nvme,scsi,dm: Add blk_status to pr_ops callouts. Message-ID: <20220809072155.GF11161@lst.de> References: <20220809000419.10674-1-michael.christie@oracle.com> <20220809000419.10674-13-michael.christie@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809000419.10674-13-michael.christie@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon, Aug 08, 2022 at 07:04:11PM -0500, Mike Christie wrote: > To handle both cases, this patch adds a blk_status_t arg to the pr_ops > callouts. The lower levels will convert their device specific error to > the blk_status_t then the upper levels can easily check that code > without knowing the device type. It also allows us to keep userspace > compat where it expects a negative -Exyz error code if the command fails > before it's sent to the device or a device/tranport specific value if the > error is > 0. Why do we need two return values here?