summaryrefslogtreecommitdiff
path: root/include/linux/ceph/osdmap.h
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-09-24 20:59:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-05 09:56:50 +0100
commit343c7f0dcb36f71bc4edfc602eb8c20faf88fa65 (patch)
tree0f9aaa44e031956847907210297737dc495ab08b /include/linux/ceph/osdmap.h
parent1ad6768c537d57fec3dcb249cd384332cfacfe24 (diff)
libceph: check for invalid mapping
commit d63b77f4c552cc3a20506871046ab0fcbc332609 upstream. If we encounter an invalid (e.g., zeroed) mapping, return an error and avoid a divide by zero. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r--include/linux/ceph/osdmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 311ef8d6aa9e..e88a620b9f8a 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -109,9 +109,9 @@ extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
/* calculate mapping of a file extent to an object */
-extern void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
- u64 off, u64 *plen,
- u64 *bno, u64 *oxoff, u64 *oxlen);
+extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
+ u64 off, u64 *plen,
+ u64 *bno, u64 *oxoff, u64 *oxlen);
/* calculate mapping of object to a placement group */
extern int ceph_calc_object_layout(struct ceph_object_layout *ol,