aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-11 16:23:39 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-12 16:43:20 -0400
commit68c88dd7d3caf1737112238fbe91cccd8e7a69fc (patch)
tree48d0d90892fc5de5d2a2c632f807a34f5794f53c /drivers/block
parent72468bfcb815bc9875a870973469f68e20c78717 (diff)
xen/blkback: Move blkif_get_x86_[32|64]_req to common.h in block/xen-blkback dir.
From the blkif.h header, which was exposed to the frontend. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkback/common.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index da96e3eaa641..647d974da392 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -132,4 +132,36 @@ int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,
132 132
133struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be); 133struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be);
134 134
135static void inline blkif_get_x86_32_req(struct blkif_request *dst,
136 struct blkif_x86_32_request *src)
137{
138 int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
139 dst->operation = src->operation;
140 dst->nr_segments = src->nr_segments;
141 dst->handle = src->handle;
142 dst->id = src->id;
143 dst->u.rw.sector_number = src->sector_number;
144 barrier();
145 if (n > dst->nr_segments)
146 n = dst->nr_segments;
147 for (i = 0; i < n; i++)
148 dst->u.rw.seg[i] = src->seg[i];
149}
150
151static void inline blkif_get_x86_64_req(struct blkif_request *dst,
152 struct blkif_x86_64_request *src)
153{
154 int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
155 dst->operation = src->operation;
156 dst->nr_segments = src->nr_segments;
157 dst->handle = src->handle;
158 dst->id = src->id;
159 dst->u.rw.sector_number = src->sector_number;
160 barrier();
161 if (n > dst->nr_segments)
162 n = dst->nr_segments;
163 for (i = 0; i < n; i++)
164 dst->u.rw.seg[i] = src->seg[i];
165}
166
135#endif /* __BLKIF__BACKEND__COMMON_H__ */ 167#endif /* __BLKIF__BACKEND__COMMON_H__ */