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 mapping the pages unnecessarily.
CC: Li Dongyang <lidongyang@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* the hypercall to unmap the grants - that is all done in
* xen_blkbk_unmap.
*/
- if (operation != BLKIF_OP_DISCARD &&
+ if (operation != REQ_DISCARD &&
xen_blkbk_map(req, pending_req, seg))
goto fail_flush;