diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-11 16:23:39 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:43:20 -0400 |
commit | 68c88dd7d3caf1737112238fbe91cccd8e7a69fc (patch) | |
tree | 48d0d90892fc5de5d2a2c632f807a34f5794f53c | |
parent | 72468bfcb815bc9875a870973469f68e20c78717 (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>
-rw-r--r-- | drivers/block/xen-blkback/common.h | 32 | ||||
-rw-r--r-- | include/xen/blkif.h | 30 |
2 files changed, 32 insertions, 30 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 | ||
133 | struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be); | 133 | struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be); |
134 | 134 | ||
135 | static 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 | |||
151 | static 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__ */ |
diff --git a/include/xen/blkif.h b/include/xen/blkif.h index ab794269fc53..6ed7c01253b2 100644 --- a/include/xen/blkif.h +++ b/include/xen/blkif.h | |||
@@ -89,34 +89,4 @@ enum blkif_protocol { | |||
89 | BLKIF_PROTOCOL_X86_64 = 3, | 89 | BLKIF_PROTOCOL_X86_64 = 3, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | static void inline blkif_get_x86_32_req(struct blkif_request *dst, struct blkif_x86_32_request *src) | ||
93 | { | ||
94 | int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; | ||
95 | dst->operation = src->operation; | ||
96 | dst->nr_segments = src->nr_segments; | ||
97 | dst->handle = src->handle; | ||
98 | dst->id = src->id; | ||
99 | dst->u.rw.sector_number = src->sector_number; | ||
100 | barrier(); | ||
101 | if (n > dst->nr_segments) | ||
102 | n = dst->nr_segments; | ||
103 | for (i = 0; i < n; i++) | ||
104 | dst->u.rw.seg[i] = src->seg[i]; | ||
105 | } | ||
106 | |||
107 | static void inline blkif_get_x86_64_req(struct blkif_request *dst, struct blkif_x86_64_request *src) | ||
108 | { | ||
109 | int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; | ||
110 | dst->operation = src->operation; | ||
111 | dst->nr_segments = src->nr_segments; | ||
112 | dst->handle = src->handle; | ||
113 | dst->id = src->id; | ||
114 | dst->u.rw.sector_number = src->sector_number; | ||
115 | barrier(); | ||
116 | if (n > dst->nr_segments) | ||
117 | n = dst->nr_segments; | ||
118 | for (i = 0; i < n; i++) | ||
119 | dst->u.rw.seg[i] = src->seg[i]; | ||
120 | } | ||
121 | |||
122 | #endif /* __XEN_BLKIF_H__ */ | 92 | #endif /* __XEN_BLKIF_H__ */ |