linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/raid*: Fix the set_queue_limits implementations
@ 2025-02-12 17:11 Bart Van Assche
  2025-02-13  7:09 ` Christoph Hellwig
  2025-02-14  1:10 ` Yu Kuai
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2025-02-12 17:11 UTC (permalink / raw)
  To: Song Liu
  Cc: linux-raid, Bart Van Assche, Christoph Hellwig, Yu Kuai,
	Hannes Reinecke, Jens Axboe, Martin K. Petersen

queue_limits_cancel_update() must only be called if
queue_limits_start_update() is called first. Remove the
queue_limits_cancel_update() calls from the raid*_set_limits() functions
because there is no corresponding queue_limits_start_update() call.

Cc: Christoph Hellwig <hch@lst.de>
Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/md/raid0.c  | 4 +---
 drivers/md/raid1.c  | 4 +---
 drivers/md/raid10.c | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 8fc9339b00c7..70bcc3cdf2cd 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -386,10 +386,8 @@ static int raid0_set_limits(struct mddev *mddev)
 	lim.io_opt = lim.io_min * mddev->raid_disks;
 	lim.features |= BLK_FEAT_ATOMIC_WRITES;
 	err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
-	if (err) {
-		queue_limits_cancel_update(mddev->gendisk->queue);
+	if (err)
 		return err;
-	}
 	return queue_limits_set(mddev->gendisk->queue, &lim);
 }
 
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 9d57a88dbd26..10ea3af40991 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -3219,10 +3219,8 @@ static int raid1_set_limits(struct mddev *mddev)
 	lim.max_write_zeroes_sectors = 0;
 	lim.features |= BLK_FEAT_ATOMIC_WRITES;
 	err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
-	if (err) {
-		queue_limits_cancel_update(mddev->gendisk->queue);
+	if (err)
 		return err;
-	}
 	return queue_limits_set(mddev->gendisk->queue, &lim);
 }
 
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index efe93b979167..15b9ae5bf84d 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4020,10 +4020,8 @@ static int raid10_set_queue_limits(struct mddev *mddev)
 	lim.io_opt = lim.io_min * raid10_nr_stripes(conf);
 	lim.features |= BLK_FEAT_ATOMIC_WRITES;
 	err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
-	if (err) {
-		queue_limits_cancel_update(mddev->gendisk->queue);
+	if (err)
 		return err;
-	}
 	return queue_limits_set(mddev->gendisk->queue, &lim);
 }
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] md/raid*: Fix the set_queue_limits implementations
  2025-02-12 17:11 [PATCH] md/raid*: Fix the set_queue_limits implementations Bart Van Assche
@ 2025-02-13  7:09 ` Christoph Hellwig
  2025-02-14  1:10 ` Yu Kuai
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-02-13  7:09 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Song Liu, linux-raid, Yu Kuai, Hannes Reinecke, Jens Axboe,
	Martin K. Petersen

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] md/raid*: Fix the set_queue_limits implementations
  2025-02-12 17:11 [PATCH] md/raid*: Fix the set_queue_limits implementations Bart Van Assche
  2025-02-13  7:09 ` Christoph Hellwig
@ 2025-02-14  1:10 ` Yu Kuai
  1 sibling, 0 replies; 3+ messages in thread
From: Yu Kuai @ 2025-02-14  1:10 UTC (permalink / raw)
  To: Bart Van Assche, Song Liu
  Cc: linux-raid, Christoph Hellwig, Hannes Reinecke, Jens Axboe,
	Martin K. Petersen, yukuai (C)



在 2025/02/13 1:11, Bart Van Assche 写道:
> queue_limits_cancel_update() must only be called if
> queue_limits_start_update() is called first. Remove the
> queue_limits_cancel_update() calls from the raid*_set_limits() functions
> because there is no corresponding queue_limits_start_update() call.
> 
> Cc: Christoph Hellwig <hch@lst.de>
> Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>   drivers/md/raid0.c  | 4 +---
>   drivers/md/raid1.c  | 4 +---
>   drivers/md/raid10.c | 4 +---
>   3 files changed, 3 insertions(+), 9 deletions(-)
> [...]

Applied to md-6.14, thanks!

Kuai


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-14  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 17:11 [PATCH] md/raid*: Fix the set_queue_limits implementations Bart Van Assche
2025-02-13  7:09 ` Christoph Hellwig
2025-02-14  1:10 ` Yu Kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).