diff options
author | Sage Weil <sage@inktank.com> | 2012-09-25 00:02:47 -0400 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2012-10-01 18:20:00 -0400 |
commit | 6cae3717cddaf8e5e96e304733dca66e40d56f89 (patch) | |
tree | e8b6d6f977557ba7e7c5dd24df702fa27a509c41 /drivers/block | |
parent | 6816282dab3a72efe8c0d182c1bc2960d87f4322 (diff) |
rbd: BUG on invalid layout
This shouldn't actually be possible because the layout struct is
constructed from the RBD header and validated then.
[elder@inktank.com: converted BUG() call to equivalent rbd_assert()]
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 2f1bef8c1d88..bb3d9be3b1b4 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1020,8 +1020,9 @@ static int rbd_do_request(struct request *rq, | |||
1020 | layout->fl_stripe_count = cpu_to_le32(1); | 1020 | layout->fl_stripe_count = cpu_to_le32(1); |
1021 | layout->fl_object_size = cpu_to_le32(1 << RBD_MAX_OBJ_ORDER); | 1021 | layout->fl_object_size = cpu_to_le32(1 << RBD_MAX_OBJ_ORDER); |
1022 | layout->fl_pg_pool = cpu_to_le32(rbd_dev->pool_id); | 1022 | layout->fl_pg_pool = cpu_to_le32(rbd_dev->pool_id); |
1023 | ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno, | 1023 | ret = ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno, |
1024 | req, ops); | 1024 | req, ops); |
1025 | rbd_assert(ret == 0); | ||
1025 | 1026 | ||
1026 | ceph_osdc_build_request(req, ofs, &len, | 1027 | ceph_osdc_build_request(req, ofs, &len, |
1027 | ops, | 1028 | ops, |