From patchwork Tue Nov 26 05:52:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Harper X-Patchwork-Id: 3236561 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A9EF49F3B8 for ; Tue, 26 Nov 2013 05:53:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5BEF20357 for ; Tue, 26 Nov 2013 05:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCC502034F for ; Tue, 26 Nov 2013 05:53:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753085Ab3KZFxE (ORCPT ); Tue, 26 Nov 2013 00:53:04 -0500 Received: from smtp2.bendigoit.com.au ([203.16.207.99]:38513 "EHLO smtp2.bendigoit.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104Ab3KZFxB convert rfc822-to-8bit (ORCPT ); Tue, 26 Nov 2013 00:53:01 -0500 Received: from bitcom1.int.sbss.com.au ([2002:cb10:e0fe:201:a5ca:4fd3:14f:ad5d]) by smtp2.bendigoit.com.au with esmtp (Exim 4.80) (envelope-from ) id 1VlBZy-0002jn-Bi; Tue, 26 Nov 2013 16:52:58 +1100 Received: from BITCOM1.int.sbss.com.au ([fe80::a5ca:4fd3:14f:ad5d]) by BITCOM1.int.sbss.com.au ([fe80::a5ca:4fd3:14f:ad5d%12]) with mapi id 14.01.0438.000; Tue, 26 Nov 2013 16:52:57 +1100 From: James Harper To: Noah Watkins CC: Sage Weil , "ceph-devel@vger.kernel.org" Subject: RE: libuuid vs boost uuid Thread-Topic: libuuid vs boost uuid Thread-Index: Ac7dDndGMWCVRI2JS9GPS/QNk6ripf//WLsA//4LABCAA3B/AIAFWoQA//7Zb/CAAZraAP//RJqQAn7kM4D//yVBIA== Date: Tue, 26 Nov 2013 05:52:56 +0000 Message-ID: <6035A0D088A63A46850C3988ED045A4B66608B32@BITCOM1.int.sbss.com.au> References: <6035A0D088A63A46850C3988ED045A4B665E1FB8@BITCOM1.int.sbss.com.au> <6035A0D088A63A46850C3988ED045A4B665E29B6@BITCOM1.int.sbss.com.au> <6035A0D088A63A46850C3988ED045A4B665EA2F6@BITCOM1.int.sbss.com.au> <3C1A0909-F08C-44EE-AF1A-61E91460C764@inktank.com> <6035A0D088A63A46850C3988ED045A4B665EA52D@BITCOM1.int.sbss.com.au> <8A6E449F-E249-4655-B198-53ABA06BF1E4@inktank.com> In-Reply-To: <8A6E449F-E249-4655-B198-53ABA06BF1E4@inktank.com> Accept-Language: en-AU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2002:cb10:e0fe:201:1114:32ee:f981:5d49] x-tm-as-product-ver: SMEX-10.2.0.3176-7.000.1014-20320.004 x-tm-as-result: No--31.834200-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No MIME-Version: 1.0 X-Really-From-Bendigo-IT: magichashvalue Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > > James, > > I'm using uuid.begin()/end() to grab the 16-byte representation of the UUID. > Did you figure out how to populate a boost::uuid_t from the bytes? In > particular, I'm referring to FileJournal::decode. > > Actually, I suppose that any Ceph usage of the 16-byte representation should > be replaced using the Boost serialization of uuid_t? > As I said I haven't actually tested it, apart from that I have librbd working under Windows now ("rbd ls" and "rbd export" both work but I don't know if they actually do anything with uuid's...) My patch to MStatfsReply.h to make it compile is: So assuming this actually works, the uuid bytes are accessible as per the above. James --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/messages/MStatfsReply.h b/src/messages/MStatfsReply.h index 8ceec9c..40a5bdd 100644 --- a/src/messages/MStatfsReply.h +++ b/src/messages/MStatfsReply.h @@ -22,7 +22,7 @@ public: MStatfsReply() : Message(CEPH_MSG_STATFS_REPLY) {} MStatfsReply(uuid_d &f, tid_t t, epoch_t epoch) : Message(CEPH_MSG_STATFS_REPLY) { - memcpy(&h.fsid, f.uuid, sizeof(h.fsid)); + memcpy(&h.fsid, &f.uuid, sizeof(h.fsid)); header.tid = t; h.version = epoch; }