diff options
author | Alex Elder <elder@inktank.com> | 2012-11-13 22:11:15 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-01-17 16:52:05 -0500 |
commit | 4d6b250bf18d44571d69a0f4afec4b6a1969729f (patch) | |
tree | 8f357c6f3a8871ff678cb6a9e024d1282f8c5dfb /drivers/block | |
parent | e8afad656cbcd06d02a7bacd4b318fa0e2907de0 (diff) |
libceph: drop snapid in ceph_calc_raw_layout()
A snapshot id must be provided to ceph_calc_raw_layout() even though
it is not needed at all for calculating the layout.
Where the snapshot id *is* needed is when building the request
message for an osd operation.
Drop the snapid parameter from ceph_calc_raw_layout() and pass
that value instead in ceph_osdc_build_request().
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index c1b135b6cb97..fa371868e9b0 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1169,10 +1169,10 @@ static int rbd_do_request(struct request *rq, | |||
1169 | 1169 | ||
1170 | rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id); | 1170 | rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id); |
1171 | ret = ceph_calc_raw_layout(osdc, &osd_req->r_file_layout, | 1171 | ret = ceph_calc_raw_layout(osdc, &osd_req->r_file_layout, |
1172 | snapid, ofs, &len, &bno, osd_req, ops); | 1172 | ofs, &len, &bno, osd_req, ops); |
1173 | rbd_assert(ret == 0); | 1173 | rbd_assert(ret == 0); |
1174 | 1174 | ||
1175 | ceph_osdc_build_request(osd_req, ofs, len, ops, snapc, &mtime); | 1175 | ceph_osdc_build_request(osd_req, ofs, len, ops, snapc, snapid, &mtime); |
1176 | 1176 | ||
1177 | if (linger_req) { | 1177 | if (linger_req) { |
1178 | ceph_osdc_set_request_linger(osdc, osd_req); | 1178 | ceph_osdc_set_request_linger(osdc, osd_req); |