From patchwork Sat Jan 26 20:40:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2050301 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 A59EC3FCDE for ; Sat, 26 Jan 2013 20:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754307Ab3AZUk5 (ORCPT ); Sat, 26 Jan 2013 15:40:57 -0500 Received: from mail-ia0-f171.google.com ([209.85.210.171]:43409 "EHLO mail-ia0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754292Ab3AZUk4 (ORCPT ); Sat, 26 Jan 2013 15:40:56 -0500 Received: by mail-ia0-f171.google.com with SMTP id z13so2435197iaz.30 for ; Sat, 26 Jan 2013 12:40:56 -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=YQdXLIg0D4ohC3oRsPU1r2LG38v5GDGz0XSCspgwaHM=; b=aS6PXH5FspmOJqE/5RDYXUUML6O9sfhLDCLXHKKLXD6E6ESu7x5K8Xpz4SUt2joeJe PXY/ZDzVidveTRUt6Q4tjP/Hb/QF33QZICbOASBwNEUbx5u8h7ddcfQmW/VLF+ySIwGw fqojwGTPiE8Vb4cag2q6bdeodLLfVSov1F7+9GXExqd5sArnXMpFoos/63ZKb5OgArr9 Lkx/0mV4Z2Dxlz7ltKctEYs5g0ot1zrkOFL75PGCuq9cbafhiLTofUwl+Irf57kT1f2U a1NHDdp3PE1xW6DN5imWc1H7CqPKTPO5qW6ljg8CdEGU4iTxIu/OdcI+Zd0VR9yfxX9l bSzw== X-Received: by 10.50.187.225 with SMTP id fv1mr1706259igc.96.1359232855912; Sat, 26 Jan 2013 12:40:55 -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 ww6sm2154156igb.2.2013.01.26.12.40.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Jan 2013 12:40:54 -0800 (PST) Message-ID: <51043F56.9070500@inktank.com> Date: Sat, 26 Jan 2013 14:40:54 -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 2/4] rbd: track object rather than osd request for watch References: <51043EF2.4070305@inktank.com> In-Reply-To: <51043EF2.4070305@inktank.com> X-Gm-Message-State: ALoCoQmjXE7dcTOlgXpcDTIzQq+XXo965gPb+XduTCwQmonnocHkqBWrsAhJw3I+eotF9ioyiUq2 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Switch to keeping track of the object request pointer rather than the osd request used to watch the rbd image header object. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ret = rbd_obj_request_submit(osdc, obj_request); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 363a813..4e78402 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -270,7 +270,7 @@ struct rbd_device { struct ceph_file_layout layout; struct ceph_osd_event *watch_event; - struct ceph_osd_request *watch_request; + struct rbd_obj_request *watch_request; struct rbd_spec *parent_spec; u64 parent_overlap; @@ -1728,11 +1728,11 @@ static int rbd_dev_header_watch_sync(struct rbd_device *rbd_dev, int start) goto out_cancel; if (start) { - rbd_dev->watch_request = obj_request->osd_req; - ceph_osdc_set_request_linger(osdc, rbd_dev->watch_request); + ceph_osdc_set_request_linger(osdc, obj_request->osd_req); + rbd_dev->watch_request = obj_request; } else { ceph_osdc_unregister_linger_request(osdc, - rbd_dev->watch_request); + rbd_dev->watch_request->osd_req); rbd_dev->watch_request = NULL; }