Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251255
b: refs/heads/master
c: 68c88dd
h: refs/heads/master
i:
  251253: f31f40d
  251251: 677ef2f
  251247: 32d0ab9
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed May 12, 2011
1 parent 0f0720b commit 567fc27
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72468bfcb815bc9875a870973469f68e20c78717
refs/heads/master: 68c88dd7d3caf1737112238fbe91cccd8e7a69fc
32 changes: 32 additions & 0 deletions trunk/drivers/block/xen-blkback/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
30 changes: 0 additions & 30 deletions trunk/include/xen/blkif.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

0 comments on commit 567fc27

Please sign in to comment.