]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
virtio-blk: fix minimum number of S/G elements
authorChristoph Hellwig <hch@lst.de>
Tue, 25 May 2010 12:17:54 +0000 (14:17 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 3 Jun 2010 13:09:18 +0000 (22:39 +0930)
commita5b365a652206ca300256974ed9301a7d241a6ed
tree1898846dcce5b1815f8e13d7b0b610c83be1da7f
parentaef4b9aaae1decc775778903922bd0075cce7a88
virtio-blk: fix minimum number of S/G elements

We need at least one S/G element to operate properly, as does the block
layer which increments it to one anyway.  We hit this due to a qemu
bug which advertises a sg_elements of 0 under some circumstances.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (tweaked logic)
drivers/block/virtio_blk.c