Set correct maximum I/O length. We can only handle I/O of up to

max_request_segments * PAGE_SIZE if the I/O is page-aligned; the
largest I/O we can guarantee will work is PAGE_SIZE less than that.
This unbreaks 'diskinfo -t'.
This commit is contained in:
Colin Percival 2010-12-06 20:40:15 +00:00
parent 087bfb0e6b
commit 518c824362
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216241

View File

@ -508,7 +508,7 @@ blkfront_initialize(struct xb_softc *sc)
sc->ring_pages = 1;
sc->max_requests = BLKIF_MAX_RING_REQUESTS(PAGE_SIZE);
sc->max_request_segments = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK;
sc->max_request_size = sc->max_request_segments * PAGE_SIZE;
sc->max_request_size = (sc->max_request_segments - 1) * PAGE_SIZE;
sc->max_request_blocks = BLKIF_SEGS_TO_BLOCKS(sc->max_request_segments);
/*