Messages in this thread | | | Date | Tue, 11 Oct 2011 15:33:11 +0800 | Subject | Re: [PATCH 2/3] xen/blkback: Fix the inhibition to map pages when discarding sector ranges. | From | Li Dongyang <> |
| |
On Tue, Oct 11, 2011 at 3:25 PM, Jan Beulich <JBeulich@suse.com> wrote: >>>> On 10.10.11 at 17:28, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote: >> 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> >> --- >> drivers/block/xen-blkback/blkback.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/block/xen-blkback/blkback.c >> b/drivers/block/xen-blkback/blkback.c >> index 184b133..3da9a40 100644 >> --- a/drivers/block/xen-blkback/blkback.c >> +++ b/drivers/block/xen-blkback/blkback.c >> @@ -707,7 +707,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, >> * the hypercall to unmap the grants - that is all done in >> * xen_blkbk_unmap. >> */ >> - if (operation != BLKIF_OP_DISCARD && >> + if (operation != REQ_DISCARD && > > Why is that check necessary in the first place? xen_blkbk_map() doesn't > do any harm when req->nr_segments is zero (as could also be the case > on WRITE_FLUSH ones). > Ah, you are right, we could remove this check then, Thanks > Jan > >> xen_blkbk_map(req, pending_req, seg)) >> goto fail_flush; >> > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |