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 C4AE0C77B6E for ; Wed, 12 Apr 2023 06:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbjDLGxN (ORCPT ); Wed, 12 Apr 2023 02:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjDLGxL (ORCPT ); Wed, 12 Apr 2023 02:53:11 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359D62D49 for ; Tue, 11 Apr 2023 23:53:11 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id C97D168AA6; Wed, 12 Apr 2023 08:53:07 +0200 (CEST) Date: Wed, 12 Apr 2023 08:53:07 +0200 From: "hch@lst.de" To: Jinyoung CHOI Cc: "kbusch@kernel.org" , "axboe@fb.com" , "hch@lst.de" , "sagi@grimberg.me" , "chaitanya.kulkarni@wdc.com" , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] blk-integrity: add rq_integrity_payload_size helper Message-ID: <20230412065307.GA20550@lst.de> References: <20230412052133epcms2p4d52e78b4fc1bc6ac1cc9d399a0378fce@epcms2p4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230412052133epcms2p4d52e78b4fc1bc6ac1cc9d399a0378fce@epcms2p4> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + if (WARN_ON_ONCE(queue_max_integrity_segments(rq->q) > 1)) > + return 0; This should work for multiple segments as well.