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.129.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 AEFA2C46467 for ; Wed, 23 Nov 2022 13:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669209523; 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=lA2W9ZMTtkA5NsEPbXz+0mePYS95eMaag6GjDEhr1O4=; b=Ipvwjwnhxofad8sD0dqQsCTWnfDfIav79XbdE4R2IWImQkfc2BJUsE70WLCZ+Ry/MaSp1+ dSHvCdmhGALdGEmsA5lq65dJGUbok6sdWaE7n6e3OGDTigF0XuKNhsPjS5KO9sqHP0c7I7 ldkVCO8MRgx2eqqmHw6tIXARKENnuBo= 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-505-Zug5iY-pNqu8_xicwn_o9A-1; Wed, 23 Nov 2022 08:18:40 -0500 X-MC-Unique: Zug5iY-pNqu8_xicwn_o9A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6349D1C075AD; Wed, 23 Nov 2022 13:18:38 +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 5375E111CA01; Wed, 23 Nov 2022 13:18:38 +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 344F41946589; Wed, 23 Nov 2022 13:18:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 22BCF1946587 for ; Wed, 23 Nov 2022 12:43:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0838A141511E; Wed, 23 Nov 2022 12:43:31 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 004CB1415114 for ; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 D89811019C8A for ; Wed, 23 Nov 2022 12:43:30 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-gCalcQogMlq1o9xQeJwdJg-1; Wed, 23 Nov 2022 07:43:29 -0500 X-MC-Unique: gCalcQogMlq1o9xQeJwdJg-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 dfw.source.kernel.org (Postfix) with ESMTPS id 8203C61C65; Wed, 23 Nov 2022 12:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21D0EC433C1; Wed, 23 Nov 2022 12:43:27 +0000 (UTC) From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Wed, 23 Nov 2022 07:42:26 -0500 Message-Id: <20221123124234.265396-25-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.7 Subject: [dm-devel] [PATCH AUTOSEL 5.15 25/31] dm-log-writes: 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.3 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 50a893359cd2643ee1afc96eedc9e7084cab49fa ] 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-6-kbusch@meta.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/md/dm-log-writes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index d93a4db23512..4f8f73b89512 100644 --- a/drivers/md/dm-log-writes.c +++ b/drivers/md/dm-log-writes.c @@ -901,6 +901,7 @@ static void log_writes_io_hints(struct dm_target *ti, struct queue_limits *limit limits->logical_block_size = bdev_logical_block_size(lc->dev->bdev); limits->physical_block_size = bdev_physical_block_size(lc->dev->bdev); limits->io_min = limits->physical_block_size; + limits->dma_alignment = limits->logical_block_size - 1; } #if IS_ENABLED(CONFIG_DAX_DRIVER) -- 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 9CA0EC4332F for ; Wed, 23 Nov 2022 12:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237559AbiKWMtC (ORCPT ); Wed, 23 Nov 2022 07:49:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237626AbiKWMrf (ORCPT ); Wed, 23 Nov 2022 07:47:35 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB89A74CD9; Wed, 23 Nov 2022 04:43:28 -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 8700661CAC; Wed, 23 Nov 2022 12:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21D0EC433C1; Wed, 23 Nov 2022 12:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669207407; bh=sk00pbKNrgS0I3XKE8gzui0QuOBd7ZDNpkzyJGozIC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XWvt4CfaTGZjxrq4SvYjLk+IVnBoAYJo3jHwhbtxyLyHXV2LVZHUXNpd43+1UNNCt 64FkxBQHL6RoQiP+5pZxfqu2A+TS92keaCQwYQFUBbkRXXnGF1KdKKzUAOcPDkM2X3 Ht0qoMTOtWfhA1c79PFKinf59OBPP6xEwxyz3IdqxrYouL/tAM6KwAsLHEnu/dVa2E yo1295HeEp9uLfC4NDPOPRB9xOBaJGFrmh1Nxig8PwvLAZNbEFx51sU4eaLxnLPgLM ydAuRcz8S2TNz8+PjHJ8NfoEymrPdWU2c+8h6KN9NqBCpeD/4m+EDBmiWlaTmxaMSd RXqetti5pjL/g== 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 25/31] dm-log-writes: set dma_alignment limit in io_hints Date: Wed, 23 Nov 2022 07:42:26 -0500 Message-Id: <20221123124234.265396-25-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 50a893359cd2643ee1afc96eedc9e7084cab49fa ] 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-6-kbusch@meta.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/md/dm-log-writes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index d93a4db23512..4f8f73b89512 100644 --- a/drivers/md/dm-log-writes.c +++ b/drivers/md/dm-log-writes.c @@ -901,6 +901,7 @@ static void log_writes_io_hints(struct dm_target *ti, struct queue_limits *limit limits->logical_block_size = bdev_logical_block_size(lc->dev->bdev); limits->physical_block_size = bdev_physical_block_size(lc->dev->bdev); limits->io_min = limits->physical_block_size; + limits->dma_alignment = limits->logical_block_size - 1; } #if IS_ENABLED(CONFIG_DAX_DRIVER) -- 2.35.1