virtio: block: dynamic maximum segments
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 30 Dec 2008 15:26:05 +0000 (09:26 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Dec 2008 22:56:05 +0000 (09:26 +1030)
Enhance the driver to handle whatever maximum segment number the host
tells us to handle.  Do to this, we need to allocate the scatterlist
dynamically.

We set max_phys_segments and max_hw_segments to the same value (1 if
the host doesn't tell us, since that's safest and all known hosts do
tell us).

Note that kmalloc'ing the structure for large sg_elems might be
problematic: the fix for this is sg_table, but that requires more
work.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found