From patchwork Thu Jul 19 21:08:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1218591 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 962FE3FD48 for ; Thu, 19 Jul 2012 21:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853Ab2GSVIv (ORCPT ); Thu, 19 Jul 2012 17:08:51 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:54224 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739Ab2GSVIv (ORCPT ); Thu, 19 Jul 2012 17:08:51 -0400 Received: by mail-gh0-f174.google.com with SMTP id r11so3302374ghr.19 for ; Thu, 19 Jul 2012 14:08:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=nnQuRUgOMDXLhLWf+SouXCpXyMgWLjI2rBiGMhPWGfM=; b=i/wPnR6g7cjnMOU2i1PdW9XwLABM8OlpcJl0NwkiR6/sl41rsKJCSHSs3qKjdGsWZQ Z8cKUJpqIsNLregoNmf7Bbze4MPbBSxlOPKQuLUOQO7vfxYHuvIGVSp3sEfbSL+6cqzi u68UkWXTtnHfLuZKS8QUjtQaL9EcX/aZ31oGdRWYT6sV9XcjWwSpnS4IbPaNtr5hNOUm 2GDWAG9KnbrPHkYHZH5J6KZLu2dsan5IUDZJ9NVJyn4XYK1l4rdzDNz8v3kJi2A33U9K XAXVNJvh2dILhhGvqKpl/FdMwG6ZOZybXAJCI5bFSDbIMqwL44UlxFext1BtWYsnrLVi b80w== Received: by 10.43.70.71 with SMTP id yf7mr2177053icb.14.1342732130501; Thu, 19 Jul 2012 14:08:50 -0700 (PDT) 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 pb3sm5440181igc.17.2012.07.19.14.08.49 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 14:08:49 -0700 (PDT) Message-ID: <50087760.5070204@inktank.com> Date: Thu, 19 Jul 2012 16:08:48 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 08/12] rbd: drop rbd_req_sync_exec() "ver" parameter References: <500874F5.4090205@inktank.com> In-Reply-To: <500874F5.4090205@inktank.com> X-Gm-Message-State: ALoCoQlDGDXAsX6Q6M+wfhTNKZIUWgREaAnw5+/ctZ1FIhDDxM2+WVbxxgckE79pgBZKFbUAKux+ Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The only place that passes a version pointer to rbd_req_sync_exec() is in rbd_header_add_snap(), and that spot ignores the result. The only thing rbd_req_sync_exec() does with its "ver" parameter is pass it directly to rbd_req_sync_op(). So we can just use a null pointer there, and drop the "ver" parameter to rbd_req_sync_exec(). Signed-off-by: Alex Elder --- drivers/block/rbd.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) int class_name_len = strlen(class_name); @@ -1398,7 +1397,7 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev, 0, CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK, ops, - object_name, 0, 0, NULL, NULL, ver); + object_name, 0, 0, NULL, NULL, NULL); rbd_destroy_ops(ops); @@ -1651,7 +1650,6 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev, u64 new_snapid; int ret; void *data, *p, *e; - u64 ver; struct ceph_mon_client *monc; /* we should create a snapshot only if we're pointing at the head */ @@ -1676,7 +1674,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, "rbd", "snap_add", - data, p - data, &ver); + data, p - data); kfree(data); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 955d75d..d4a8d9e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1374,8 +1374,7 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev, const char *class_name, const char *method_name, const char *data, - int len, - u64 *ver) + int len) { struct ceph_osd_req_op *ops;