xen/blkback: Move blkif_get_x86_[32|64]_req to common.h in block/xen-blkback dir.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 11 May 2011 20:23:39 +0000 (16:23 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 12 May 2011 20:43:20 +0000 (16:43 -0400)
From the blkif.h header, which was exposed to the frontend.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/common.h
include/xen/blkif.h

index da96e3eaa6414ce51cad30a53a7dcc2c4ad424bb..647d974da3928d8d14a698e57b0252cae4821939 100644 (file)
@@ -132,4 +132,36 @@ int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,
 
 struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be);
 
+static void inline blkif_get_x86_32_req(struct blkif_request *dst,
+                                       struct blkif_x86_32_request *src)
+{
+       int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
+       dst->operation = src->operation;
+       dst->nr_segments = src->nr_segments;
+       dst->handle = src->handle;
+       dst->id = src->id;
+       dst->u.rw.sector_number = src->sector_number;
+       barrier();
+       if (n > dst->nr_segments)
+               n = dst->nr_segments;
+       for (i = 0; i < n; i++)
+               dst->u.rw.seg[i] = src->seg[i];
+}
+
+static void inline blkif_get_x86_64_req(struct blkif_request *dst,
+                                       struct blkif_x86_64_request *src)
+{
+       int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
+       dst->operation = src->operation;
+       dst->nr_segments = src->nr_segments;
+       dst->handle = src->handle;
+       dst->id = src->id;
+       dst->u.rw.sector_number = src->sector_number;
+       barrier();
+       if (n > dst->nr_segments)
+               n = dst->nr_segments;
+       for (i = 0; i < n; i++)
+               dst->u.rw.seg[i] = src->seg[i];
+}
+
 #endif /* __BLKIF__BACKEND__COMMON_H__ */
index ab794269fc535540f173382e91da3a1b03e9a0cc..6ed7c01253b2bd7a15285b83da20cd30cc6a8078 100644 (file)
@@ -89,34 +89,4 @@ enum blkif_protocol {
        BLKIF_PROTOCOL_X86_64 = 3,
 };
 
-static void inline blkif_get_x86_32_req(struct blkif_request *dst, struct blkif_x86_32_request *src)
-{
-       int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
-       dst->operation = src->operation;
-       dst->nr_segments = src->nr_segments;
-       dst->handle = src->handle;
-       dst->id = src->id;
-       dst->u.rw.sector_number = src->sector_number;
-       barrier();
-       if (n > dst->nr_segments)
-               n = dst->nr_segments;
-       for (i = 0; i < n; i++)
-               dst->u.rw.seg[i] = src->seg[i];
-}
-
-static void inline blkif_get_x86_64_req(struct blkif_request *dst, struct blkif_x86_64_request *src)
-{
-       int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST;
-       dst->operation = src->operation;
-       dst->nr_segments = src->nr_segments;
-       dst->handle = src->handle;
-       dst->id = src->id;
-       dst->u.rw.sector_number = src->sector_number;
-       barrier();
-       if (n > dst->nr_segments)
-               n = dst->nr_segments;
-       for (i = 0; i < n; i++)
-               dst->u.rw.seg[i] = src->seg[i];
-}
-
 #endif /* __XEN_BLKIF_H__ */