Re: Understanding max_sectors

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

 



On Wed, Mar 21, 2012 at 09:23:00PM -0700, Nicholas A. Bellinger wrote:
> On Wed, 2012-03-21 at 18:00 -0700, Roland Dreier wrote:
> > On Wed, Mar 21, 2012 at 5:34 PM, Nicholas A. Bellinger
> > <nab@xxxxxxxxxxxxxxx> wrote:
> > > -       tmp = rounddown((max_sectors * block_size), PAGE_SIZE);
> > > -       aligned_max_sectors = (tmp / block_size);
> > > +       aligned_max_sectors = rounddown(max_sectors, PAGE_SIZE / block_size);
> > >
> > > The PAGE_SIZE / block_size calculation looks bogus to me here..
> > 
> > What's bogus about it?  As long as block_size is a power of 2 (which I believe
> > we assume many other places), it should be fine.
> > 
> 
> Mmmm, I was thinking this was going to have problems with PAGE_SIZE >
> 4096, but after running some sample code I guess I was wrong here..
> 
> Applying you're original patch now, with DA_STATUS_MAX_SECTORS_MAX also
> bumped to UINT_MAX for the max_sectors configfs attribute.
> 
> Thanks,
> 
> --nab
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe target-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

The max_sectors Error is gone now
Thanks

Stefan
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux