From patchwork Fri Sep 7 18:19:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1424801 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9B259DF283 for ; Fri, 7 Sep 2012 18:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754352Ab2IGSTb (ORCPT ); Fri, 7 Sep 2012 14:19:31 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:35579 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753283Ab2IGSTa (ORCPT ); Fri, 7 Sep 2012 14:19:30 -0400 Received: by mail-ie0-f174.google.com with SMTP id e11so5532930iej.19 for ; Fri, 07 Sep 2012 11:19:30 -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=JnmwtF/Y4eJj4RnA+TNQOYVOfQQ8naIDfzFYF2AKaWI=; b=LjqoDgqMEcnYORG5jod8WFOgCg+2MT6+AC/0MGfTUAqThAQxqFjpBA6Aneqr0EyXFJ RZp5zzpB0AqlhbRb7x3B1WFQ83RDX4Aemnkib2dxamkV2BsgdtuDg4kZ1XL862Tf8hB6 MTq1C9CPGqEqKtwKzkS3oJ1LQyVuNDsbqkppG3mq22t5vWjAVyaJDw3aDNKKxlqaak0u Fxa2joqHThyiga8x6CRnhGjCOER3vvfrWkG+UV9nTY6Wwcx7NF1B8VqEWC0/Zc8rDu0s VvM6TdGS5Ftvu7n6Wtkx0m4hmLwBO5hkPBmZvj5FpupFZcCDMlNkytcSTMwOc27j3IVZ CUCw== Received: by 10.50.188.130 with SMTP id ga2mr30000190igc.32.1347041970236; Fri, 07 Sep 2012 11:19:30 -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 ho1sm16314igc.3.2012.09.07.11.19.28 (version=SSLv3 cipher=OTHER); Fri, 07 Sep 2012 11:19:29 -0700 (PDT) Message-ID: <504A3AAF.1000403@inktank.com> Date: Fri, 07 Sep 2012 13:19:27 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 3/5] rbd: define some new format constants References: <504A39E0.1040107@inktank.com> In-Reply-To: <504A39E0.1040107@inktank.com> X-Gm-Message-State: ALoCoQmJBUpLMswdTUPtbBOfIJwrL/SRlDyY+jFN49l0ox484hOS36GXfK1n7+oxqOInhF1fXmiI Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Define constant symbols related to the rbd format 2 object names. This begins to bring this version of the "rbd_types.h" header more in line with the current user-space version of that file. Complete reconciliation of differences will be done at some point later, as a separate task. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd_types.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h index d9d8a77..cbe77fa 100644 --- a/drivers/block/rbd_types.h +++ b/drivers/block/rbd_types.h @@ -15,15 +15,30 @@ #include +/* For format version 2, rbd image 'foo' consists of objects + * rbd_id.foo - id of image + * rbd_header. - image metadata + * rbd_data..0000000000000000 + * rbd_data..0000000000000001 + * ... - data + * Clients do not access header data directly in rbd format 2. + */ + +#define RBD_HEADER_PREFIX "rbd_header." +#define RBD_DATA_PREFIX "rbd_data." +#define RBD_ID_PREFIX "rbd_id." + /* - * rbd image 'foo' consists of objects - * foo.rbd - image metadata - * foo.00000000 - * foo.00000001 - * ... - data + * For format version 1, rbd image 'foo' consists of objects + * foo.rbd - image metadata + * rb...00000000 + * rb...00000001 + * ... - data + * There is no notion of a persistent image id in rbd format 1. */ #define RBD_SUFFIX ".rbd" + #define RBD_DIRECTORY "rbd_directory" #define RBD_INFO "rbd_info"