diff options
author | Jennifer Herbert <jennifer.herbert@citrix.com> | 2015-01-05 16:49:22 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-01-28 14:03:16 +0000 |
commit | c43cf3ea838541ea9f066f4f1aa7b197cba6276e (patch) | |
tree | 36e8b188920c0b47074397234bd9b923338f5f34 /drivers/block/xen-blkback/common.h | |
parent | 745282256c754ac5ed3dbe2fbef6471dc1373417 (diff) | |
download | op-kernel-dev-c43cf3ea838541ea9f066f4f1aa7b197cba6276e.zip op-kernel-dev-c43cf3ea838541ea9f066f4f1aa7b197cba6276e.tar.gz |
xen-blkback: safely unmap grants in case they are still in use
Use gnttab_unmap_refs_async() to wait until the mapped pages are no
longer in use before unmapping them.
This allows blkback to use network storage which may retain refs to
pages in queued skbs after the block I/O has completed.
Signed-off-by: Jennifer Herbert <jennifer.herbert@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jens Axboe <axboe@kernel.de>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/block/xen-blkback/common.h')
-rw-r--r-- | drivers/block/xen-blkback/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index f65b807..cc90a84 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -350,6 +350,9 @@ struct pending_req { struct grant_page *indirect_pages[MAX_INDIRECT_PAGES]; struct seg_buf seg[MAX_INDIRECT_SEGMENTS]; struct bio *biolist[MAX_INDIRECT_SEGMENTS]; + struct gnttab_unmap_grant_ref unmap[MAX_INDIRECT_SEGMENTS]; + struct page *unmap_pages[MAX_INDIRECT_SEGMENTS]; + struct gntab_unmap_queue_data gnttab_unmap_data; }; |