From patchwork Fri Apr 26 18:00:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2494591 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 198503FD40 for ; Fri, 26 Apr 2013 18:00:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492Ab3DZSAO (ORCPT ); Fri, 26 Apr 2013 14:00:14 -0400 Received: from mail-ia0-f170.google.com ([209.85.210.170]:62496 "EHLO mail-ia0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995Ab3DZSAO (ORCPT ); Fri, 26 Apr 2013 14:00:14 -0400 Received: by mail-ia0-f170.google.com with SMTP id k20so863557iak.15 for ; Fri, 26 Apr 2013 11:00:13 -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=Kok1a/ENLaHB4FGumxA7EHYMKlQF/mMQIopdBQDwwGc=; b=Kh1WqbvJMrgOOH87hp9PKcNf17dkjhQ06CyCSaguvbTVPNVsChBU2+tGDpRZXO6AXt m+D5ccWuVuVtoYgt48RHAErBUuFpxYj09C3hQ5JX8/yNobnbXtwqqMi4HPjaW72JENk0 LwFK4MBrr0ZvJmVpVGX4vvWIIkiySaQkSFIjbYaJm0HzNtXVt5AIXcLjQDux52abmDtA /XC+wXX11o7UxibLIY0M9We6rN6R/gimh7mcpfVAC3Y05FG7PTuZlvV6Ei9WD5SOi/8c xHPZYV4zLe6xFzqquN8xfOqM/asfMad8R6SD6X36LTPlxauA8O4u8UgBBNbukrAcpBeR hhoA== X-Received: by 10.50.62.66 with SMTP id w2mr2460222igr.81.1366999213419; Fri, 26 Apr 2013 11:00:13 -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 ESMTPSA id ve9sm4395975igb.3.2013.04.26.11.00.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 11:00:12 -0700 (PDT) Message-ID: <517AC0AB.9070308@inktank.com> Date: Fri, 26 Apr 2013 13:00:11 -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@vger.kernel.org Subject: [PATCH 2/7] rbd: move stripe_unit and stripe_count into header References: <517AC047.6060000@inktank.com> In-Reply-To: <517AC047.6060000@inktank.com> X-Gm-Message-State: ALoCoQmzJ3HZg2NWsuv5aYI8Y8CwOEzcQ2MsnZhmpXcjb18FO7Mmoef4eyPHBgqW+o7291ujhusV Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org This commit added fetching if fancy striping parameters: 09186ddb rbd: get and check striping parameters They are almost unused, but the two fields storing the information really belonged in the rbd_image_header structure. This patch moves them there. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) } diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d989914..fd4f678 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -108,6 +108,9 @@ struct rbd_image_header { char *snap_names; u64 *snap_sizes; + u64 stripe_unit; + u64 stripe_count; + u64 obj_version; }; @@ -316,9 +319,6 @@ struct rbd_device { u64 parent_overlap; struct rbd_device *parent; - u64 stripe_unit; - u64 stripe_count; - /* protects updating the header */ struct rw_semaphore header_rwsem; @@ -3695,8 +3695,8 @@ static int rbd_dev_v2_striping_info(struct rbd_device *rbd_dev) "(got %llu want 1)", stripe_count); return -EINVAL; } - rbd_dev->stripe_unit = stripe_unit; - rbd_dev->stripe_count = stripe_count; + rbd_dev->header.stripe_unit = stripe_unit; + rbd_dev->header.stripe_count = stripe_count; return 0;