mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 06:39:32 -04:00
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:
parent
087bfb0e6b
commit
518c824362
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue