Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cae3717 authored by Sage Weil's avatar Sage Weil Committed by Alex Elder
Browse files

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: default avatarSage Weil <sage@inktank.com>
Reviewed-by: default avatarAlex Elder <elder@inktank.com>
parent 6816282d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1020,8 +1020,9 @@ static int rbd_do_request(struct request *rq,
	layout->fl_stripe_count = cpu_to_le32(1);
	layout->fl_object_size = cpu_to_le32(1 << RBD_MAX_OBJ_ORDER);
	layout->fl_pg_pool = cpu_to_le32(rbd_dev->pool_id);
	ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno,
	ret = ceph_calc_raw_layout(osdc, layout, snapid, ofs, &len, &bno,
				   req, ops);
	rbd_assert(ret == 0);

	ceph_osdc_build_request(req, ofs, &len,
				ops,