Re: [PATCH] loop: Use bdev limit helpers for configuring discard

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

 



On Fri, Nov 01, 2024 at 09:08:51AM +0000, John Garry wrote:
>> ok, I see that set in blk_validate_limits()
>
> BTW, can the check for granularity ever fail in 
> queue_limit_discard_alignment()
>
> static unsigned int queue_limit_discard_alignment(...)
> {
> 	...
>
> 	granularity = lim->discard_granularity >> SECTOR_SHIFT;
> 	if (!granularity)
> 		return 0;

lim->discard_granularity is always set to SECTOR_SIZE or large,
so granularity can't be 0 here.





[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