Re: [PATCH] scsi disk: report size without overflow

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

 



On Fri, 21 Oct 2005 16:17:17 -0500 James Bottomley wrote:

> On Fri, 2005-10-21 at 13:46 -0700, Randy.Dunlap wrote:
> > On Fri, 21 Oct 2005, James Bottomley wrote:
> > > what's wrong with the attached?  It looks like the code once allowed 256
> > > byte sectors, but the if statement above now forbids them.
> > 
> > What if statement forbids 256-byte sectors?  I don't see it.
> > 
> > 	if (sector_size != 512 &&
> > 	    sector_size != 1024 &&
> > 	    sector_size != 2048 &&
> > 	    sector_size != 4096 &&
> > 	    sector_size != 256) {
> 
> Sorry, didn't read far enough down the if statement.
> 
> To support 256, we can still do it, but the assignment has to become
> 
> sector_t sz = (sdkp->capacity/2) * (hard_sector/256);

OK by me.

Thanks,
---
~Randy
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux