Whamcloud - gitweb
LU-6245 libcfs: remove last of types abstractions 32/22732/3
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 29 Sep 2016 21:17:48 +0000 (17:17 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 8 Oct 2016 16:38:58 +0000 (16:38 +0000)
With the complete removal of the types abstraction
in the lustre kernel code we can now remove the
types.h header in libcfs.

Change-Id: I59a4dfbf546db72154d2cb461ee25517c6bd6015
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/22732
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/Makefile.am
libcfs/include/libcfs/libcfs.h
libcfs/include/libcfs/types.h [deleted file]
lustre.spec.in
lustre/include/lustre_lib.h
lustre/mdt/mdt_handler.c

index b9972ad..a9f6866 100644 (file)
@@ -3,10 +3,6 @@ DIST_SUBDIRS = linux util
 
 libcfsdir = $(includedir)/libcfs
 
-if UTILS
-libcfs_HEADERS = types.h
-endif
-
 EXTRA_DIST = \
        bitmap.h \
        curproc.h \
@@ -22,5 +18,4 @@ EXTRA_DIST = \
        libcfs_private.h \
        libcfs_string.h \
        libcfs_time.h \
-       libcfs_workitem.h \
-       types.h
+       libcfs_workitem.h
index b09d8f1..75a6bf1 100644 (file)
@@ -39,7 +39,6 @@
 
 #ifdef __KERNEL__
 # include <libcfs/linux/libcfs.h>
-# include <libcfs/types.h>
 # include "curproc.h"
 
 #define LIBCFS_VERSION "0.5.0"
diff --git a/libcfs/include/libcfs/types.h b/libcfs/include/libcfs/types.h
deleted file mode 100644 (file)
index 5a80d09..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, 2014, Intel Corporation.
- */
-#ifndef _LIBCFS_TYPES_H
-#define _LIBCFS_TYPES_H
-
-#include <linux/types.h>
-
-#ifndef __KERNEL__
-# error This include is only for kernel use.
-#endif
-
-#if defined(_ASM_GENERIC_INT_L64_H)
-# define LPF64 "l"
-#elif defined(_ASM_GENERIC_INT_LL64_H)
-# define LPF64 "ll"
-#elif !defined(LPF64)
-# error "cannot define LPF64"
-#endif /* !LPF64 */
-
-#define LPU64 "%"LPF64"u"
-#define LPD64 "%"LPF64"d"
-#define LPX64 "%#"LPF64"x"
-#define LPX64i "%"LPF64"x"
-#define LPO64 "%#"LPF64"o"
-
-#define LPLU "%lu"
-#define LPLD "%ld"
-#define LPLX "%#lx"
-#define LPPID "%d"
-
-#if BITS_PER_LONG == 64
-# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
-#elif BITS_PER_LONG == 32
-# define LI_POISON ((int)0x5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a)
-#else /* BITS_PER_LONG == 32 */
-# error "cannot define L{I,L,P}_POISON"
-#endif /* BITS_PER_LONG != 32 */
-
-#endif /* _LIBCFS_TYPES_H */
index e078822..b8d05bc 100644 (file)
@@ -389,7 +389,6 @@ echo '%{_sbindir}/wiretest' >>lustre-tests.files
 %{_mandir}/man?/*
 %endif
 %{_includedir}/lustre
-%{_includedir}/libcfs
 %endif
 %{_datadir}/lustre
 %{_sysconfdir}/udev/rules.d/99-lustre.rules
index d765fa2..d2d5f31 100644 (file)
@@ -60,6 +60,14 @@ struct l_wait_info;
 #include <lustre_ha.h>
 #include <lustre_net.h>
 
+#define LI_POISON 0x5a5a5a5a
+#if BITS_PER_LONG > 32
+# define LL_POISON 0x5a5a5a5a5a5a5a5aL
+#else
+# define LL_POISON 0x5a5a5a5aL
+#endif
+#define LP_POISON ((void *)LL_POISON)
+
 #ifdef HAVE_SERVER_SUPPORT
 void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data,
                          int error);
index 25a42a7..4f3dacf 100644 (file)
@@ -5726,7 +5726,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
                RETURN(-EINVAL);
 
        if (!fid_is_namespace_visible(&fp->gf_fid)) {
-               CDEBUG(D_INFO, "%s: "DFID" is invalid, f_seq should be >= "LPX64
+               CDEBUG(D_INFO, "%s: "DFID" is invalid, f_seq should be >= %#llx"
                       ", or f_oid != 0, or f_ver == 0\n", mdt_obd_name(mdt),
                       PFID(&fp->gf_fid), (__u64)FID_SEQ_NORMAL);
                RETURN(-EINVAL);