Message ID | 20220418045314.360785-4-hch@lst.de (mailing list archive) |
---|---|
State | Accepted |
Commit | fb749a87f4536d2fa86ea135ae4eff1072903438 |
Headers | show |
Series | [01/11] ubd: don't set the discard_alignment queue limit | expand |
On 4/18/22 13: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 the discard granularity as done by null_blk is mostly > harmless but also useless. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > drivers/block/null_blk/main.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c > index 5cb4c92cdffea..a521e914a9843 100644 > --- a/drivers/block/null_blk/main.c > +++ b/drivers/block/null_blk/main.c > @@ -1765,7 +1765,6 @@ static void null_config_discard(struct nullb *nullb) > } > > nullb->q->limits.discard_granularity = nullb->dev->blocksize; > - nullb->q->limits.discard_alignment = nullb->dev->blocksize; > blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9); > } > Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
On 4/17/22 21: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 the discard granularity as done by null_blk is mostly > harmless but also useless. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 5cb4c92cdffea..a521e914a9843 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1765,7 +1765,6 @@ static void null_config_discard(struct nullb *nullb) } nullb->q->limits.discard_granularity = nullb->dev->blocksize; - nullb->q->limits.discard_alignment = nullb->dev->blocksize; blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9); }
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 the discard granularity as done by null_blk is mostly harmless but also useless. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/block/null_blk/main.c | 1 - 1 file changed, 1 deletion(-)