On Tue, Apr 12, 2016 at 11:43:09AM -0700, Christoph Hellwig wrote: > > I think this means that there is a mismatch between the current block layer > > limits and what NVMe / RDMA drivers need ... > > If we tell the block layer that we can only handle page sized comments > using max_segent_size it should do the right thing. > > Now one thing that might be useful is to force the max_segent_size > when setting the virt boundary, as they seem to be closely related. I looked into this, and found something that also means the the patches in this series unfortunately won't work as expected: blk_queue_max_segment_size checks that we at least set the maximum segment size to the systen page size. This means we can't actually set the segment size to the virt boundary for the case where it's fixed 4k (iSER, NVMe). So I think we'll have to stick to setting max_sectors to ((max_segments - 1) * page_size) >> 9 for all these drivers. I'll retract this patch and will send a new one implementing this in iSER, and also research if a common helper for it makes sense. -- 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