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 | d178a9e74006e80f568d87e29f2a68f14fc7cbb1 (patch) | |
tree | a7f59f104771c9ad4ed4f2d86d7e3a2299e932a8 /drivers/block | |
parent | e75b45cf36565fd8ba206a9d80f670a86e61ba2f (diff) |
libceph: don't set flags in ceph_osdc_alloc_request()
The only thing ceph_osdc_alloc_request() really does with the
flags value it is passed is assign it to the newly-created
osd request structure. Do that in the caller instead.
Both callers subsequently call ceph_osdc_build_request(), so have
that function (instead of ceph_osdc_alloc_request()) issue a warning
if a request comes through with neither the read nor write flags set.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ac8fd3856509..bdbaa4cfd9d3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1148,13 +1148,14 @@ static int rbd_do_request(struct request *rq, | |||
1148 | (unsigned long long) len, coll, coll_index); | 1148 | (unsigned long long) len, coll, coll_index); |
1149 | 1149 | ||
1150 | osdc = &rbd_dev->rbd_client->client->osdc; | 1150 | osdc = &rbd_dev->rbd_client->client->osdc; |
1151 | osd_req = ceph_osdc_alloc_request(osdc, flags, snapc, ops, | 1151 | osd_req = ceph_osdc_alloc_request(osdc, snapc, ops, |
1152 | false, GFP_NOIO, pages, bio); | 1152 | false, GFP_NOIO, pages, bio); |
1153 | if (!osd_req) { | 1153 | if (!osd_req) { |
1154 | ret = -ENOMEM; | 1154 | ret = -ENOMEM; |
1155 | goto done_pages; | 1155 | goto done_pages; |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | osd_req->r_flags = flags; | ||
1158 | osd_req->r_callback = rbd_cb; | 1159 | osd_req->r_callback = rbd_cb; |
1159 | 1160 | ||
1160 | rbd_req->rq = rq; | 1161 | rbd_req->rq = rq; |