From patchwork Thu May 4 13:26:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9711953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9882460387 for ; Thu, 4 May 2017 13:26:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E6EE28665 for ; Thu, 4 May 2017 13:26:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 832382868D; Thu, 4 May 2017 13:26:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3869F28667 for ; Thu, 4 May 2017 13:26:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752691AbdEDN0Y (ORCPT ); Thu, 4 May 2017 09:26:24 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36836 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbdEDN0U (ORCPT ); Thu, 4 May 2017 09:26:20 -0400 Received: by mail-wm0-f66.google.com with SMTP id u65so3314157wmu.3; Thu, 04 May 2017 06:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tMRjuibwW99Lv3YRuGPK88LdB169obWxJAMjPS/AGmc=; b=f8tTgc/Y9I/UnWn4SeLi2nLggFxQ+hMkZLpk3kMilMAU/n4gseWuwfNy2q3hxKLjDl 5HQkCQrIdgyFjyMp4Eb3GgS5HeeZtm/5F5mlB6+apbXcz3gkhfRmMkd3bEPVi6a7XBgS Z/58nk15ulhKzdolEaG81Z7yVpnlQVLmY5v97YIwtqWoRTuwaj0TkFi7+p82ENbCw8jP vSxpbUki5MO3/6o0EZOFhvp86MuWeOHAqs7w8QTUnP/XNp8ouQ/lhMLXBsvRHT7Paz4s U4yxF4LnVi1tImhSz3gQRjAGqgmQNs/YCWU/u5gJmOhuuIpM3IrrlL53OJEMJopUlqUe yHKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tMRjuibwW99Lv3YRuGPK88LdB169obWxJAMjPS/AGmc=; b=iMoXl2BttDcWxAnYM+JISr6Zmq/VFspMLHw8y1ku2LVa36Ou3pVMAJM+Rokfy5NqB/ XpQplxXbM8dNPT/y4p+dhaKHzbdTUUInBTyaS32mFl7WG6GWKu/dUHOiuyjHNu9JpYTC JBImFF7AnDYBgmnqdo3vj7YRXWgkH4lIK6n2BFAAeoiTVGb0YLsmxrwdiNI+1IKgcYZZ kOJlGXGf5jF8MBjqpTKDuB43jg/6ASylM55QFG9SOm4baUvex3Ce4t2OYc7yGKKeS10h 4H8r88Y5u/uCC9IB52UdF7C94p3K3xZkkJhm0qD+vtB0ZYJKBy80PYLGn5f923Bb+EXW x6IQ== X-Gm-Message-State: AN3rC/6x18tL24xgTa+wEGJEQU2Ihk09WdsrKyAykKG0wBWBwc6D0trg A2Mk1Ckl6BdrWw== X-Received: by 10.28.151.138 with SMTP id z132mr1905169wmd.97.1493904378992; Thu, 04 May 2017 06:26:18 -0700 (PDT) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id m201sm1831681wmd.15.2017.05.04.06.26.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 May 2017 06:26:18 -0700 (PDT) From: Amir Goldstein To: "Darrick J . Wong" Cc: Christoph Hellwig , Miklos Szeredi , Theodore Tso , Richard Weinberger , Mark Fasheh , Dan Williams , Andy Shevchenko , David Howells , Shaohua Li , Al Viro , linux-xfs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 2/8] xfs: re-define uuid_t as common struct uuid_v1 Date: Thu, 4 May 2017 16:26:17 +0300 Message-Id: <1493904383-2187-3-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493904383-2187-1-git-send-email-amir73il@gmail.com> References: <1493904383-2187-1-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xfs was defining a non namespaced type named uuid_t and for no good reason. xfs code doesn't care about the internals of uuid_t struct - it only cares about its size. Re-define uuid_t as the common struct uuid_v1 in include/linux/uuid.h and get rid of the xfs private definition. Signed-off-by: Amir Goldstein --- fs/xfs/uuid.h | 4 +--- include/linux/uuid.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/xfs/uuid.h b/fs/xfs/uuid.h index 104db0f..0e3ecd0 100644 --- a/fs/xfs/uuid.h +++ b/fs/xfs/uuid.h @@ -18,9 +18,7 @@ #ifndef __XFS_SUPPORT_UUID_H__ #define __XFS_SUPPORT_UUID_H__ -typedef struct { - unsigned char __u_bits[16]; -} uuid_t; +#include extern int uuid_is_nil(uuid_t *uuid); extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2); diff --git a/include/linux/uuid.h b/include/linux/uuid.h index 4dff73a..02253f0 100644 --- a/include/linux/uuid.h +++ b/include/linux/uuid.h @@ -26,7 +26,7 @@ * time * - the clock sequence is a 14-bit counter to avoid duplicate times */ -struct uuid_v1 { +typedef struct uuid_v1 { __be32 time_low; /* low part of timestamp */ __be16 time_mid; /* mid part of timestamp */ __be16 time_hi_and_version; /* high part of timestamp and version */ @@ -40,7 +40,7 @@ struct uuid_v1 { #define UUID_VARIANT_STD 0x80 u8 clock_seq_low; /* clock seq low */ u8 node[6]; /* spatially unique node ID (MAC addr) */ -}; +} uuid_t; /* * The length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")