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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61B9FC433FE for ; Wed, 23 Nov 2022 13:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669209522; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VBIPKSEuw8zPcp0p2ux+QkzDVGKpvEnzl0Sc9Bp80vo=; b=EcuZQ0Hp7KEAeaYQu7ahY/bvosXp0aukwVuSoCxMt/Cm4xhqQ82We6c05bWEO+EIA+zxmp rkIKYV56L3Hz/4O0ciLbKAgbvLK1m+smt3B2DIWlr47OBzaktFN4Dc/0Rhis/hsFx3tJtk GM7mlZcmgn7G1zpR6t8yg6fPlMA1er4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-YNYCZVt4NDWetku-5ILAAw-1; Wed, 23 Nov 2022 08:18:39 -0500 X-MC-Unique: YNYCZVt4NDWetku-5ILAAw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 866203804517; Wed, 23 Nov 2022 13:18:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75F682166B26; Wed, 23 Nov 2022 13:18:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 332911946589; Wed, 23 Nov 2022 13:18:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 916191946597 for ; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 41116111DCE7; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39F25111DCE6 for ; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C457806005 for ; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-qfsrxfhKMkGh_tGc_tlLTA-1; Wed, 23 Nov 2022 07:43:28 -0500 X-MC-Unique: qfsrxfhKMkGh_tGc_tlLTA-1 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F1C71B81F31; Wed, 23 Nov 2022 12:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEF15C43470; Wed, 23 Nov 2022 12:43:25 +0000 (UTC) From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Wed, 23 Nov 2022 07:42:25 -0500 Message-Id: <20221123124234.265396-24-sashal@kernel.org> In-Reply-To: <20221123124234.265396-1-sashal@kernel.org> References: <20221123124234.265396-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Subject: [dm-devel] [PATCH AUTOSEL 5.15 24/31] dm-integrity: set dma_alignment limit in io_hints X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Sasha Levin , Mike Snitzer , dm-devel@redhat.com, Keith Busch , agk@redhat.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Keith Busch [ Upstream commit 29aa778bb66795e6a78b1c99beadc83887827868 ] This device mapper needs bio vectors to be sized and memory aligned to the logical block size. Set the minimum required queue limit accordingly. Signed-off-by: Keith Busch Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221110184501.2451620-5-kbusch@meta.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/md/dm-integrity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index d5b827086962..cac8cca03fe8 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -3354,6 +3354,7 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim limits->logical_block_size = ic->sectors_per_block << SECTOR_SHIFT; limits->physical_block_size = ic->sectors_per_block << SECTOR_SHIFT; blk_limits_io_min(limits, ic->sectors_per_block << SECTOR_SHIFT); + limits->dma_alignment = limits->logical_block_size - 1; } } -- 2.35.1 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 C0B93C433FE for ; Wed, 23 Nov 2022 12:48:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238077AbiKWMsx (ORCPT ); Wed, 23 Nov 2022 07:48:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238097AbiKWMrb (ORCPT ); Wed, 23 Nov 2022 07:47:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A349473412; Wed, 23 Nov 2022 04:43:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3A37261C64; Wed, 23 Nov 2022 12:43:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEF15C43470; Wed, 23 Nov 2022 12:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669207406; bh=nrFKuFLGeUDfQMylmgEpCpzUriM+cnRrWV9ROTuWGN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EhfYu97nAkPUtkfsGzPdhhFJewzpWU3aKJrw7AVGTXn8z62CtsgjrV8Oc2c0XBRYf 8ryyWPS5ceH9Aa1zCQlx1rXeJ9cwgZ0rfnWd40C9BOr6PV3fiTZZ2Dhx6rBz6J3pMb Om8JKuCzRevRzvDZewu6fFf5OK10ui0iPOYgM5JMX+fKUgUd3gqBL0I4bb7/1rzQLp JBL5fstHYPECScOcEHNqnsP8eeIM5XHKWePAybhMNLb8DD9tgQxvQR+nAq4iECGYbN pEv0J5Ll7yPDNxDrlQpaoph3H+PWARxJKndXM1HfVpIavGPR6cESckroyrbSiuEOHb 9h5AYHU2r+Hgw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Keith Busch , Mike Snitzer , Jens Axboe , Sasha Levin , agk@redhat.com, dm-devel@redhat.com Subject: [PATCH AUTOSEL 5.15 24/31] dm-integrity: set dma_alignment limit in io_hints Date: Wed, 23 Nov 2022 07:42:25 -0500 Message-Id: <20221123124234.265396-24-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221123124234.265396-1-sashal@kernel.org> References: <20221123124234.265396-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Keith Busch [ Upstream commit 29aa778bb66795e6a78b1c99beadc83887827868 ] This device mapper needs bio vectors to be sized and memory aligned to the logical block size. Set the minimum required queue limit accordingly. Signed-off-by: Keith Busch Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221110184501.2451620-5-kbusch@meta.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/md/dm-integrity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index d5b827086962..cac8cca03fe8 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -3354,6 +3354,7 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim limits->logical_block_size = ic->sectors_per_block << SECTOR_SHIFT; limits->physical_block_size = ic->sectors_per_block << SECTOR_SHIFT; blk_limits_io_min(limits, ic->sectors_per_block << SECTOR_SHIFT); + limits->dma_alignment = limits->logical_block_size - 1; } } -- 2.35.1