aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-07-25 10:32:40 -0400
committerSage Weil <sage@inktank.com>2012-07-30 21:15:52 -0400
commit0e6f322d550a104b2065288c9f6426d5c0414b76 (patch)
treee941cdba172c02286b1528f530cbeb8b984347d1 /drivers/block
parent14e7085d8460bf45e7145524a13802f1f4f9d81f (diff)
rbd: drop "object_name" from rbd_req_sync_watch()
rbd_req_sync_watch() is only called in one place, and in that place it passes rbd_dev->header_name as the value of the "object_name" parameter. This value is available within the function already. Having the extra parameter leaves the impression the object name could take on different values, but it does not. So get rid of the parameter. We can always add it back again if we find we want to watch some other object in the future. 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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 9e960c3ce1c4..b8e557fbf73b 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1238,9 +1238,7 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
1238/* 1238/*
1239 * Request sync osd watch 1239 * Request sync osd watch
1240 */ 1240 */
1241static int rbd_req_sync_watch(struct rbd_device *rbd_dev, 1241static int rbd_req_sync_watch(struct rbd_device *rbd_dev)
1242 const char *object_name,
1243 u64 ver)
1244{ 1242{
1245 struct ceph_osd_req_op *ops; 1243 struct ceph_osd_req_op *ops;
1246 struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc; 1244 struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc;
@@ -1254,7 +1252,7 @@ static int rbd_req_sync_watch(struct rbd_device *rbd_dev,
1254 if (ret < 0) 1252 if (ret < 0)
1255 goto fail; 1253 goto fail;
1256 1254
1257 ops[0].watch.ver = cpu_to_le64(ver); 1255 ops[0].watch.ver = cpu_to_le64(rbd_dev->header.obj_version);
1258 ops[0].watch.cookie = cpu_to_le64(rbd_dev->watch_event->cookie); 1256 ops[0].watch.cookie = cpu_to_le64(rbd_dev->watch_event->cookie);
1259 ops[0].watch.flag = 1; 1257 ops[0].watch.flag = 1;
1260 1258
@@ -1263,7 +1261,8 @@ static int rbd_req_sync_watch(struct rbd_device *rbd_dev,
1263 0, 1261 0,
1264 CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK, 1262 CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK,
1265 ops, 1263 ops,
1266 object_name, 0, 0, NULL, 1264 rbd_dev->header_name,
1265 0, 0, NULL,
1267 &rbd_dev->watch_request, NULL); 1266 &rbd_dev->watch_request, NULL);
1268 1267
1269 if (ret < 0) 1268 if (ret < 0)
@@ -2190,8 +2189,7 @@ static int rbd_init_watch_dev(struct rbd_device *rbd_dev)
2190 int ret, rc; 2189 int ret, rc;
2191 2190
2192 do { 2191 do {
2193 ret = rbd_req_sync_watch(rbd_dev, rbd_dev->header_name, 2192 ret = rbd_req_sync_watch(rbd_dev);
2194 rbd_dev->header.obj_version);
2195 if (ret == -ERANGE) { 2193 if (ret == -ERANGE) {
2196 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); 2194 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
2197 rc = __rbd_refresh_header(rbd_dev); 2195 rc = __rbd_refresh_header(rbd_dev);