From patchwork Fri Apr 19 22:49:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2467411 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 346D13FD8C for ; Fri, 19 Apr 2013 22:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964894Ab3DSWtk (ORCPT ); Fri, 19 Apr 2013 18:49:40 -0400 Received: from mail-ia0-f169.google.com ([209.85.210.169]:63499 "EHLO mail-ia0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964846Ab3DSWtk (ORCPT ); Fri, 19 Apr 2013 18:49:40 -0400 Received: by mail-ia0-f169.google.com with SMTP id l29so2665419iag.28 for ; Fri, 19 Apr 2013 15:49:39 -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=esMQEPlvK98jWYYO/0XySrIMfeFG7DDNWqm8CzfLhGs=; b=WWFI1t1I4tJDC8eEi97khP5vFLzVUIngwLA+1eZ3284mG+jN8Q/mSBq22+VcriUa79 tUbmYdo0UP2ivemEXdqoss2YJsIT8fbPFLm7EJJOLc8xWualwWrGD3Rv97fFddP1bsJG ENvmhOVZ/tQ5IPzsgltksbQJfu8JgMQvIxSqSgg8DreL5wUWMvu2HGFksUVwREP661VU 5cpQcRkfmDQXmvufkIDYNON3uoTTDTrfByjJKo77xMsXTWeBQzic3XM2Mp6QWBy8hB1R wok3sKyYYhbcxpsY6pDHHVWKjfx8SsPOKWZfDArRt09XT6OFqzG8Crf2E4147/8UTYl9 moBA== X-Received: by 10.50.66.237 with SMTP id i13mr6747492igt.84.1366411779604; Fri, 19 Apr 2013 15:49:39 -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 xd4sm5403008igb.3.2013.04.19.15.49.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Apr 2013 15:49:38 -0700 (PDT) Message-ID: <5171CA01.7000805@inktank.com> Date: Fri, 19 Apr 2013 17:49:37 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: ceph-devel Subject: [PATCH] libceph: support pages for class request data References: <5171C963.2050402@inktank.com> In-Reply-To: <5171C963.2050402@inktank.com> X-Gm-Message-State: ALoCoQmAm114RZFmfEoGdJQJPfmFZfYNhkRrhnsxt9+TNlR/7cS+Yb0XPv/mUBo6E/Yde760f2jk Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Add the ability to provide an array of pages as outbound request data for object class method calls. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- include/linux/ceph/osd_client.h | 5 +++++ net/ceph/osd_client.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 4d84a2b..4191cd2 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -273,6 +273,11 @@ extern void osd_req_op_extent_osd_data_bio(struct ceph_osd_request *, extern void osd_req_op_cls_request_data_pagelist(struct ceph_osd_request *, unsigned int which, struct ceph_pagelist *pagelist); +extern void osd_req_op_cls_request_data_pages(struct ceph_osd_request *, + unsigned int which, + struct page **pages, u64 length, + u32 alignment, bool pages_from_pool, + bool own_pages); extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *, unsigned int which, struct page **pages, u64 length, diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index c842e87..467020c 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -214,6 +214,18 @@ void osd_req_op_cls_request_data_pagelist( } EXPORT_SYMBOL(osd_req_op_cls_request_data_pagelist); +void osd_req_op_cls_request_data_pages(struct ceph_osd_request *osd_req, + unsigned int which, struct page **pages, u64 length, + u32 alignment, bool pages_from_pool, bool own_pages) +{ + struct ceph_osd_data *osd_data; + + osd_data = osd_req_op_data(osd_req, which, cls, request_data); + ceph_osd_data_pages_init(osd_data, pages, length, alignment, + pages_from_pool, own_pages); +} +EXPORT_SYMBOL(osd_req_op_cls_request_data_pages); + void osd_req_op_cls_response_data_pages(struct ceph_osd_request *osd_req, unsigned int which, struct page **pages, u64 length, u32 alignment, bool pages_from_pool, bool own_pages)