From: John Garry <john.g.garry@oracle.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, hch@lst.de,
martin.petersen@oracle.com, John Garry <john.g.garry@oracle.com>
Subject: [PATCH 2/2] block: Change blk_stack_atomic_writes_limits() unit_min check
Date: Thu, 9 Jan 2025 11:40:00 +0000 [thread overview]
Message-ID: <20250109114000.2299896-3-john.g.garry@oracle.com> (raw)
In-Reply-To: <20250109114000.2299896-1-john.g.garry@oracle.com>
The current check in blk_stack_atomic_writes_limits() for a bottom device
supporting atomic writes is to verify that limit atomic_write_unit_min is
non-zero.
This would cause a problem for device mapper queue limits calculation. This
is because it uses a temporary queue_limits structure to stack the limits,
before finally commiting the limits update.
The value of atomic_write_unit_min for the temporary queue_limits
structure is never evaluated and so cannot be used, so use limit
atomic_write_hw_unit_min.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
block/blk-settings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index a8dd5c097b8a..d4fccd09e237 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -589,7 +589,7 @@ static void blk_stack_atomic_writes_limits(struct queue_limits *t,
if (!(t->features & BLK_FEAT_ATOMIC_WRITES_STACKED))
goto unsupported;
- if (!b->atomic_write_unit_min)
+ if (!b->atomic_write_hw_unit_min)
goto unsupported;
if (!blk_atomic_write_start_sect_aligned(start, b))
--
2.31.1
next prev parent reply other threads:[~2025-01-09 11:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 11:39 [PATCH 0/2] block: Stacked device atomic writes fixes John Garry
2025-01-09 11:39 ` [PATCH 1/2] block: Ensure start sector is aligned for stacking atomic writes John Garry
2025-01-09 11:40 ` John Garry [this message]
2025-01-10 21:51 ` [PATCH 0/2] block: Stacked device atomic writes fixes Martin K. Petersen
2025-01-15 16:42 ` John Garry
2025-01-16 14:13 ` 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=20250109114000.2299896-3-john.g.garry@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.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.