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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C539C433F5 for ; Mon, 25 Oct 2021 08:41:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0370960555 for ; Mon, 25 Oct 2021 08:41:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232148AbhJYIna (ORCPT ); Mon, 25 Oct 2021 04:43:30 -0400 Received: from verein.lst.de ([213.95.11.211]:56093 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbhJYIna (ORCPT ); Mon, 25 Oct 2021 04:43:30 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id A463468B05; Mon, 25 Oct 2021 10:41:05 +0200 (CEST) Date: Mon, 25 Oct 2021 10:41:05 +0200 From: Christoph Hellwig To: Max Gurtovoy Cc: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig , kernel test robot , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Feng Li , Israel Rukshin , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org Subject: Re: [PATCH] virtio_blk: corrent types for status handling Message-ID: <20211025084105.GA14544@lst.de> References: <20211025075825.1603118-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon, Oct 25, 2021 at 11:24:57AM +0300, Max Gurtovoy wrote: > Maybe we can compare the returned status to BLK_STS_OK. But I see we don't > do it also in NVMe subsystem so I guess we can assume BLK_STS_OK == 0 > forever. Jes, BLK_STS_OK == 0 is an intentional allowed short cut. It is not just a block layer design, but part of how the sparse __bitwise__ annotations work.