Re: Maximum data size in a single transfer for MS driver

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

 



On Thu, Feb 25 2010, Alan Stern wrote:
> On Tue, 23 Feb 2010, Martin K. Petersen wrote:
> 
> > Alan> Are drivers supposed to assign values directly to
> > Alan> q-> limits.max_sectors?  Shouldn't there be a cleaner API for all
> > Alan> this?
> > 
> > Drivers are supposed to set the hard limit.  The soft limit is a
> > fs/block layer value and none of the device driver's business.
> 
> _How_ are drivers supposed to set the hard limit?
> 
> If they call blk_queue_max_sectors() then both the hard and soft limits 
> are affected, but at least the hard limit is set correctly.

blk_queue_max_hw_sectors(). I can understand the confusion though, the
comment is crap for blk_queue_max_sectors(). Mostly because the logic
isn't as clean as it should be, I'll try and get that cleaned up.

> If they call blk_queue_max_hw_sectors() then only the hard limit is 
> affected, but it cannot be set to a value less than 1024 
> (BLK_DEF_MAX_SECTORS).  Wouldn't it be more logical to allow the hard 
> limit to be set to anything at least as large as the page size, and 
> decrease the soft limit if it is larger than the new hard limit?

The driver really should only set the hard limit, they should not change
the soft setting.

We cannot easily support < page size software not hardware limit.

-- 
Jens Axboe

--
To unsubscribe from this list: 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