diff options
| author | Alex Elder <elder@inktank.com> | 2013-02-14 13:16:43 -0500 |
|---|---|---|
| committer | Sage Weil <sage@inktank.com> | 2013-05-02 00:16:25 -0400 |
| commit | 2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c (patch) | |
| tree | af95ff579ab1719871e8678ef530db46514c0eb7 /include/linux | |
| parent | 2794a82a11cfeae0890741b18b0049ddb55ce646 (diff) | |
libceph: distinguish page and bio requests
An osd request uses either pages or a bio list for its data. Use a
union to record information about the two, and add a data type
tag to select between them.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ceph/osd_client.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 600b8278d11e..56604b33dc3c 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -50,8 +50,17 @@ struct ceph_osd { | |||
| 50 | 50 | ||
| 51 | #define CEPH_OSD_MAX_OP 10 | 51 | #define CEPH_OSD_MAX_OP 10 |
| 52 | 52 | ||
| 53 | enum ceph_osd_data_type { | ||
| 54 | CEPH_OSD_DATA_TYPE_NONE, | ||
| 55 | CEPH_OSD_DATA_TYPE_PAGES, | ||
| 56 | #ifdef CONFIG_BLOCK | ||
| 57 | CEPH_OSD_DATA_TYPE_BIO, | ||
| 58 | #endif /* CONFIG_BLOCK */ | ||
| 59 | }; | ||
| 60 | |||
| 53 | struct ceph_osd_data { | 61 | struct ceph_osd_data { |
| 54 | struct { | 62 | enum ceph_osd_data_type type; |
| 63 | union { | ||
| 55 | struct { | 64 | struct { |
| 56 | struct page **pages; | 65 | struct page **pages; |
| 57 | u32 num_pages; | 66 | u32 num_pages; |
