diff mbox series

[07/11] dasd: don't set the discard_alignment queue limit

Message ID 20220418045314.360785-8-hch@lst.de (mailing list archive)
State Accepted
Commit c3f765299632727fa5ea5a0acf118665227a4f1a
Headers show
Series [01/11] ubd: don't set the discard_alignment queue limit | expand

Commit Message

Christoph Hellwig April 18, 2022, 4:53 a.m. UTC
The discard_alignment queue limit is named a bit misleading means the
offset into the block device at which the discard granularity starts.
Setting it to PAGE_SIZE while the discard granularity is the block size
that is smaller or the same as PAGE_SIZE as done by dasd is mostly
harmless but also useless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/s390/block/dasd_fba.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jan Höppner May 6, 2022, 12:56 p.m. UTC | #1
On 18/04/2022 06:53, Christoph Hellwig wrote:
> The discard_alignment queue limit is named a bit misleading means the
> offset into the block device at which the discard granularity starts.
> Setting it to PAGE_SIZE while the discard granularity is the block size
> that is smaller or the same as PAGE_SIZE as done by dasd is mostly
> harmless but also useless.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Jan Höppner <hoeppner@linux.ibm.com>

Sorry for a rather late answer. I saw that Jens already applied
the patches so it's fine when the Ack isn't added anymore.
Wanted to send it anyway so that you know we're aware of it.

> ---
>  drivers/s390/block/dasd_fba.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
> index 8bd5665db9198..60be7f7bf2d16 100644
> --- a/drivers/s390/block/dasd_fba.c
> +++ b/drivers/s390/block/dasd_fba.c
> @@ -782,7 +782,6 @@ static void dasd_fba_setup_blk_queue(struct dasd_block *block)
>  	blk_queue_segment_boundary(q, PAGE_SIZE - 1);
>  
>  	q->limits.discard_granularity = logical_block_size;
> -	q->limits.discard_alignment = PAGE_SIZE;
>  
>  	/* Calculate max_discard_sectors and make it PAGE aligned */
>  	max_bytes = USHRT_MAX * logical_block_size;
diff mbox series

Patch

diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 8bd5665db9198..60be7f7bf2d16 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -782,7 +782,6 @@  static void dasd_fba_setup_blk_queue(struct dasd_block *block)
 	blk_queue_segment_boundary(q, PAGE_SIZE - 1);
 
 	q->limits.discard_granularity = logical_block_size;
-	q->limits.discard_alignment = PAGE_SIZE;
 
 	/* Calculate max_discard_sectors and make it PAGE aligned */
 	max_bytes = USHRT_MAX * logical_block_size;