[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250106124119.1318428-3-john.g.garry@oracle.com>
Date: Mon, 6 Jan 2025 12:41:16 +0000
From: John Garry <john.g.garry@...cle.com>
To: axboe@...nel.dk, agk@...hat.com, snitzer@...nel.org, hch@....de
Cc: mpatocka@...hat.com, martin.petersen@...cle.com,
linux-block@...r.kernel.org, dm-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org, John Garry <john.g.garry@...cle.com>
Subject: [PATCH RFC 2/5] block: Change blk_stack_atomic_writes_limits() unit_min check
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.
Signed-off-by: John Garry <john.g.garry@...cle.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
Powered by blists - more mailing lists