Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359615
b: refs/heads/master
c: c043064
h: refs/heads/master
i:
  359613: c74375f
  359611: b6d3f7f
  359607: c945f5f
  359599: b1bc334
  359583: c20c9ec
  359551: 3d99242
v: v3
  • Loading branch information
Alex Elder committed Jan 25, 2013
1 parent e9e95ec commit 79f36e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 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: 38901e0f240b634467fb31743365af80a006be33
refs/heads/master: c04306471ad93f1daf60771a0373316d4c3494ae
23 changes: 4 additions & 19 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,9 @@ static int rbd_req_sync_watch(struct rbd_device *rbd_dev, int start)
struct ceph_osd_req_op *op;
int ret = 0;

rbd_assert(start ^ !!rbd_dev->watch_event);
rbd_assert(start ^ !!rbd_dev->watch_request);

if (start) {
struct ceph_osd_client *osdc;

Expand All @@ -1482,8 +1485,6 @@ static int rbd_req_sync_watch(struct rbd_device *rbd_dev, int start)
&rbd_dev->watch_event);
if (ret < 0)
return ret;
} else {
rbd_assert(rbd_dev->watch_request != NULL);
}

op = rbd_osd_req_op_create(CEPH_OSD_OP_WATCH,
Expand Down Expand Up @@ -3023,22 +3024,6 @@ static void rbd_bus_del_dev(struct rbd_device *rbd_dev)
device_unregister(&rbd_dev->dev);
}

static int rbd_init_watch_dev(struct rbd_device *rbd_dev)
{
int ret, rc;

do {
ret = rbd_req_sync_watch(rbd_dev, 1);
if (ret == -ERANGE) {
rc = rbd_dev_refresh(rbd_dev, NULL);
if (rc < 0)
return rc;
}
} while (ret == -ERANGE);

return ret;
}

static atomic64_t rbd_dev_id_max = ATOMIC64_INIT(0);

/*
Expand Down Expand Up @@ -3584,7 +3569,7 @@ static int rbd_dev_probe_finish(struct rbd_device *rbd_dev)
if (ret)
goto err_out_bus;

ret = rbd_init_watch_dev(rbd_dev);
ret = rbd_req_sync_watch(rbd_dev, 1);
if (ret)
goto err_out_bus;

Expand Down

0 comments on commit 79f36e3

Please sign in to comment.