From patchwork Fri Apr 5 14:01:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2398641 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 562753FD8C for ; Fri, 5 Apr 2013 14:01:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161650Ab3DEOBQ (ORCPT ); Fri, 5 Apr 2013 10:01:16 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:42961 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161475Ab3DEOBQ (ORCPT ); Fri, 5 Apr 2013 10:01:16 -0400 Received: by mail-ie0-f175.google.com with SMTP id c12so4251291ieb.6 for ; Fri, 05 Apr 2013 07:01:16 -0700 (PDT) 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=HQg5HEMboiZEeLbe66NmK0AYVqZ2W1QJIUU3hWQ+0KU=; b=EUHXxoXqq/BDbc7q3Gq4d6lIvxByZATkvSjDPxf7at0oQse5pnVaq40YIHhzTyw7eQ IXKSMlkaKxzPebRA6aOhHXtaMIOMT3n35xJjoFBMtEfrpXHwPiL7KezHvwM8gpS2oVuQ 6k2DJn1v2649bnJFUAA0+1IAZRVF1pGa+mVlaJN30xMT9711W4gWDB61NKw47Q3SjfFi Y7aRmMca4Aag4xKmBM41IO8w+8q/bm8/bu08SbMtjpj7yQI0euqiAsjRqfyUH/hbFcXK 0Db8S6+p6Gs1X2NiwfvCsYD84qyrVlZOX1IYWmaLMl59dQHtWUG+nia0u0XDdIom73HZ 25Rg== X-Received: by 10.43.59.136 with SMTP id wo8mr3338203icb.56.1365170476035; Fri, 05 Apr 2013 07:01:16 -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 wn10sm2403072igb.2.2013.04.05.07.01.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Apr 2013 07:01:15 -0700 (PDT) Message-ID: <515ED92A.2010301@inktank.com> Date: Fri, 05 Apr 2013 09:01:14 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org" Subject: [PATCH 01/20] rbd: define inbound data size for method ops References: <515ED849.9060901@inktank.com> In-Reply-To: <515ED849.9060901@inktank.com> X-Gm-Message-State: ALoCoQmQJw3rVA5668QVnF+jXmpQt2c4RzV9TMM1KmUomL0h/UnhQ3YqifTd+miV5JITKAvq+qaA Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org When rbd creates an object request containing an object method call operation it is passing 0 for the size. I originally thought this was because the length was not needed for method calls, but I think it really should be supplied, to describe how much space is available to receive response data. So provide the supplied length. This resolves: http://tracker.ceph.com/issues/4659 Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); @@ -1852,7 +1851,7 @@ static int rbd_obj_method_sync(struct rbd_device *rbd_dev, return PTR_ERR(pages); ret = -ENOMEM; - obj_request = rbd_obj_request_create(object_name, 0, 0, + obj_request = rbd_obj_request_create(object_name, 0, inbound_size, OBJ_REQUEST_PAGES); if (!obj_request) goto out; diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 9fb51b5..5e579fa 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1839,12 +1839,11 @@ static int rbd_obj_method_sync(struct rbd_device *rbd_dev, int ret; /* - * Method calls are ultimately read operations but they - * don't involve object data (so no offset or length). - * The result should placed into the inbound buffer - * provided. They also supply outbound data--parameters for - * the object method. Currently if this is present it will - * be a snapshot id. + * Method calls are ultimately read operations. The result + * should placed into the inbound buffer provided. They + * also supply outbound data--parameters for the object + * method. Currently if this is present it will be a + * snapshot id. */ page_count = (u32) calc_pages_for(0, inbound_size);