All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@meta.com>
To: <linux-block@vger.kernel.org>, <dm-devel@redhat.com>, <axboe@kernel.dk>
Cc: <stefanha@redhat.com>, <ebiggers@kernel.org>, <me@demsh.org>,
	<mpatocka@redhat.com>, Keith Busch <kbusch@kernel.org>
Subject: [PATCHv2 5/5] dm-log-writes: set dma_alignment limit in io_hints
Date: Thu, 10 Nov 2022 10:45:01 -0800	[thread overview]
Message-ID: <20221110184501.2451620-6-kbusch@meta.com> (raw)
In-Reply-To: <20221110184501.2451620-1-kbusch@meta.com>

From: Keith Busch <kbusch@kernel.org>

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 <kbusch@kernel.org>
---
 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 20fd688f72e7..178e13a5b059 100644
--- a/drivers/md/dm-log-writes.c
+++ b/drivers/md/dm-log-writes.c
@@ -875,6 +875,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_FS_DAX)
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Keith Busch <kbusch@meta.com>
To: <linux-block@vger.kernel.org>, <dm-devel@redhat.com>, <axboe@kernel.dk>
Cc: ebiggers@kernel.org, Keith Busch <kbusch@kernel.org>,
	mpatocka@redhat.com, me@demsh.org, stefanha@redhat.com
Subject: [dm-devel] [PATCHv2 5/5] dm-log-writes: set dma_alignment limit in io_hints
Date: Thu, 10 Nov 2022 10:45:01 -0800	[thread overview]
Message-ID: <20221110184501.2451620-6-kbusch@meta.com> (raw)
In-Reply-To: <20221110184501.2451620-1-kbusch@meta.com>

From: Keith Busch <kbusch@kernel.org>

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 <kbusch@kernel.org>
---
 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 20fd688f72e7..178e13a5b059 100644
--- a/drivers/md/dm-log-writes.c
+++ b/drivers/md/dm-log-writes.c
@@ -875,6 +875,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_FS_DAX)
-- 
2.30.2

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  parent reply	other threads:[~2022-11-10 18:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 18:44 [PATCHv2 0/5] fix direct io device mapper errors Keith Busch
2022-11-10 18:44 ` [dm-devel] " Keith Busch
2022-11-10 18:44 ` [PATCHv2 1/5] block: make dma_alignment a stacking queue_limit Keith Busch
2022-11-10 18:44   ` [dm-devel] " Keith Busch
2022-11-10 18:44 ` [PATCHv2 2/5] dm-crypt: provide dma_alignment limit in io_hints Keith Busch
2022-11-10 18:44   ` [dm-devel] " Keith Busch
2022-11-16 20:05   ` Mike Snitzer
2022-11-16 20:05     ` Mike Snitzer
2022-11-10 18:44 ` [PATCHv2 3/5] block: make blk_set_default_limits() private Keith Busch
2022-11-10 18:44   ` [dm-devel] " Keith Busch
2022-11-10 18:45 ` [PATCHv2 4/5] dm-integrity: set dma_alignment limit in io_hints Keith Busch
2022-11-10 18:45   ` [dm-devel] " Keith Busch
2022-11-16 20:06   ` Mike Snitzer
2022-11-16 20:06     ` Mike Snitzer
2022-11-10 18:45 ` Keith Busch [this message]
2022-11-10 18:45   ` [dm-devel] [PATCHv2 5/5] dm-log-writes: " Keith Busch
2022-11-16 20:07   ` Mike Snitzer
2022-11-16 20:07     ` Mike Snitzer
2022-11-11 18:07 ` [dm-devel] [PATCHv2 0/5] fix direct io device mapper errors Mike Snitzer
2022-11-11 18:07   ` Mike Snitzer
2022-11-11 18:31   ` Keith Busch
2022-11-11 18:31     ` [dm-devel] " Keith Busch
2022-11-14 11:31     ` Mikulas Patocka
2022-11-14 11:31       ` Mikulas Patocka
2022-11-14 18:12       ` Keith Busch
2022-11-14 18:12         ` [dm-devel] " Keith Busch
2022-11-16 22:58 ` Jens Axboe
2022-11-16 22:58   ` [dm-devel] " Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221110184501.2451620-6-kbusch@meta.com \
    --to=kbusch@meta.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=me@demsh.org \
    --cc=mpatocka@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.