Josef,

> For some reason we had discard granularity set to 512 always even when
> discards were disabled.  Fix this by having the default be 0, and then
> if we turn it on set the discard granularity to the blocksize.

Originally, discard_max_bytes was the queue limit used to indicate
whether discards were supported or not. Callers were supposed to check
that for a value bigger than 0 before interpreting granularity and
alignment. However, many callers triggered on discard_granularity > 0
instead, and as a result things have been muddled somewhat.

So I don't have a problem with only reporting granularity when the
feature is actually enabled...

Reviewed-by: Martin K. Petersen <[email protected]>

-- 
Martin K. Petersen      Oracle Linux Engineering

Reply via email to