]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/blkback: Fix the inhibition to map pages when discarding sector ranges.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 10 Oct 2011 04:47:49 +0000 (00:47 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 11 Oct 2011 19:02:55 +0000 (15:02 -0400)
commit12679b29b2f828454f833e17e9090ed576c63afc
tree406f793cf07f05b1bd8a06a6f2f043b18e32148a
parenta1253dfff5331e289c0eca6beb8d9ceff967b8d3
xen/blkback: Fix the inhibition to map pages when discarding sector ranges.

The 'operation' parameters are the ones provided to the bio layer while
the req->operation are the ones passed in between the backend and
frontend. We used the wrong 'operation' value to squash the
call to map pages when processing the discard operation resulting
in an hypercall that did nothing. Lets guard against going in the
mapping function by checking for the amount of segments.

CC: Li Dongyang <lidongyang@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c