Christophe Saout wrote:
Am Mo, den 26.01.2004 schrieb Mike Christie um 22:22:
I don't think that will happen. The values are already the allowed
maximum values. Or am I wrong?
I don't think they are the max values. SCSI will override them depending
on the HBA settings.
Hmm. Then I think there is something wrong anyway. Why are the max
constants not maximum values...
I think...
Why does blkdev.h know the max values? You are saying that they reflect
a limitation of the kernel?
The queue's max_sectors, max_[phys/hw]_segments, max_segments_size etc
are device driver/HW limitations. blk_init_queue does not know an
optimal value for every device, but it might be able to set a safe
default value. Maybe a better name for MAX_SECTORS is DEFAULT_MAX_SECTORS.
BIO_MAX_[SECTORS/SIZE/PAGES] is what you called a "system-wide limit". A
bio can only be so large (the bvec_pool is hardcoded). However when
merging the bio, q->max_sectors is one of the indicators that tell the
queue when a request is too large for the device.