Re: [PATCH] nbd: set discard granularity properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <martin.petersen@xxxxxxxxxx>

-- 
Martin K. Petersen	Oracle Linux Engineering



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux