From patchwork Tue Jan 22 22:30:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2021161 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 387BD3FD1A for ; Tue, 22 Jan 2013 22:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753097Ab3AVWaH (ORCPT ); Tue, 22 Jan 2013 17:30:07 -0500 Received: from mail-ia0-f174.google.com ([209.85.210.174]:53014 "EHLO mail-ia0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752537Ab3AVWaG (ORCPT ); Tue, 22 Jan 2013 17:30:06 -0500 Received: by mail-ia0-f174.google.com with SMTP id o25so3618199iad.33 for ; Tue, 22 Jan 2013 14:30:06 -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=5NSoME+NYRFpZnTo78b6THAPIWzSaBvGrvSy/EDNt+M=; b=A4K2MHCxJsXhMl7uo0QVlgpeve6G7jh2HrZ1SzFFs1C1i77VfVJvWjbfij7sSL2Nr/ i6AqqWg7H2G3orKrVjUr/f2Po+4ctb2ogDf3mnFPe6QIXmNFDtAFXlqDeAawLUwgvGDr iC7/CfjXACfn32zIForq1GUS3oRajlaet6UCTRKNNumL3VF4Hpw2gUpI7YWyAu3NzVjm XI32Yu+UECK0PQ7tmbjwrT/pl24cqrnKq97K88Zqy/TlzkvLmunTD1CP/Pi2Qj+IPpJB uThW6/zqY5aebortw7sw1YIUbLdQTyq1Sp/64DAiS3ehNdBbLUih2nSbdLyWhvleXa26 vPbw== X-Received: by 10.50.187.197 with SMTP id fu5mr12709337igc.95.1358893806064; Tue, 22 Jan 2013 14:30:06 -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 j11sm12976401igc.5.2013.01.22.14.30.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jan 2013 14:30:05 -0800 (PST) Message-ID: <50FF12EB.2000208@inktank.com> Date: Tue, 22 Jan 2013 16:30:03 -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] rbd: get rid of rbd_req_sync_watch() References: <50FF11EA.3000808@inktank.com> In-Reply-To: <50FF11EA.3000808@inktank.com> X-Gm-Message-State: ALoCoQkI0PrS7Uc8ad4Fb6yqtJ0nBaxkKfG09hPWXgwMthoLJGjWzlMRtbqZsrTBdzvYqodMF80k 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 --- drivers/block/rbd.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) * Synchronous osd object method call @@ -3956,7 +3915,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 3c110b3..7dedd18 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1340,47 +1340,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; -} /*