Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188734
b: refs/heads/master
c: c99eb1c
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Feb 26, 2010
1 parent f722b4e commit 48f2c42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e80a52d14f868059e8ec790c9fae88cdb8a1df98
refs/heads/master: c99eb1c7263a44e63161a041a778b345b5cf0b6a
21 changes: 4 additions & 17 deletions trunk/fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ static int __map_osds(struct ceph_osd_client *osdc,
struct ceph_pg pgid;
int o = -1;
int err;
struct ceph_osd *newosd = NULL;

dout("map_osds %p tid %lld\n", req, req->r_tid);
err = ceph_calc_object_layout(&reqhead->layout, req->r_oid,
Expand All @@ -639,25 +638,15 @@ static int __map_osds(struct ceph_osd_client *osdc,
if (req->r_osd) {
__cancel_request(req);
list_del_init(&req->r_osd_item);
if (list_empty(&req->r_osd->o_requests)) {
/* try to re-use r_osd if possible */
newosd = get_osd(req->r_osd);
__remove_osd(osdc, newosd);
}
req->r_osd = NULL;
}

req->r_osd = __lookup_osd(osdc, o);
if (!req->r_osd && o >= 0) {
if (newosd) {
req->r_osd = newosd;
newosd = NULL;
} else {
err = -ENOMEM;
req->r_osd = create_osd(osdc);
if (!req->r_osd)
goto out;
}
err = -ENOMEM;
req->r_osd = create_osd(osdc);
if (!req->r_osd)
goto out;

dout("map_osds osd %p is osd%d\n", req->r_osd, o);
req->r_osd->o_osd = o;
Expand All @@ -674,8 +663,6 @@ static int __map_osds(struct ceph_osd_client *osdc,
err = 1; /* osd changed */

out:
if (newosd)
put_osd(newosd);
return err;
}

Expand Down

0 comments on commit 48f2c42

Please sign in to comment.