diff options
| author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-01-27 10:40:18 -0500 |
|---|---|---|
| committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-01-27 16:57:03 -0500 |
| commit | 22116525baec1d63f4878eaa92f0b57946a78819 (patch) | |
| tree | 8630a9fdeec976e58fea4f0c131dabbf193a82f3 /include/linux/ceph | |
| parent | 0b4af2e8c9f3fc9c31d2f9374b79af2c890ef897 (diff) | |
libceph: start using oloc abstraction
Instead of relying on pool fields in ceph_file_layout (for mapping) and
ceph_pg (for enconding), start using ceph_object_locator (oloc)
abstraction. Note that userspace oloc currently consists of pool, key,
nspace and hash fields, while this one contains only a pool. This is
OK, because at this point we only send (i.e. encode) olocs and never
have to receive (i.e. decode) them.
This makes keeping a copy of ceph_file_layout in every osd request
unnecessary, so ceph_osd_request::r_file_layout field is nuked.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/ceph')
| -rw-r--r-- | include/linux/ceph/osd_client.h | 3 | ||||
| -rw-r--r-- | include/linux/ceph/osdmap.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 4fb6a8938957..5b8555109789 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -159,12 +159,13 @@ struct ceph_osd_request { | |||
| 159 | struct inode *r_inode; /* for use by callbacks */ | 159 | struct inode *r_inode; /* for use by callbacks */ |
| 160 | void *r_priv; /* ditto */ | 160 | void *r_priv; /* ditto */ |
| 161 | 161 | ||
| 162 | struct ceph_object_locator r_oloc; | ||
| 163 | |||
| 162 | char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */ | 164 | char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */ |
| 163 | int r_oid_len; | 165 | int r_oid_len; |
| 164 | u64 r_snapid; | 166 | u64 r_snapid; |
| 165 | unsigned long r_stamp; /* send OR check time */ | 167 | unsigned long r_stamp; /* send OR check time */ |
| 166 | 168 | ||
| 167 | struct ceph_file_layout r_file_layout; | ||
| 168 | struct ceph_snap_context *r_snapc; /* snap context for writes */ | 169 | struct ceph_snap_context *r_snapc; /* snap context for writes */ |
| 169 | }; | 170 | }; |
| 170 | 171 | ||
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index d05cc4451af6..256134af4ad4 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -40,8 +40,7 @@ struct ceph_pg_pool_info { | |||
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | struct ceph_object_locator { | 42 | struct ceph_object_locator { |
| 43 | uint64_t pool; | 43 | s64 pool; |
| 44 | char *key; | ||
| 45 | }; | 44 | }; |
| 46 | 45 | ||
| 47 | struct ceph_pg_mapping { | 46 | struct ceph_pg_mapping { |
