From patchwork Thu Jan 24 16:34:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2033811 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 11DCDDF264 for ; Thu, 24 Jan 2013 16:34:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384Ab3AXQeZ (ORCPT ); Thu, 24 Jan 2013 11:34:25 -0500 Received: from mail-ia0-f173.google.com ([209.85.210.173]:60995 "EHLO mail-ia0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893Ab3AXQeY (ORCPT ); Thu, 24 Jan 2013 11:34:24 -0500 Received: by mail-ia0-f173.google.com with SMTP id l29so5085421iag.18 for ; Thu, 24 Jan 2013 08:34:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=RnLDWL0S+A/0zDuaq+urD3I3EAcJuRrH4L9c2HPBl2Q=; b=cEVRtTvJcz7RslPOSPorqOKIKTBEseu8+Z6CoVW/Rrn+/n4xiPjuTr/grEVmRDv9ad WLvUS6bL8/rQbjLa06jo6cYjguKEsKokZQKHvO/ycwRNyN0H7744nG5hUanMV3NAwcaB 0BYQFvsrtuX5BUdNQg+68Yt+2uLhMFk2jUGQ7P2EmzmGzNx8CJK5Udk7JnIFC876nl7r pXGTA57sGiiUDG4YkJ6P9TRs8bWMUzJ0BU0dWWEBhI8TGyAeD+/l8RJBR2RPQ67/iXey jnWaTgKlTP8BLe2XdTaR5nAvGhUmFWOfyrzoR/eqbbyQBgdf7MYjUGReigoABmg1W5RY 8LgQ== X-Received: by 10.50.171.42 with SMTP id ar10mr1910134igc.64.1359045264107; Thu, 24 Jan 2013 08:34:24 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id px5sm1504840igc.0.2013.01.24.08.34.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jan 2013 08:34:23 -0800 (PST) Message-ID: <5101628D.9040607@inktank.com> Date: Thu, 24 Jan 2013 10:34:21 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org" Subject: [PATCH 07/12, v2] rbd: get rid of rbd_req_sync_watch() References: <50FF11EA.3000808@inktank.com> <50FF128B.1030405@inktank.com> <5101406E.4060602@inktank.com> In-Reply-To: <5101406E.4060602@inktank.com> X-Gm-Message-State: ALoCoQn0xJIHf0fe6GSEgDQKlp3A0SsXOWR7/czQfeu1i6efUECT6sbLVfjGh9xfr0OMyu7Nla8d Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Get rid of rbd_req_sync_watch(), because it is no longer used. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) * Synchronous osd object method call @@ -3960,7 +3919,6 @@ static int rbd_dev_probe_finish(struct rbd_device *rbd_dev) if (ret) goto err_out_bus; - (void) rbd_req_sync_watch; /* avoid a warning */ ret = rbd_dev_header_watch_sync(rbd_dev, 1); if (ret) goto err_out_bus; diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 7b1eddc..8f659f3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1367,47 +1367,6 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data) rbd_req_sync_notify_ack(rbd_dev, hver, notify_id); } -/* - * Request sync osd watch/unwatch. The value of "start" determines - * whether a watch request is being initiated or torn down. - */ -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; - - osdc = &rbd_dev->rbd_client->client->osdc; - ret = ceph_osdc_create_event(osdc, rbd_watch_cb, 0, rbd_dev, - &rbd_dev->watch_event); - if (ret < 0) - return ret; - } - - op = rbd_osd_req_op_create(CEPH_OSD_OP_WATCH, - rbd_dev->watch_event->cookie, - rbd_dev->header.obj_version, start); - if (op) - ret = rbd_req_sync_op(rbd_dev, - CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK, - op, rbd_dev->header_name, - 0, 0, NULL, NULL); - - /* Cancel the event if we're tearing down, or on error */ - - if (!start || !op || ret < 0) { - ceph_osdc_cancel_event(rbd_dev->watch_event); - rbd_dev->watch_event = NULL; - } - rbd_osd_req_op_destroy(op); - - return ret; -} /*