Re: [PATCH] block: ensure discard_granularity is zero when discard is not supported

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

 



Christoph,

> +	/*
> +	 * When discard is not supported, discard_granularity should be reported
> +	 * as 0 to userspace.
> +	 */
> +	if (lim->max_discard_sectors)
> +		lim->discard_granularity =
> +			max(lim->discard_granularity, lim->physical_block_size);
> +	else
> +		lim->discard_granularity = 0;
> +

Looks good to me!

Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

-- 
Martin K. Petersen




[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