[PATCH 11/20] nvme: clean up the check for too large logic block sizes

Christoph Hellwig hch at lst.de
Tue Sep 29 14:33:22 EDT 2020


On Mon, Sep 28, 2020 at 02:50:27PM +0000, Damien Le Moal wrote:
> >  	if (ns->lba_shift > PAGE_SHIFT) {
> > -		/* unsupported block size, set capacity to 0 later */
> > +		capacity = 0;
> >  		bs = (1 << 9);
> 
> 		bs = (1 << SECTOR_SHIFT);
> 
> is cleaner I think.

Maybe, but then again it is existing code I didn't even touch.
And we have plenty of << 9 or >> 9, so we'd better address them
all together if we want to bother.



More information about the Linux-nvme mailing list