svn commit: r216241 - head/sys/dev/xen/blkfront
Colin Percival
cperciva at FreeBSD.org
Mon Dec 6 20:40:16 UTC 2010
Author: cperciva
Date: Mon Dec 6 20:40:15 2010
New Revision: 216241
URL: http://svn.freebsd.org/changeset/base/216241
Log:
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'.
Modified:
head/sys/dev/xen/blkfront/blkfront.c
Modified: head/sys/dev/xen/blkfront/blkfront.c
==============================================================================
--- head/sys/dev/xen/blkfront/blkfront.c Mon Dec 6 19:15:38 2010 (r216240)
+++ head/sys/dev/xen/blkfront/blkfront.c Mon Dec 6 20:40:15 2010 (r216241)
@@ -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);
/*
More information about the svn-src-head
mailing list