[PATCH 64/64 v2] staging: lustre: lnet: cleanup paths for all LNet headers

2017-08-19 Thread James Simmons
Rationalize include paths in all the lnet header files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/api.h   |  2 +-
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h  | 14 +++---
 drivers/staging/lustre/include/linux/lnet/lib-types.h |  4 ++--
 drivers/staging/lustre/include/linux/lnet/socklnd.h   |  4 ++--
 drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h |  4 ++--
 drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h  |  2 +-
 drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h   |  2 +-
 7 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/api.h 
b/drivers/staging/lustre/include/linux/lnet/api.h
index 01ae62e..9c37f3e 100644
--- a/drivers/staging/lustre/include/linux/lnet/api.h
+++ b/drivers/staging/lustre/include/linux/lnet/api.h
@@ -44,7 +44,7 @@
  * @{
  */
 
-#include "../../uapi/linux/lnet/lnet-types.h"
+#include 
 
 /** \defgroup lnet_init_fini Initialization and cleanup
  * The LNet must be properly initialized before any LNet calls can be made.
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index bc55d57..e0968ab 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -35,13 +35,13 @@
 #ifndef __LNET_LIB_LNET_H__
 #define __LNET_LIB_LNET_H__
 
-#include "../libcfs/libcfs.h"
-#include "api.h"
-#include "lib-types.h"
-#include "../../uapi/linux/lnet/lnet-dlc.h"
-#include "../../uapi/linux/lnet/lnet-types.h"
-#include "../../uapi/linux/lnet/lnetctl.h"
-#include "../../uapi/linux/lnet/nidstr.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 extern struct lnet the_lnet;   /* THE network */
 
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h 
b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 94d3a53..eea3b8e 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -40,8 +40,8 @@
 #include 
 #include 
 
-#include "../../uapi/linux/lnet/lnet-types.h"
-#include "../../uapi/linux/lnet/lnetctl.h"
+#include 
+#include 
 
 /* Max payload size */
 #define LNET_MAX_PAYLOAD  CONFIG_LNET_MAX_PAYLOAD
diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h 
b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index c24fe45..553fb64 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -34,8 +34,8 @@
 #ifndef __LNET_LNET_SOCKLND_H__
 #define __LNET_LNET_SOCKLND_H__
 
-#include "../../uapi/linux/lnet/lnet-types.h"
-#include "../../uapi/linux/lnet/socklnd.h"
+#include 
+#include 
 
 struct ksock_hello_msg {
__u32   kshm_magic; /* magic number of socklnd message */
diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h
index a3821d9..e45d828 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h
@@ -29,8 +29,8 @@
 #ifndef LNET_DLC_H
 #define LNET_DLC_H
 
-#include "libcfs_ioctl.h"
-#include "lnet-types.h"
+#include 
+#include 
 
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN   128
diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
index f7ffc53..d9da625 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
@@ -15,7 +15,7 @@
 #ifndef _LNETCTL_H_
 #define _LNETCTL_H_
 
-#include "lnet-types.h"
+#include 
 
 /** \addtogroup lnet_fault_simulation
  * @{
diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h
index d153c97..882074e 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h
@@ -28,7 +28,7 @@
 #ifndef _LNET_NIDSTRINGS_H
 #define _LNET_NIDSTRINGS_H
 
-#include "lnet-types.h"
+#include 
 
 /**
  *  Lustre Network Driver types.
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 63/64 v2] staging: lustre: libcfs: cleanup paths for libcfs headers

2017-08-19 Thread James Simmons
Rationalize include paths in all the libcfs header files.

Signed-off-by: James Simmons 
---
 .../staging/lustre/include/linux/libcfs/libcfs.h   | 24 +++---
 .../lustre/include/linux/libcfs/libcfs_debug.h |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 3a5ebc2..b48e2f0 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -36,18 +36,18 @@
 #include 
 #include 
 
-#include "../../uapi/linux/lnet/libcfs_ioctl.h"
-#include "linux/libcfs.h"
-#include "libcfs_debug.h"
-#include "libcfs_private.h"
-#include "libcfs_cpu.h"
-#include "libcfs_prim.h"
-#include "libcfs_time.h"
-#include "libcfs_string.h"
-#include "libcfs_workitem.h"
-#include "libcfs_hash.h"
-#include "libcfs_fail.h"
-#include "curproc.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #define LIBCFS_VERSION "0.7.0"
 
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index 91d141d..e7c3741 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -38,7 +38,7 @@
 #ifndef __LIBCFS_DEBUG_H__
 #define __LIBCFS_DEBUG_H__
 
-#include "../../uapi/linux/lnet/libcfs_debug.h"
+#include 
 
 /*
  *  Debugging
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 59/64 v2] staging: lustre: lnet: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the lnet core source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lnet/lnet/Makefile  | 3 +++
 drivers/staging/lustre/lnet/lnet/acceptor.c| 2 +-
 drivers/staging/lustre/lnet/lnet/api-ni.c  | 4 ++--
 drivers/staging/lustre/lnet/lnet/config.c  | 2 +-
 drivers/staging/lustre/lnet/lnet/lib-eq.c  | 3 ++-
 drivers/staging/lustre/lnet/lnet/lib-md.c  | 2 +-
 drivers/staging/lustre/lnet/lnet/lib-me.c  | 2 +-
 drivers/staging/lustre/lnet/lnet/lib-move.c| 2 +-
 drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +-
 drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +-
 drivers/staging/lustre/lnet/lnet/lib-socket.c  | 4 ++--
 drivers/staging/lustre/lnet/lnet/lo.c  | 3 ++-
 drivers/staging/lustre/lnet/lnet/module.c  | 5 +++--
 drivers/staging/lustre/lnet/lnet/net_fault.c   | 4 ++--
 drivers/staging/lustre/lnet/lnet/nidstrings.c  | 4 ++--
 drivers/staging/lustre/lnet/lnet/peer.c| 4 ++--
 drivers/staging/lustre/lnet/lnet/router.c  | 3 ++-
 drivers/staging/lustre/lnet/lnet/router_proc.c | 5 +++--
 18 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/Makefile 
b/drivers/staging/lustre/lnet/lnet/Makefile
index 4c81fa1..fd8585c 100644
--- a/drivers/staging/lustre/lnet/lnet/Makefile
+++ b/drivers/staging/lustre/lnet/lnet/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LNET) += lnet.o
 
 lnet-y := api-ni.o config.o nidstrings.o net_fault.o   \
diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c 
b/drivers/staging/lustre/lnet/lnet/acceptor.c
index a6f60c3..be2823f 100644
--- a/drivers/staging/lustre/lnet/lnet/acceptor.c
+++ b/drivers/staging/lustre/lnet/lnet/acceptor.c
@@ -33,7 +33,7 @@
 #define DEBUG_SUBSYSTEM S_LNET
 #include 
 #include 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 
 static int   accept_port= 988;
 static int   accept_backlog = 127;
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c 
b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 30c7ff6..ad83503 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -34,8 +34,8 @@
 #include 
 #include 
 
-#include "../../include/linux/lnet/lib-lnet.h"
-#include "../../include/uapi/linux/lnet/lnet-dlc.h"
+#include 
+#include 
 
 #define D_LNI D_CONSOLE
 
diff --git a/drivers/staging/lustre/lnet/lnet/config.c 
b/drivers/staging/lustre/lnet/lnet/config.c
index 933988d..26841a7 100644
--- a/drivers/staging/lustre/lnet/lnet/config.c
+++ b/drivers/staging/lustre/lnet/lnet/config.c
@@ -33,7 +33,7 @@
 #define DEBUG_SUBSYSTEM S_LNET
 #include 
 #include 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 
 struct lnet_text_buf { /* tmp struct for parsing routes */
struct list_head ltb_list;  /* stash on lists */
diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c 
b/drivers/staging/lustre/lnet/lnet/lib-eq.c
index 9ebba4e..6b446a5 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
@@ -35,7 +35,8 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
-#include "../../include/linux/lnet/lib-lnet.h"
+
+#include 
 
 /**
  * Create an event queue that has room for \a count number of events.
diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index f08e944..a0aef4b 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -36,7 +36,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 
 /* must be called with lnet_res_lock held */
 void
diff --git a/drivers/staging/lustre/lnet/lnet/lib-me.c 
b/drivers/staging/lustre/lnet/lnet/lib-me.c
index e9b3eed..f52a5e8 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-me.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-me.c
@@ -36,7 +36,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 
 /**
  * Create and attach a match entry to the match list of \a portal. The new
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 20ebe24..d886504 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -36,7 +36,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 #include 
 #include 
 
diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c 
b/drivers/staging/lustre/lnet/lnet/lib-msg.c
index 008ac50..d04875e 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-msg.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c
@@ -36,7 +36,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
 
 void
 lnet_build_unlink_event(struct 

[PATCH 57/64 v2] staging: lustre: lustre: cleanup paths for lustre UAPI headers

2017-08-19 Thread James Simmons
Rationalize include paths for the lustre uapi headers

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h   | 2 +-
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h   | 2 +-
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h   | 6 +++---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 2 +-
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h | 2 +-
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index 2b7deaa..11b51d9 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -35,7 +35,7 @@
 
 #include 
 #include 
-#include "../../../uapi/linux/lustre/lustre_user.h"
+#include 
 
 /** \defgroup cfg cfg
  *
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
index dd3785a..2e7a8d1 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
@@ -37,7 +37,7 @@
 #ifndef _UAPI_LUSTRE_FID_H_
 #define _UAPI_LUSTRE_FID_H_
 
-#include "../../../uapi/linux/lustre/lustre_idl.h"
+#include 
 
 /** returns fid object sequence */
 static inline __u64 fid_seq(const struct lu_fid *fid)
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
index cc59c1a..aac98db 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
@@ -70,10 +70,10 @@
 #include 
 #include 
 
-#include "../lnet/lnet-types.h"
+#include 
 /* Defn's shared with user-space. */
-#include "lustre_user.h"
-#include "lustre_ver.h"
+#include 
+#include 
 
 /*
  *  GENERAL STUFF
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index 1f52477..9590864 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-#include "../../../uapi/linux/lustre/lustre_idl.h"
+#include 
 
 #if !defined(__KERNEL__) && !defined(LUSTRE_UTILS)
 # error This file is for Lustre internal use only.
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h
index 9110229..3343b60 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h
@@ -35,7 +35,7 @@
 #define _UAPI_LUSTRE_OSTID_H_
 
 #include 
-#include "lustre_fid.h"
+#include 
 
 static inline __u64 lmm_oi_id(const struct ost_id *oi)
 {
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
index 2fcfe2b..5e332e3 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
@@ -55,7 +55,7 @@
 # include 
 # include 
 #endif /* __KERNEL__ */
-#include "lustre_fiemap.h"
+#include 
 
 /*
  * We need to always use 64bit version because the structure
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 60/64 v2] staging: lustre: ko2iblnd: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the ko2iblnd source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile  | 3 +++
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile
index e0a7aa7..4affe1d 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LNET_XPRT_IB) += ko2iblnd.o
 ko2iblnd-y := o2iblnd.o o2iblnd_cb.o o2iblnd_modparams.o
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index 8e59506..a1e994a 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -63,8 +63,8 @@
 
 #define DEBUG_SUBSYSTEM S_LND
 
-#include "../../../include/linux/libcfs/libcfs.h"
-#include "../../../include/linux/lnet/lib-lnet.h"
+#include 
+#include 
 
 #define IBLND_PEER_HASH_SIZE   101 /* # peer lists */
 /* # scheduler loops before reschedule */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 58/64 v2] staging: lustre: lnet: selftest: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the lnet selftest source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lnet/selftest/Makefile   | 3 +++
 drivers/staging/lustre/lnet/selftest/conctl.c   | 6 +++---
 drivers/staging/lustre/lnet/selftest/conrpc.c   | 4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.h   | 6 +++---
 drivers/staging/lustre/lnet/selftest/console.c  | 4 ++--
 drivers/staging/lustre/lnet/selftest/console.h  | 6 +++---
 drivers/staging/lustre/lnet/selftest/rpc.h  | 2 +-
 drivers/staging/lustre/lnet/selftest/selftest.h | 8 
 8 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/Makefile 
b/drivers/staging/lustre/lnet/selftest/Makefile
index c0de6e2..3ccc896 100644
--- a/drivers/staging/lustre/lnet/selftest/Makefile
+++ b/drivers/staging/lustre/lnet/selftest/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LNET_SELFTEST) := lnet_selftest.o
 
 lnet_selftest-y := console.o conrpc.o conctl.o framework.o timer.o rpc.o \
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 106304e..9619ecb 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -36,9 +36,9 @@
  * Author: Liang Zhen 
  */
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-lnet.h"
-#include "../../include/uapi/linux/lnet/lnetst.h"
+#include 
+#include 
+#include 
 #include "console.h"
 
 static int
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
b/drivers/staging/lustre/lnet/selftest/conrpc.c
index ae7c277..196d23c 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -36,8 +36,8 @@
  * Author: Liang Zhen 
  */
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
+#include 
 #include "timer.h"
 #include "conrpc.h"
 #include "console.h"
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.h 
b/drivers/staging/lustre/lnet/selftest/conrpc.h
index 501e1ec..2393236 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.h
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.h
@@ -39,9 +39,9 @@
 #ifndef __LST_CONRPC_H__
 #define __LST_CONRPC_H__
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-types.h"
-#include "../../include/uapi/linux/lnet/lnetst.h"
+#include 
+#include 
+#include 
 #include "rpc.h"
 #include "selftest.h"
 
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index d62c448..289b202 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -36,8 +36,8 @@
  * Author: Liang Zhen 
  */
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-lnet.h"
+#include 
+#include 
 #include "console.h"
 #include "conrpc.h"
 
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index d806214..143eae9 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -39,9 +39,9 @@
 #ifndef __LST_CONSOLE_H__
 #define __LST_CONSOLE_H__
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-types.h"
-#include "../../include/uapi/linux/lnet/lnetst.h"
+#include 
+#include 
+#include 
 #include "selftest.h"
 #include "conrpc.h"
 
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h 
b/drivers/staging/lustre/lnet/selftest/rpc.h
index 217ca21..7bb442a 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.h
+++ b/drivers/staging/lustre/lnet/selftest/rpc.h
@@ -33,7 +33,7 @@
 #ifndef __SELFTEST_RPC_H__
 #define __SELFTEST_RPC_H__
 
-#include "../../include/uapi/linux/lnet/lnetst.h"
+#include 
 
 /*
  * LST wired structures
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h 
b/drivers/staging/lustre/lnet/selftest/selftest.h
index 3777023..7adad43 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -38,10 +38,10 @@
 
 #define LNET_ONLY
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/lib-lnet.h"
-#include "../../include/linux/lnet/lib-types.h"
-#include "../../include/uapi/linux/lnet/lnetst.h"
+#include 
+#include 
+#include 
+#include 
 
 #include "rpc.h"
 #include "timer.h"
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 61/64 v2] staging: lustre: ksocklnd: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the ksocklnd source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lnet/klnds/socklnd/Makefile  | 3 +++
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/Makefile 
b/drivers/staging/lustre/lnet/klnds/socklnd/Makefile
index c011581..a7da1ab 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/Makefile
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LNET) += ksocklnd.o
 
 ksocklnd-y := socklnd.o socklnd_cb.o socklnd_proto.o socklnd_modparams.o 
socklnd_lib.o
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
index 88afe09..e6428c4 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
@@ -46,9 +46,9 @@
 #include 
 #include 
 
-#include "../../../include/linux/libcfs/libcfs.h"
-#include "../../../include/linux/lnet/lib-lnet.h"
-#include "../../../include/linux/lnet/socklnd.h"
+#include 
+#include 
+#include 
 
 /* assume one thread for each connection type */
 #define SOCKNAL_NSCHEDS3
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 56/64 v2] staging: lustre: lustre: cleanup paths for lustre internal headers

2017-08-19 Thread James Simmons
Rationalize include paths for the lustre internal headers

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/cl_object.h  |  4 +--
 drivers/staging/lustre/lustre/include/llog_swab.h  |  2 +-
 .../staging/lustre/lustre/include/lprocfs_status.h |  6 ++---
 drivers/staging/lustre/lustre/include/lu_object.h  |  6 ++---
 .../staging/lustre/lustre/include/lustre_compat.h  |  2 +-
 .../staging/lustre/lustre/include/lustre_debug.h   |  4 +--
 .../staging/lustre/lustre/include/lustre_disk.h|  4 ++-
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 12 -
 .../staging/lustre/lustre/include/lustre_export.h  |  6 ++---
 drivers/staging/lustre/lustre/include/lustre_fid.h |  8 +++---
 drivers/staging/lustre/lustre/include/lustre_fld.h |  6 ++---
 .../staging/lustre/lustre/include/lustre_handles.h |  2 +-
 .../staging/lustre/lustre/include/lustre_import.h  |  4 +--
 .../lustre/lustre/include/lustre_kernelcomm.h  |  2 +-
 drivers/staging/lustre/lustre/include/lustre_lib.h | 12 -
 drivers/staging/lustre/lustre/include/lustre_lmv.h |  2 +-
 drivers/staging/lustre/lustre/include/lustre_log.h |  4 +--
 drivers/staging/lustre/lustre/include/lustre_mdc.h | 14 +-
 drivers/staging/lustre/lustre/include/lustre_mds.h | 10 
 drivers/staging/lustre/lustre/include/lustre_net.h | 30 +++---
 drivers/staging/lustre/lustre/include/lustre_nrs.h |  2 +-
 .../staging/lustre/lustre/include/lustre_obdo.h|  2 +-
 .../staging/lustre/lustre/include/lustre_swab.h|  2 +-
 drivers/staging/lustre/lustre/include/obd.h| 18 ++---
 drivers/staging/lustre/lustre/include/obd_cksum.h  |  6 ++---
 drivers/staging/lustre/lustre/include/obd_class.h  | 12 -
 .../staging/lustre/lustre/include/obd_support.h|  6 ++---
 drivers/staging/lustre/lustre/include/seq_range.h  |  2 +-
 28 files changed, 96 insertions(+), 94 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/cl_object.h 
b/drivers/staging/lustre/lustre/include/cl_object.h
index 6887b81..9ba184b 100644
--- a/drivers/staging/lustre/lustre/include/cl_object.h
+++ b/drivers/staging/lustre/lustre/include/cl_object.h
@@ -88,8 +88,8 @@
 /*
  * super-class definitions.
  */
-#include "lu_object.h"
-#include "lustre_compat.h"
+#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/drivers/staging/lustre/lustre/include/llog_swab.h 
b/drivers/staging/lustre/lustre/include/llog_swab.h
index 25516d3..925271d 100644
--- a/drivers/staging/lustre/lustre/include/llog_swab.h
+++ b/drivers/staging/lustre/lustre/include/llog_swab.h
@@ -48,7 +48,7 @@
 #ifndef _LLOG_SWAB_H_
 #define _LLOG_SWAB_H_
 
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
 
 struct lustre_cfg;
 
diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h 
b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index f5abca8..98d6b13 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -43,9 +43,9 @@
 #include 
 #include 
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/uapi/linux/lustre/lustre_cfg.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
+#include 
+#include 
 
 struct lprocfs_vars {
const char  *name;
diff --git a/drivers/staging/lustre/lustre/include/lu_object.h 
b/drivers/staging/lustre/lustre/include/lu_object.h
index ea77d9c..4f213c4 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -35,9 +35,9 @@
 
 #include 
 #include 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "lu_ref.h"
+#include 
+#include 
+#include 
 
 struct seq_file;
 struct lustre_cfg;
diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h 
b/drivers/staging/lustre/lustre/include/lustre_compat.h
index da9ce19..69bfd6a 100644
--- a/drivers/staging/lustre/lustre/include/lustre_compat.h
+++ b/drivers/staging/lustre/lustre/include/lustre_compat.h
@@ -37,7 +37,7 @@
 #include 
 #include 
 
-#include "lustre_patchless_compat.h"
+#include 
 
 /*
  * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
diff --git a/drivers/staging/lustre/lustre/include/lustre_debug.h 
b/drivers/staging/lustre/lustre/include/lustre_debug.h
index 93c1bda..0be6a53 100644
--- a/drivers/staging/lustre/lustre/include/lustre_debug.h
+++ b/drivers/staging/lustre/lustre/include/lustre_debug.h
@@ -38,8 +38,8 @@
  * @{
  */
 
-#include "lustre_net.h"
-#include "obd.h"
+#include 
+#include 
 
 /* lib/debug.c */
 int dump_req(struct ptlrpc_request *req);
diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h 
b/drivers/staging/lustre/lustre/include/lustre_disk.h
index 05cdc66..2d862b3 100644
--- a/drivers/staging/lustre/lustre/include/lustre_disk.h
+++ 

[PATCH 62/64 v2] staging: lustre: libcfs: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the libcfs source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lnet/libcfs/Makefile| 3 +++
 drivers/staging/lustre/lnet/libcfs/debug.c | 2 +-
 drivers/staging/lustre/lnet/libcfs/fail.c  | 2 +-
 drivers/staging/lustre/lnet/libcfs/hash.c  | 2 +-
 drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c| 2 +-
 drivers/staging/lustre/lnet/libcfs/libcfs_lock.c   | 2 +-
 drivers/staging/lustre/lnet/libcfs/libcfs_mem.c| 2 +-
 drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c   | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c| 4 ++--
 drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c   | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c   | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c| 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c  | 2 +-
 drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 2 +-
 drivers/staging/lustre/lnet/libcfs/module.c| 8 
 drivers/staging/lustre/lnet/libcfs/prng.c  | 2 +-
 drivers/staging/lustre/lnet/libcfs/tracefile.c | 2 +-
 drivers/staging/lustre/lnet/libcfs/tracefile.h | 2 +-
 drivers/staging/lustre/lnet/libcfs/workitem.c  | 2 +-
 21 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/Makefile 
b/drivers/staging/lustre/lnet/libcfs/Makefile
index 8c89455..215fa23 100644
--- a/drivers/staging/lustre/lnet/libcfs/Makefile
+++ b/drivers/staging/lustre/lnet/libcfs/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LNET) += libcfs.o
 
 libcfs-linux-objs := linux-tracefile.o linux-debug.o
diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c 
b/drivers/staging/lustre/lnet/libcfs/debug.c
index 49deb44..1ab394c 100644
--- a/drivers/staging/lustre/lnet/libcfs/debug.c
+++ b/drivers/staging/lustre/lnet/libcfs/debug.c
@@ -37,7 +37,7 @@
 
 # define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include "tracefile.h"
 
 static char debug_file_name[1024];
diff --git a/drivers/staging/lustre/lnet/libcfs/fail.c 
b/drivers/staging/lustre/lnet/libcfs/fail.c
index 12dd50a..24f4701 100644
--- a/drivers/staging/lustre/lnet/libcfs/fail.c
+++ b/drivers/staging/lustre/lnet/libcfs/fail.c
@@ -29,7 +29,7 @@
  * Lustre is a trademark of Oracle Corporation, Inc.
  */
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
 unsigned long cfs_fail_loc;
 EXPORT_SYMBOL(cfs_fail_loc);
diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c 
b/drivers/staging/lustre/lnet/libcfs/hash.c
index ff54eaf..49a04a2 100644
--- a/drivers/staging/lustre/lnet/libcfs/hash.c
+++ b/drivers/staging/lustre/lnet/libcfs/hash.c
@@ -105,7 +105,7 @@
 #include 
 #include 
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
 #if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
 static unsigned int warn_on_depth = 8;
diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c 
b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c
index 55caa19..2ddd09a 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c
@@ -30,7 +30,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
 /** Global CPU partition table */
 struct cfs_cpt_table   *cfs_cpt_table __read_mostly;
diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c 
b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
index 1967b97..77fd3d06 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
@@ -27,7 +27,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
 /** destroy cpu-partition lock, see libcfs_private.h for more detail */
 void
diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_mem.c 
b/drivers/staging/lustre/lnet/libcfs/libcfs_mem.c
index ef085ba..1a0c7ca 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_mem.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_mem.c
@@ -28,7 +28,7 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
 struct cfs_var_array {
unsigned intva_count;   /* # of buffers */
diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c 
b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c
index 02de1ee..333e47f 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c
@@ -36,7 +36,7 @@
  * Author: Nathan Rutman 

[PATCH 51/64 v2] staging: lustre: mdc: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the mdc source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/mdc/Makefile   |  3 +++
 drivers/staging/lustre/lustre/mdc/lproc_mdc.c|  4 ++--
 drivers/staging/lustre/lustre/mdc/mdc_internal.h |  2 +-
 drivers/staging/lustre/lustre/mdc/mdc_lib.c  |  4 ++--
 drivers/staging/lustre/lustre/mdc/mdc_locks.c| 22 ++--
 drivers/staging/lustre/lustre/mdc/mdc_reint.c|  4 ++--
 drivers/staging/lustre/lustre/mdc/mdc_request.c  | 26 
 7 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mdc/Makefile 
b/drivers/staging/lustre/lustre/mdc/Makefile
index 99ba9ff..c7bc335 100644
--- a/drivers/staging/lustre/lustre/mdc/Makefile
+++ b/drivers/staging/lustre/lustre/mdc/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += mdc.o
 mdc-y := mdc_request.o mdc_reint.o mdc_lib.o mdc_locks.o lproc_mdc.o
diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c 
b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
index 51a7047..f685137 100644
--- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
+++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
@@ -32,8 +32,8 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include 
-#include "../include/obd_class.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
 #include "mdc_internal.h"
 
 static ssize_t active_show(struct kobject *kobj, struct attribute *attr,
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h 
b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
index fecedc88..cbf0115 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h
+++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
@@ -33,7 +33,7 @@
 #ifndef _MDC_INTERNAL_H
 #define _MDC_INTERNAL_H
 
-#include "../include/lustre_mdc.h"
+#include 
 
 void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars);
 
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c 
b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index bfd8fbe..ba13f089 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -31,8 +31,8 @@
  */
 
 #define DEBUG_SUBSYSTEM S_MDC
-#include "../include/lustre_net.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
+#include 
 #include "mdc_internal.h"
 
 static void set_mrc_cr_flags(struct mdt_rec_create *mrc, u64 flags)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c 
b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index ae97c6f..cbfea3d 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -32,17 +32,17 @@
 
 #define DEBUG_SUBSYSTEM S_MDC
 
-# include 
-
-#include "../include/lustre_intent.h"
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_fid.h"
-#include "../include/lustre_mdc.h"
-#include "../include/lustre_net.h"
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_swab.h"
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "mdc_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c 
b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index 2287bd4..f45c91d 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -35,9 +35,9 @@
 # include 
 # include 
 
-#include "../include/obd_class.h"
+#include 
 #include "mdc_internal.h"
-#include "../include/lustre_fid.h"
+#include 
 
 /* mdc_setattr does its own semaphore handling */
 static int mdc_reint(struct ptlrpc_request *request, int level)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c 
b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 3556307..6ef8dde 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -38,19 +38,19 @@
 # include 
 # include 
 
-#include "../include/lustre_errno.h"
-#include "../include/cl_object.h"
-#include "../include/llog_swab.h"
-#include "../include/lprocfs_status.h"
-#include "../include/lustre_acl.h"
-#include "../include/lustre_fid.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-#include "../include/lustre_kernelcomm.h"
-#include "../include/lustre_lmv.h"
-#include "../include/lustre_log.h"
-#include "../../include/uapi/linux/lustre/lustre_param.h"
-#include "../include/lustre_swab.h"
-#include "../include/obd_class.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "mdc_internal.h"
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org

[PATCH 52/64 v2] staging: lustre: mgc: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the mgc source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/mgc/Makefile   |  3 +++
 drivers/staging/lustre/lustre/mgc/lproc_mgc.c|  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_internal.h | 10 +-
 drivers/staging/lustre/lustre/mgc/mgc_request.c  | 12 ++--
 4 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mgc/Makefile 
b/drivers/staging/lustre/lustre/mgc/Makefile
index 8ea29a8..8abf108 100644
--- a/drivers/staging/lustre/lustre/mgc/Makefile
+++ b/drivers/staging/lustre/lustre/mgc/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += mgc.o
 mgc-y := mgc_request.o lproc_mgc.o
diff --git a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c 
b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c
index 0735220..2ec2d7f 100644
--- a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c
+++ b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c
@@ -32,8 +32,8 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include 
-#include "../include/obd_class.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
 #include "mgc_internal.h"
 
 LPROC_SEQ_FOPS_RO_TYPE(mgc, connect_flags);
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_internal.h 
b/drivers/staging/lustre/lustre/mgc/mgc_internal.h
index 8cb6758..7a2f2b7 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_internal.h
+++ b/drivers/staging/lustre/lustre/mgc/mgc_internal.h
@@ -33,11 +33,11 @@
 #ifndef _MGC_INTERNAL_H
 #define _MGC_INTERNAL_H
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../include/lustre_lib.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_log.h"
-#include "../include/lustre_export.h"
+#include 
+#include 
+#include 
+#include 
+#include 
 
 void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars);
 int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data);
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c 
b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index d344b01..3d2b969 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -39,12 +39,12 @@
 
 #include 
 
-#include "../include/lprocfs_status.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_disk.h"
-#include "../include/lustre_log.h"
-#include "../include/lustre_swab.h"
-#include "../include/obd_class.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "mgc_internal.h"
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 54/64 v2] staging: lustre: obdecho: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the obdecho source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/obdecho/Makefile |  3 +++
 .../staging/lustre/lustre/obdecho/echo_client.c| 24 +++---
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/Makefile 
b/drivers/staging/lustre/lustre/obdecho/Makefile
index a659a37..6be66fb 100644
--- a/drivers/staging/lustre/lustre/obdecho/Makefile
+++ b/drivers/staging/lustre/lustre/obdecho/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += obdecho.o
 obdecho-y := echo_client.o
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c 
b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index 3f28db3..f9808d1 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -31,18 +31,18 @@
  */
 
 #define DEBUG_SUBSYSTEM S_ECHO
-#include "../../include/linux/libcfs/libcfs.h"
-
-#include "../include/obd.h"
-#include "../include/obd_support.h"
-#include "../include/obd_class.h"
-#include "../include/lustre_debug.h"
-#include "../include/lprocfs_status.h"
-#include "../include/cl_object.h"
-#include "../include/lustre_fid.h"
-#include "../include/lustre_acl.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-#include "../include/lustre_net.h"
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "echo_internal.h"
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 53/64 v2] staging: lustre: obdclass: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the obdclass source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/obdclass/Makefile  |  3 +++
 drivers/staging/lustre/lustre/obdclass/cl_io.c   |  8 
 drivers/staging/lustre/lustre/obdclass/cl_lock.c |  8 
 drivers/staging/lustre/lustre/obdclass/cl_object.c   | 14 +++---
 drivers/staging/lustre/lustre/obdclass/cl_page.c |  8 
 drivers/staging/lustre/lustre/obdclass/class_obd.c   | 14 +++---
 drivers/staging/lustre/lustre/obdclass/debug.c   |  6 +++---
 drivers/staging/lustre/lustre/obdclass/genops.c  |  6 +++---
 drivers/staging/lustre/lustre/obdclass/kernelcomm.c  |  4 ++--
 drivers/staging/lustre/lustre/obdclass/linkea.c  |  6 +++---
 .../lustre/lustre/obdclass/linux/linux-module.c  | 14 +++---
 .../lustre/lustre/obdclass/linux/linux-sysctl.c  |  6 +++---
 drivers/staging/lustre/lustre/obdclass/llog.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/llog_cat.c|  2 +-
 .../staging/lustre/lustre/obdclass/llog_internal.h   |  2 +-
 drivers/staging/lustre/lustre/obdclass/llog_obd.c|  4 ++--
 drivers/staging/lustre/lustre/obdclass/llog_swab.c   |  4 ++--
 .../lustre/lustre/obdclass/lprocfs_counters.c|  4 ++--
 .../staging/lustre/lustre/obdclass/lprocfs_status.c  |  6 +++---
 drivers/staging/lustre/lustre/obdclass/lu_object.c   | 20 ++--
 drivers/staging/lustre/lustre/obdclass/lu_ref.c  | 10 +-
 .../staging/lustre/lustre/obdclass/lustre_handles.c  |  6 +++---
 drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 14 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c  | 12 ++--
 drivers/staging/lustre/lustre/obdclass/obd_mount.c   | 14 +++---
 drivers/staging/lustre/lustre/obdclass/obdo.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/statfs_pack.c |  8 
 drivers/staging/lustre/lustre/obdclass/uuid.c|  6 +++---
 28 files changed, 112 insertions(+), 109 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index af570c0..fa0ad654 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += obdclass.o
 
 obdclass-y := linux/linux-module.o linux/linux-sysctl.o \
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c 
b/drivers/staging/lustre/lustre/obdclass/cl_io.c
index ee7d677..2a70e21 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_io.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c
@@ -37,12 +37,12 @@
 
 #define DEBUG_SUBSYSTEM S_CLASS
 
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
 #include 
 #include 
-#include "../include/cl_object.h"
+#include 
 #include "cl_internal.h"
 
 /*
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c 
b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
index a343e3a..20e6405 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
@@ -37,11 +37,11 @@
 
 #define DEBUG_SUBSYSTEM S_CLASS
 
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
 #include 
-#include "../include/cl_object.h"
+#include 
 #include "cl_internal.h"
 
 static void cl_lock_trace0(int level, const struct lu_env *env,
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c 
b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index 08e55d4..95c7fa3 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -46,15 +46,15 @@
 
 #define DEBUG_SUBSYSTEM S_CLASS
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 /* class_put_type() */
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
 #include 
-#include "../../include/linux/libcfs/libcfs_hash.h"/* for cfs_hash stuff */
-#include "../include/cl_object.h"
-#include "../include/lu_object.h"
+#include   /* for cfs_hash stuff */
+#include 
+#include 
 #include "cl_internal.h"
 
 static struct kmem_cache *cl_env_kmem;
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c 
b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 6b8c41b..3dc084c 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -37,12 +37,12 @@
 
 #define DEBUG_SUBSYSTEM S_CLASS
 
-#include "../../include/linux/libcfs/libcfs.h"

[PATCH 50/64 v2] staging: lustre: lov: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the lov source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/lov/Makefile |  3 ++
 .../staging/lustre/lustre/lov/lov_cl_internal.h|  6 ++--
 drivers/staging/lustre/lustre/lov/lov_dev.c|  2 +-
 drivers/staging/lustre/lustre/lov/lov_ea.c |  6 ++--
 drivers/staging/lustre/lustre/lov/lov_internal.h   |  4 +--
 drivers/staging/lustre/lustre/lov/lov_merge.c  |  4 +--
 drivers/staging/lustre/lustre/lov/lov_obd.c| 32 +++---
 drivers/staging/lustre/lustre/lov/lov_offset.c |  4 +--
 drivers/staging/lustre/lustre/lov/lov_pack.c   | 10 +++
 drivers/staging/lustre/lustre/lov/lov_pool.c   |  4 +--
 drivers/staging/lustre/lustre/lov/lov_request.c|  6 ++--
 drivers/staging/lustre/lustre/lov/lproc_lov.c  |  4 +--
 12 files changed, 44 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/Makefile 
b/drivers/staging/lustre/lustre/lov/Makefile
index ea93add..3abfb4e 100644
--- a/drivers/staging/lustre/lustre/lov/Makefile
+++ b/drivers/staging/lustre/lustre/lov/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += lov.o
 lov-y := lov_obd.o lov_pack.o lov_offset.o lov_merge.o \
 lov_request.o lov_ea.o lov_dev.o lov_object.o lov_page.o  \
diff --git a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h 
b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
index 38281b2..89d92b0 100644
--- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
@@ -42,10 +42,10 @@
 #ifndef LOV_CL_INTERNAL_H
 #define LOV_CL_INTERNAL_H
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
-#include "../include/obd.h"
-#include "../include/cl_object.h"
+#include 
+#include 
 #include "lov_internal.h"
 
 /** \defgroup lov lov
diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c 
b/drivers/staging/lustre/lustre/lov/lov_dev.c
index 531b4fe..cea5f9d 100644
--- a/drivers/staging/lustre/lustre/lov/lov_dev.c
+++ b/drivers/staging/lustre/lustre/lov/lov_dev.c
@@ -37,7 +37,7 @@
 #define DEBUG_SUBSYSTEM S_LOV
 
 /* class_name2obd() */
-#include "../include/obd_class.h"
+#include 
 
 #include "lov_cl_internal.h"
 #include "lov_internal.h"
diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c 
b/drivers/staging/lustre/lustre/lov/lov_ea.c
index 530a4e9..1124fd5 100644
--- a/drivers/staging/lustre/lustre/lov/lov_ea.c
+++ b/drivers/staging/lustre/lustre/lov/lov_ea.c
@@ -37,10 +37,10 @@
 #define DEBUG_SUBSYSTEM S_LOV
 
 #include 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
-#include "../include/obd_class.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
+#include 
 
 #include "lov_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h 
b/drivers/staging/lustre/lustre/lov/lov_internal.h
index 4d9437e..a21f074 100644
--- a/drivers/staging/lustre/lustre/lov/lov_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_internal.h
@@ -33,8 +33,8 @@
 #ifndef LOV_INTERNAL_H
 #define LOV_INTERNAL_H
 
-#include "../include/obd_class.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
+#include 
 
 /*
  * If we are unable to get the maximum object size from the OST in
diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c 
b/drivers/staging/lustre/lustre/lov/lov_merge.c
index 034b4fc..9163361 100644
--- a/drivers/staging/lustre/lustre/lov/lov_merge.c
+++ b/drivers/staging/lustre/lustre/lov/lov_merge.c
@@ -32,9 +32,9 @@
 
 #define DEBUG_SUBSYSTEM S_LOV
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
-#include "../include/obd_class.h"
+#include 
 #include "lov_internal.h"
 
 /** Merge the lock value block() attributes and KMS from each of the
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c 
b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 953ed71..fefd3c5 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -38,22 +38,22 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LOV
-#include "../../include/linux/libcfs/libcfs.h"
-
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-
-#include "../include/cl_object.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_fid.h"
-#include "../include/lustre_lib.h"
-#include "../include/lustre_mds.h"
-#include "../include/lustre_net.h"
-#include "../../include/uapi/linux/lustre/lustre_param.h"
-#include "../include/lustre_swab.h"
-#include "../include/lprocfs_status.h"
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include 

[PATCH 55/64 v2] staging: lustre: osc: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the osc source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/osc/Makefile |  3 ++
 drivers/staging/lustre/lustre/osc/lproc_osc.c  |  6 ++--
 .../staging/lustre/lustre/osc/osc_cl_internal.h|  6 ++--
 drivers/staging/lustre/lustre/osc/osc_dev.c|  2 +-
 drivers/staging/lustre/lustre/osc/osc_internal.h   |  2 +-
 drivers/staging/lustre/lustre/osc/osc_io.c |  2 +-
 drivers/staging/lustre/lustre/osc/osc_lock.c   |  4 +--
 drivers/staging/lustre/lustre/osc/osc_quota.c  |  2 +-
 drivers/staging/lustre/lustre/osc/osc_request.c| 32 +++---
 9 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/Makefile 
b/drivers/staging/lustre/lustre/osc/Makefile
index 37cdeea..30dec90 100644
--- a/drivers/staging/lustre/lustre/osc/Makefile
+++ b/drivers/staging/lustre/lustre/osc/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += osc.o
 osc-y := osc_request.o osc_dev.o osc_object.o \
 osc_page.o osc_lock.o osc_io.o osc_quota.o osc_cache.o lproc_osc.o
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c 
b/drivers/staging/lustre/lustre/osc/lproc_osc.c
index 6e0fd15..ae13eb055 100644
--- a/drivers/staging/lustre/lustre/osc/lproc_osc.c
+++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c
@@ -32,9 +32,9 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include 
-#include "../include/obd_cksum.h"
-#include "../include/obd_class.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
+#include 
 #include 
 #include "osc_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h 
b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
index 270212f..35bdbfb 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
+++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
@@ -42,11 +42,11 @@
 #ifndef OSC_CL_INTERNAL_H
 #define OSC_CL_INTERNAL_H
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
-#include "../include/obd.h"
+#include 
 /* osc_build_res_name() */
-#include "../include/cl_object.h"
+#include 
 #include "osc_internal.h"
 
 /** \defgroup osc osc
diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c 
b/drivers/staging/lustre/lustre/osc/osc_dev.c
index c5d62ae..cf7b887 100644
--- a/drivers/staging/lustre/lustre/osc/osc_dev.c
+++ b/drivers/staging/lustre/lustre/osc/osc_dev.c
@@ -37,7 +37,7 @@
 #define DEBUG_SUBSYSTEM S_OSC
 
 /* class_name2obd() */
-#include "../include/obd_class.h"
+#include 
 
 #include "osc_cl_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h 
b/drivers/staging/lustre/lustre/osc/osc_internal.h
index 13a40f6..a536908 100644
--- a/drivers/staging/lustre/lustre/osc/osc_internal.h
+++ b/drivers/staging/lustre/lustre/osc/osc_internal.h
@@ -99,7 +99,7 @@ struct osc_cache_waiter {
 /*
  * cl integration.
  */
-#include "../include/cl_object.h"
+#include 
 
 extern struct ptlrpc_request_set *PTLRPCD_SET;
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c 
b/drivers/staging/lustre/lustre/osc/osc_io.c
index cbab800..f7969e3 100644
--- a/drivers/staging/lustre/lustre/osc/osc_io.c
+++ b/drivers/staging/lustre/lustre/osc/osc_io.c
@@ -37,7 +37,7 @@
 
 #define DEBUG_SUBSYSTEM S_OSC
 
-#include "../include/lustre_obdo.h"
+#include 
 
 #include "osc_cl_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c 
b/drivers/staging/lustre/lustre/osc/osc_lock.c
index 940c10c..b4f1f74 100644
--- a/drivers/staging/lustre/lustre/osc/osc_lock.c
+++ b/drivers/staging/lustre/lustre/osc/osc_lock.c
@@ -37,9 +37,9 @@
 
 #define DEBUG_SUBSYSTEM S_OSC
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 /* fid_build_reg_res_name() */
-#include "../include/lustre_fid.h"
+#include 
 
 #include "osc_cl_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c 
b/drivers/staging/lustre/lustre/osc/osc_quota.c
index fed4da6..a6118f8 100644
--- a/drivers/staging/lustre/lustre/osc/osc_quota.c
+++ b/drivers/staging/lustre/lustre/osc/osc_quota.c
@@ -23,7 +23,7 @@
  * Code originally extracted from quota directory
  */
 
-#include "../include/obd_class.h"
+#include 
 #include "osc_internal.h"
 
 static inline struct osc_quota_info *osc_oqi_alloc(u32 id)
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c 
b/drivers/staging/lustre/lustre/osc/osc_request.c
index af96ac5..4c68c42 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -32,22 +32,22 @@
 
 #define DEBUG_SUBSYSTEM S_OSC
 
-#include "../../include/linux/libcfs/libcfs.h"
-
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_net.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "../include/obd_cksum.h"
-
-#include "../include/lustre_ha.h"
-#include 

[PATCH 49/64 v2] staging: lustre: lmv: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the lmv source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/lmv/Makefile   |  3 +++
 drivers/staging/lustre/lustre/lmv/lmv_fld.c  | 14 +++---
 drivers/staging/lustre/lustre/lmv/lmv_intent.c   | 16 
 drivers/staging/lustre/lustre/lmv/lmv_internal.h |  6 +++---
 drivers/staging/lustre/lustre/lmv/lmv_obd.c  | 18 +-
 drivers/staging/lustre/lustre/lmv/lproc_lmv.c|  4 ++--
 6 files changed, 32 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/Makefile 
b/drivers/staging/lustre/lustre/lmv/Makefile
index 1a24299..91c9911 100644
--- a/drivers/staging/lustre/lustre/lmv/Makefile
+++ b/drivers/staging/lustre/lustre/lmv/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += lmv.o
 lmv-y := lmv_obd.o lmv_intent.o lmv_fld.o lproc_lmv.o
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_fld.c 
b/drivers/staging/lustre/lustre/lmv/lmv_fld.c
index 1a7dd15..5937468 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_fld.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_fld.c
@@ -37,13 +37,13 @@
 #include 
 #include 
 
-#include "../include/obd_support.h"
-#include "../include/lustre_fid.h"
-#include "../include/lustre_lib.h"
-#include "../include/lustre_net.h"
-#include "../include/lustre_dlm.h"
-#include "../include/obd_class.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "lmv_internal.h"
 
 int lmv_fld_lookup(struct lmv_obd *lmv, const struct lu_fid *fid, u32 *mds)
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c 
b/drivers/staging/lustre/lustre/lmv/lmv_intent.c
index 6b10bdd..22c247a 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c
@@ -37,14 +37,14 @@
 #include 
 #include 
 #include 
-#include "../include/lustre_intent.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_lib.h"
-#include "../include/lustre_net.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_mdc.h"
-#include "../include/obd_class.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "lmv_internal.h"
 
 static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_internal.h 
b/drivers/staging/lustre/lustre/lmv/lmv_internal.h
index ad109c0..a047523 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_internal.h
+++ b/drivers/staging/lustre/lustre/lmv/lmv_internal.h
@@ -33,9 +33,9 @@
 #ifndef _LMV_INTERNAL_H_
 #define _LMV_INTERNAL_H_
 
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "../include/obd.h"
-#include "../include/lustre_lmv.h"
+#include 
+#include 
+#include 
 
 #define LMV_MAX_TGT_COUNT 128
 
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c 
b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index f17221f..98537ca 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -41,15 +41,15 @@
 #include 
 #include 
 
-#include "../include/obd_support.h"
-#include "../include/lustre_net.h"
-#include "../include/obd_class.h"
-#include "../include/lustre_lmv.h"
-#include "../include/lprocfs_status.h"
-#include "../include/cl_object.h"
-#include "../include/lustre_fid.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-#include "../include/lustre_kernelcomm.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "lmv_internal.h"
 
 static int lmv_check_connect(struct obd_device *obd);
diff --git a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c 
b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
index 4c13e39..f16cfa4 100644
--- a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
+++ b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
@@ -34,8 +34,8 @@
 
 #include 
 #include 
-#include "../include/lprocfs_status.h"
-#include "../include/obd_class.h"
+#include 
+#include 
 #include "lmv_internal.h"
 
 static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr,
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 48/64 v2] staging: lustre: llite: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the llite source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/llite/Makefile   |  3 ++
 drivers/staging/lustre/lustre/llite/dcache.c   |  6 ++--
 drivers/staging/lustre/lustre/llite/dir.c  | 16 +-
 drivers/staging/lustre/lustre/llite/file.c | 10 +++
 drivers/staging/lustre/lustre/llite/glimpse.c  | 16 +-
 drivers/staging/lustre/lustre/llite/lcommon_cl.c   | 34 +++---
 drivers/staging/lustre/lustre/llite/lcommon_misc.c |  8 ++---
 .../staging/lustre/lustre/llite/llite_internal.h   | 20 ++---
 drivers/staging/lustre/lustre/llite/llite_lib.c| 18 ++--
 drivers/staging/lustre/lustre/llite/lproc_llite.c  |  4 +--
 drivers/staging/lustre/lustre/llite/namei.c|  6 ++--
 drivers/staging/lustre/lustre/llite/range_lock.c   |  2 +-
 drivers/staging/lustre/lustre/llite/range_lock.h   |  4 +--
 drivers/staging/lustre/lustre/llite/rw.c   |  2 +-
 drivers/staging/lustre/lustre/llite/statahead.c|  4 +--
 drivers/staging/lustre/lustre/llite/super25.c  |  6 ++--
 drivers/staging/lustre/lustre/llite/vvp_dev.c  |  2 +-
 drivers/staging/lustre/lustre/llite/vvp_internal.h |  4 +--
 drivers/staging/lustre/lustre/llite/vvp_io.c   |  2 +-
 drivers/staging/lustre/lustre/llite/vvp_lock.c |  2 +-
 drivers/staging/lustre/lustre/llite/vvp_object.c   |  4 +--
 drivers/staging/lustre/lustre/llite/xattr.c|  4 +--
 drivers/staging/lustre/lustre/llite/xattr_cache.c  |  4 +--
 23 files changed, 92 insertions(+), 89 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/Makefile 
b/drivers/staging/lustre/lustre/llite/Makefile
index 322d4fa..ef7adef 100644
--- a/drivers/staging/lustre/lustre/llite/Makefile
+++ b/drivers/staging/lustre/lustre/llite/Makefile
@@ -1,3 +1,6 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
+
 obj-$(CONFIG_LUSTRE_FS) += lustre.o
 lustre-y := dcache.o dir.o file.o llite_lib.o llite_nfs.o \
rw.o rw26.o namei.o symlink.o llite_mmap.o range_lock.o \
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c 
b/drivers/staging/lustre/lustre/llite/dcache.c
index d38cb33..3670fca 100644
--- a/drivers/staging/lustre/lustre/llite/dcache.c
+++ b/drivers/staging/lustre/lustre/llite/dcache.c
@@ -36,9 +36,9 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include "../include/obd_support.h"
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "../include/lustre_dlm.h"
+#include 
+#include 
+#include 
 
 #include "llite_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
b/drivers/staging/lustre/lustre/llite/dir.c
index 4b46271..1db3e7f 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -44,14 +44,14 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include "../include/obd_support.h"
-#include "../include/obd_class.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-#include "../include/lustre_lib.h"
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_fid.h"
-#include "../include/lustre_kernelcomm.h"
-#include "../include/lustre_swab.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "llite_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/llite/file.c 
b/drivers/staging/lustre/lustre/llite/file.c
index adffc29..2c30e42 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -37,16 +37,16 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LLITE
-#include "../include/lustre_dlm.h"
+#include 
 #include 
 #include 
 #include 
 #include 
-#include "../../include/uapi/linux/lustre/lustre_fiemap.h"
-#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
-#include "../include/lustre_swab.h"
+#include 
+#include 
+#include 
 
-#include "../include/cl_object.h"
+#include 
 #include "llite_internal.h"
 
 static int
diff --git a/drivers/staging/lustre/lustre/llite/glimpse.c 
b/drivers/staging/lustre/lustre/llite/glimpse.c
index 0143112..34c2cfe 100644
--- a/drivers/staging/lustre/lustre/llite/glimpse.c
+++ b/drivers/staging/lustre/lustre/llite/glimpse.c
@@ -36,18 +36,18 @@
  *   Author: Oleg Drokin 
  */
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/obd.h"
+#include 
+#include 
+#include 
+#include 
 
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_mdc.h"
+#include 
+#include 
 #include 
 #include 
 
-#include "../include/cl_object.h"
-#include "../llite/llite_internal.h"
+#include 
+#include "llite_internal.h"
 
 static const struct cl_lock_descr whole_file = {
.cld_start = 0,
diff --git a/drivers/staging/lustre/lustre/llite/lcommon_cl.c 
b/drivers/staging/lustre/lustre/llite/lcommon_cl.c

[PATCH 46/64 v2] staging: lustre: fld: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the fld source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/fld/Makefile   |  3 +++
 drivers/staging/lustre/lustre/fld/fld_cache.c| 16 
 drivers/staging/lustre/lustre/fld/fld_internal.h |  8 
 drivers/staging/lustre/lustre/fld/fld_request.c  | 18 +-
 drivers/staging/lustre/lustre/fld/lproc_fld.c| 14 +++---
 5 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/Makefile 
b/drivers/staging/lustre/lustre/fld/Makefile
index 646e315..426deba 100644
--- a/drivers/staging/lustre/lustre/fld/Makefile
+++ b/drivers/staging/lustre/lustre/fld/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include/
+
 obj-$(CONFIG_LUSTRE_FS) += fld.o
 fld-y := fld_request.o fld_cache.o lproc_fld.o
diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c 
b/drivers/staging/lustre/lustre/fld/fld_cache.c
index 68d009b..b723ece 100644
--- a/drivers/staging/lustre/lustre/fld/fld_cache.c
+++ b/drivers/staging/lustre/lustre/fld/fld_cache.c
@@ -39,18 +39,18 @@
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
 #include 
 
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../../include/uapi/linux/lustre/lustre_ver.h"
-#include "../include/obd_support.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
+#include 
+#include 
+#include 
 
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_fld.h"
+#include 
+#include 
 #include "fld_internal.h"
 
 /**
diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h 
b/drivers/staging/lustre/lustre/fld/fld_internal.h
index 3412c90..fe6f278 100644
--- a/drivers/staging/lustre/lustre/fld/fld_internal.h
+++ b/drivers/staging/lustre/lustre/fld/fld_internal.h
@@ -56,11 +56,11 @@
 #ifndef __FLD_INTERNAL_H
 #define __FLD_INTERNAL_H
 
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
+#include 
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_fld.h"
+#include 
+#include 
+#include 
 
 struct fld_stats {
__u64   fst_count;
diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 1282992..5b18083 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -38,19 +38,19 @@
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
 #include 
 
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../../include/uapi/linux/lustre/lustre_ver.h"
-#include "../include/obd_support.h"
-#include "../include/lprocfs_status.h"
+#include 
+#include 
+#include 
+#include 
+#include 
 
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_fld.h"
-#include "../include/lustre_mdc.h"
+#include 
+#include 
+#include 
 #include "fld_internal.h"
 
 static int fld_rrb_hash(struct lu_client_fld *fld, u64 seq)
diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c 
b/drivers/staging/lustre/lustre/fld/lproc_fld.c
index b83d7eb..6cae803 100644
--- a/drivers/staging/lustre/lustre/fld/lproc_fld.c
+++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c
@@ -39,15 +39,15 @@
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
 
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_fld.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "fld_internal.h"
 
 static int
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 45/64 v2] staging: lustre: fid: add include path to Makefile

2017-08-19 Thread James Simmons
Start to rationalize include paths in the fid source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/fid/Makefile   |  3 +++
 drivers/staging/lustre/lustre/fid/fid_internal.h |  4 ++--
 drivers/staging/lustre/lustre/fid/fid_lib.c  |  4 ++--
 drivers/staging/lustre/lustre/fid/fid_request.c  | 12 ++--
 drivers/staging/lustre/lustre/fid/lproc_fid.c| 12 ++--
 5 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fid/Makefile 
b/drivers/staging/lustre/lustre/fid/Makefile
index b7ef314..77b65b9 100644
--- a/drivers/staging/lustre/lustre/fid/Makefile
+++ b/drivers/staging/lustre/lustre/fid/Makefile
@@ -1,2 +1,5 @@
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
+subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include/
+
 obj-$(CONFIG_LUSTRE_FS) += fid.o
 fid-y := fid_request.o fid_lib.o lproc_fid.o
diff --git a/drivers/staging/lustre/lustre/fid/fid_internal.h 
b/drivers/staging/lustre/lustre/fid/fid_internal.h
index 5f8d15b..f48ab9d 100644
--- a/drivers/staging/lustre/lustre/fid/fid_internal.h
+++ b/drivers/staging/lustre/lustre/fid/fid_internal.h
@@ -36,8 +36,8 @@
 #ifndef __FID_INTERNAL_H
 #define __FID_INTERNAL_H
 
-#include "../../include/uapi/linux/lustre/lustre_idl.h"
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
+#include 
 
 /* Functions used internally in module. */
 
diff --git a/drivers/staging/lustre/lustre/fid/fid_lib.c 
b/drivers/staging/lustre/lustre/fid/fid_lib.c
index 6ab06ef..c21a5f5 100644
--- a/drivers/staging/lustre/lustre/fid/fid_lib.c
+++ b/drivers/staging/lustre/lustre/fid/fid_lib.c
@@ -39,9 +39,9 @@
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
-#include "../include/lustre_fid.h"
+#include 
 
 /**
  * A cluster-wide range from which fid-sequences are granted to servers and
diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c 
b/drivers/staging/lustre/lustre/fid/fid_request.c
index 19895fa..ba73623 100644
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
@@ -38,15 +38,15 @@
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
 
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
+#include 
 /* mdc RPC locks */
-#include "../include/lustre_mdc.h"
+#include 
 #include "fid_internal.h"
 
 static struct dentry *seq_debugfs_dir;
diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c 
b/drivers/staging/lustre/lustre/fid/lproc_fid.c
index 3eed838..1a269fb 100644
--- a/drivers/staging/lustre/lustre/fid/lproc_fid.c
+++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c
@@ -38,14 +38,14 @@
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 #include 
 
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../include/obd_support.h"
-#include "../include/lustre_req_layout.h"
-#include "../include/lustre_fid.h"
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "fid_internal.h"
 
 /* Format: [0x64BIT_INT - 0x64BIT_INT] + 32 bytes just in case */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 47/64 v2] staging: lustre: ptlrpc: add include path to Makefile

2017-08-19 Thread James Simmons
Rationalize include paths in the ptlrpc/ldlm source code files.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/ldlm/interval_tree.c   |  6 +++---
 drivers/staging/lustre/lustre/ldlm/l_lock.c  |  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 12 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c  |  8 
 drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c  |  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c| 12 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c   |  8 
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c  |  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_plain.c  |  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c   |  8 
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c|  8 
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c   |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/Makefile|  3 +++
 drivers/staging/lustre/lustre/ptlrpc/client.c| 12 ++--
 drivers/staging/lustre/lustre/ptlrpc/connection.c|  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/errno.c |  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/events.c|  8 
 drivers/staging/lustre/lustre/ptlrpc/import.c| 16 
 drivers/staging/lustre/lustre/ptlrpc/layout.c| 18 +-
 drivers/staging/lustre/lustre/ptlrpc/llog_client.c   |  8 
 drivers/staging/lustre/lustre/ptlrpc/llog_net.c  |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c  | 12 ++--
 drivers/staging/lustre/lustre/ptlrpc/niobuf.c| 10 +-
 drivers/staging/lustre/lustre/ptlrpc/nrs.c   | 10 +-
 drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c  |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c  | 16 
 drivers/staging/lustre/lustre/ptlrpc/pers.c  | 10 +-
 drivers/staging/lustre/lustre/ptlrpc/pinger.c|  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c |  8 
 drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c   | 18 +-
 drivers/staging/lustre/lustre/ptlrpc/recover.c   | 18 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c   | 16 
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c  | 20 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c| 14 +++---
 drivers/staging/lustre/lustre/ptlrpc/sec_gc.c| 10 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 16 
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c  | 10 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 10 +-
 drivers/staging/lustre/lustre/ptlrpc/service.c   | 11 ++-
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c  |  8 
 40 files changed, 202 insertions(+), 198 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/interval_tree.c 
b/drivers/staging/lustre/lustre/ldlm/interval_tree.c
index 5bebd9a..19e285d 100644
--- a/drivers/staging/lustre/lustre/ldlm/interval_tree.c
+++ b/drivers/staging/lustre/lustre/ldlm/interval_tree.c
@@ -34,9 +34,9 @@
  * Author: Huang Wei 
  * Author: Jay Xiong 
  */
-#include "../include/lustre_dlm.h"
-#include "../include/obd_support.h"
-#include "../include/interval_tree.h"
+#include 
+#include 
+#include 
 
 enum {
INTERVAL_RED = 0,
diff --git a/drivers/staging/lustre/lustre/ldlm/l_lock.c 
b/drivers/staging/lustre/lustre/ldlm/l_lock.c
index 3845f38..57fd84e 100644
--- a/drivers/staging/lustre/lustre/ldlm/l_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/l_lock.c
@@ -31,10 +31,10 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LDLM
-#include "../../include/linux/libcfs/libcfs.h"
+#include 
 
-#include "../include/lustre_dlm.h"
-#include "../include/lustre_lib.h"
+#include 
+#include 
 
 /**
  * Lock a lock and its resource.
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
index 08f97e2..2cc6dc2 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
@@ -46,12 +46,12 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LDLM
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../include/lustre_dlm.h"
-#include "../include/obd_support.h"
-#include "../include/obd.h"
-#include "../include/obd_class.h"
-#include "../include/lustre_lib.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include "ldlm_internal.h"
 
 /* When a lock is cancelled by a client, the KMS may undergo change if this
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index b7f28b3..39433ac 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -52,10 

[PATCH 44/64 v2] staging: lustre: uapi: remove BIT macro from UAPI headers

2017-08-19 Thread James Simmons
The BIT macro is not available for UAPI headers so remove
it from the lustre UAPI headers.

Signed-off-by: James Simmons 
---
 .../lustre/include/uapi/linux/lustre/lustre_idl.h  | 38 +++---
 .../lustre/include/uapi/linux/lustre/lustre_user.h | 12 +++
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
index 9613f7c..cc59c1a 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
@@ -1554,8 +1554,8 @@ enum mds_op_bias {
MDS_CREATE_VOLATILE = 1 << 10,
MDS_OWNEROVERRIDE   = 1 << 11,
MDS_HSM_RELEASE = 1 << 12,
-   MDS_RENAME_MIGRATE  = BIT(13),
-   MDS_CLOSE_LAYOUT_SWAP   = BIT(14),
+   MDS_RENAME_MIGRATE  = 1 << 13,
+   MDS_CLOSE_LAYOUT_SWAP   = 1 << 14,
 };
 
 /* instance of mdt_reint_rec */
@@ -1993,21 +1993,21 @@ struct ldlm_flock_wire {
 };
 
 enum ldlm_intent_flags {
-   IT_OPEN = BIT(0),
-   IT_CREAT= BIT(1),
-   IT_OPEN_CREAT   = BIT(1) | BIT(0),
-   IT_READDIR  = BIT(2),
-   IT_GETATTR  = BIT(3),
-   IT_LOOKUP   = BIT(4),
-   IT_UNLINK   = BIT(5),
-   IT_TRUNC= BIT(6),
-   IT_GETXATTR = BIT(7),
-   IT_EXEC = BIT(8),
-   IT_PIN  = BIT(9),
-   IT_LAYOUT   = BIT(10),
-   IT_QUOTA_DQACQ  = BIT(11),
-   IT_QUOTA_CONN   = BIT(12),
-   IT_SETXATTR = BIT(13),
+   IT_OPEN = 0x0001,
+   IT_CREAT= 0x0002,
+   IT_OPEN_CREAT   = 0x0003,
+   IT_READDIR  = 0x0004,
+   IT_GETATTR  = 0x0008,
+   IT_LOOKUP   = 0x0010,
+   IT_UNLINK   = 0x0020,
+   IT_TRUNC= 0x0040,
+   IT_GETXATTR = 0x0080,
+   IT_EXEC = 0x0100,
+   IT_PIN  = 0x0200,
+   IT_LAYOUT   = 0x0400,
+   IT_QUOTA_DQACQ  = 0x0800,
+   IT_QUOTA_CONN   = 0x1000,
+   IT_SETXATTR = 0x2000,
 };
 
 struct ldlm_intent {
@@ -2375,8 +2375,8 @@ enum llog_flag {
LLOG_F_ZAP_WHEN_EMPTY   = 0x1,
LLOG_F_IS_CAT   = 0x2,
LLOG_F_IS_PLAIN = 0x4,
-   LLOG_F_EXT_JOBID= BIT(3),
-   LLOG_F_IS_FIXSIZE   = BIT(4),
+   LLOG_F_EXT_JOBID= 0x8,
+   LLOG_F_IS_FIXSIZE   = 0x10,
 
/*
 * Note: Flags covered by LLOG_F_EXT_MASK will be inherited from
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
index ca720f1..2fcfe2b 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h
@@ -645,7 +645,7 @@ struct if_quotactl {
 #define SWAP_LAYOUTS_CHECK_DV2 (1 << 1)
 #define SWAP_LAYOUTS_KEEP_MTIME(1 << 2)
 #define SWAP_LAYOUTS_KEEP_ATIME(1 << 3)
-#define SWAP_LAYOUTS_CLOSE BIT(4)
+#define SWAP_LAYOUTS_CLOSE (1 << 4)
 
 /* Swap XATTR_NAME_HSM as well, only on the MDT so far */
 #define SWAP_LAYOUTS_MDS_HSM   (1 << 31)
@@ -792,15 +792,15 @@ static inline void hsm_set_cl_error(int *flags, int error)
 
 enum changelog_send_flag {
/* Not yet implemented */
-   CHANGELOG_FLAG_FOLLOW   = BIT(0),
+   CHANGELOG_FLAG_FOLLOW   = 0x01,
/*
 * Blocking IO makes sense in case of slow user parsing of the records,
 * but it also prevents us from cleaning up if the records are not
 * consumed.
 */
-   CHANGELOG_FLAG_BLOCK= BIT(1),
+   CHANGELOG_FLAG_BLOCK= 0x02,
/* Pack jobid into the changelog records if available. */
-   CHANGELOG_FLAG_JOBID= BIT(2),
+   CHANGELOG_FLAG_JOBID= 0x04,
 };
 
 #define CR_MAXSIZE cfs_size_round(2 * NAME_MAX + 2 + \
@@ -981,8 +981,8 @@ struct ioc_data_version {
__u64 idv_flags; /* See LL_DV_xxx */
 };
 
-#define LL_DV_RD_FLUSH BIT(0)  /* Flush dirty pages from clients */
-#define LL_DV_WR_FLUSH BIT(1)  /* Flush all caching pages from clients */
+#define LL_DV_RD_FLUSH (1 << 0) /* Flush dirty pages from clients */
+#define LL_DV_WR_FLUSH (1 << 1) /* Flush all caching pages from clients */
 
 #ifndef offsetof
 # define offsetof(typ, memb) ((unsigned long)((char *)&(((typ *)0)->memb)))
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 42/64 v2] staging: lustre: uapi: remove CONFIG_LUSTRE_OBD_MAX_IOCTL

2017-08-19 Thread James Simmons
Now that lustre_ioctl.h is a UAPI header the kernel configuration
option CONFIG_LUSTRE_OBD_MAX_IOCTL needs to be remove. The user
land utilites will no longer be able to see this option and
actually they never used this option before. Since this is the
case setting the kernel configuration to something other than
8K could actually break things. The best option is just hard
code it to 8K.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25246
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Dmitry Eremin 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h|  1 -
 drivers/staging/lustre/lustre/Kconfig  | 10 --
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c|  2 ++
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index 3060e4d..1f52477 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -56,7 +56,6 @@ enum md_echo_cmd {
 
 #define OBD_IOCTL_VERSION  0x00010004
 #define OBD_DEV_BY_DEVNAME 0xd0de
-#define OBD_MAX_IOCTL_BUFFER   CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER
 
 struct obd_ioctl_data {
__u32   ioc_len;
diff --git a/drivers/staging/lustre/lustre/Kconfig 
b/drivers/staging/lustre/lustre/Kconfig
index 9f5d75f..90d8269 100644
--- a/drivers/staging/lustre/lustre/Kconfig
+++ b/drivers/staging/lustre/lustre/Kconfig
@@ -31,16 +31,6 @@ config LUSTRE_FS
 
  See also http://wiki.lustre.org/
 
-config LUSTRE_OBD_MAX_IOCTL_BUFFER
-   int "Lustre obd max ioctl buffer bytes (default 8KB)"
-   depends on LUSTRE_FS
-   default 8192
-   help
- This option defines the maximum size of buffer in bytes that user 
space
- applications can pass to Lustre kernel module through ioctl interface.
-
- If unsure, use default.
-
 config LUSTRE_DEBUG_EXPENSIVE_CHECK
bool "Enable Lustre DEBUG checks"
depends on LUSTRE_FS
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c 
b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index b2f5597..94af257 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -68,6 +68,8 @@
 #include "../../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../../../include/uapi/linux/lustre/lustre_ver.h"
 
+#define OBD_MAX_IOCTL_BUFFER   8192
+
 static int obd_ioctl_is_invalid(struct obd_ioctl_data *data)
 {
if (data->ioc_len > BIT(30)) {
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 40/64 v2] staging: lustre: uapi: remove libcfs.h from lustre_id.h/lustre_user.h

2017-08-19 Thread James Simmons
These are the last UAPI headers that contain libcfs.h which is
internal kernel header. Since it is not available to user land
remove libcfs.h and add the need headers that libcfs.h provided.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin 
Reviewed-by: Jinshan Xiong 
Reviewed-by: Fan Yong 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h  | 3 ++-
 drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index d26c599..fe443f8 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -69,7 +69,8 @@
 #ifndef _LUSTRE_IDL_H_
 #define _LUSTRE_IDL_H_
 
-#include "../../../include/linux/libcfs/libcfs.h"
+#include 
+
 #include "../../../include/uapi/linux/lnet/lnet-types.h"
 /* Defn's shared with user-space. */
 #include "lustre_user.h"
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index edff8dc..bee93d0 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -43,6 +43,7 @@
  */
 
 #ifdef __KERNEL__
+# include 
 # include 
 # include 
 # include  /* snprintf() */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 41/64 v2] staging: lustre: uapi: migrate remaining uapi headers to uapi directory

2017-08-19 Thread James Simmons
Move all the remaining lustre headers shared between user land
and kernel space to the uapi directory.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25246
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Dmitry Eremin 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h   | 2 +-
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h   | 2 +-
 .../ll_fiemap.h => include/uapi/linux/lustre/lustre_fiemap.h}   | 6 +-
 .../{lustre/include => include/uapi/linux}/lustre/lustre_idl.h  | 6 ++
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 2 +-
 .../uapi/linux/lustre/lustre_kernelcomm.h}  | 6 +++---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h | 1 -
 .../{lustre/include => include/uapi/linux}/lustre/lustre_user.h | 2 +-
 .../{lustre/include => include/uapi/linux/lustre}/lustre_ver.h  | 0
 drivers/staging/lustre/lustre/fid/fid_internal.h| 2 +-
 drivers/staging/lustre/lustre/fid/fid_lib.c | 1 -
 drivers/staging/lustre/lustre/fld/fld_cache.c   | 2 +-
 drivers/staging/lustre/lustre/fld/fld_internal.h| 2 +-
 drivers/staging/lustre/lustre/fld/fld_request.c | 2 +-
 drivers/staging/lustre/lustre/include/llog_swab.h   | 3 ++-
 drivers/staging/lustre/lustre/include/lprocfs_status.h  | 2 +-
 drivers/staging/lustre/lustre/include/lu_object.h   | 2 +-
 drivers/staging/lustre/lustre/include/{lustre => }/lustre_errno.h   | 0
 drivers/staging/lustre/lustre/include/lustre_export.h   | 2 +-
 drivers/staging/lustre/lustre/include/lustre_fid.h  | 2 +-
 drivers/staging/lustre/lustre/include/lustre_fld.h  | 2 +-
 drivers/staging/lustre/lustre/include/lustre_import.h   | 2 +-
 drivers/staging/lustre/lustre/include/lustre_kernelcomm.h   | 2 +-
 drivers/staging/lustre/lustre/include/lustre_lib.h  | 4 ++--
 drivers/staging/lustre/lustre/include/lustre_lmv.h  | 2 +-
 drivers/staging/lustre/lustre/include/lustre_log.h  | 2 +-
 drivers/staging/lustre/lustre/include/lustre_mdc.h  | 1 -
 drivers/staging/lustre/lustre/include/lustre_mds.h  | 1 -
 drivers/staging/lustre/lustre/include/lustre_net.h  | 5 +++--
 drivers/staging/lustre/lustre/include/lustre_obdo.h | 2 +-
 drivers/staging/lustre/lustre/include/lustre_swab.h | 2 +-
 drivers/staging/lustre/lustre/include/obd.h | 2 +-
 drivers/staging/lustre/lustre/include/obd_cksum.h   | 2 +-
 drivers/staging/lustre/lustre/include/obd_class.h   | 1 -
 drivers/staging/lustre/lustre/include/seq_range.h   | 2 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c   | 3 +--
 drivers/staging/lustre/lustre/llite/dcache.c| 2 +-
 drivers/staging/lustre/lustre/llite/file.c  | 2 +-
 drivers/staging/lustre/lustre/llite/lcommon_cl.c| 1 -
 drivers/staging/lustre/lustre/llite/llite_internal.h| 2 +-
 drivers/staging/lustre/lustre/llite/namei.c | 1 -
 drivers/staging/lustre/lustre/llite/range_lock.c| 2 +-
 drivers/staging/lustre/lustre/llite/vvp_internal.h  | 2 +-
 drivers/staging/lustre/lustre/llite/xattr.c | 1 -
 drivers/staging/lustre/lustre/llite/xattr_cache.c   | 1 -
 drivers/staging/lustre/lustre/lmv/lmv_fld.c | 1 -
 drivers/staging/lustre/lustre/lmv/lmv_intent.c  | 1 -
 drivers/staging/lustre/lustre/lmv/lmv_internal.h| 2 +-
 drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 -
 drivers/staging/lustre/lustre/lov/lov_ea.c  | 2 +-
 drivers/staging/lustre/lustre/lov/lov_internal.h| 2 +-
 drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +-
 drivers/staging/lustre/lustre/lov/lov_pack.c| 3 ---
 drivers/staging/lustre/lustre/lov/lov_request.c | 2 +-
 drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +--
 drivers/staging/lustre/lustre/mgc/mgc_internal.h| 1 -
 drivers/staging/lustre/lustre/obdclass/linkea.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +-
 

[PATCH 43/64 v2] staging: lustre: uapi: use proper byteorder functions in lustre_idl.h

2017-08-19 Thread James Simmons
In order for lustre_idl.h to be usable for both user
land and kernel space it has to use the proper
byteorder functions.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/16916
Reviewed-by: Frank Zago 
Reviewed-by: Dmitry Eremin 
Reviewed-by: Oleg Drokin 
Reviewed-by: John L. Hammond 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/uapi/linux/lustre/lustre_idl.h   | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
index b7c1a1e..9613f7c 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h
@@ -67,6 +67,7 @@
 #ifndef _LUSTRE_IDL_H_
 #define _LUSTRE_IDL_H_
 
+#include 
 #include 
 
 #include "../lnet/lnet-types.h"
@@ -389,7 +390,7 @@ enum lu_dirpage_flags {
 
 static inline struct lu_dirent *lu_dirent_start(struct lu_dirpage *dp)
 {
-   if (le32_to_cpu(dp->ldp_flags) & LDF_EMPTY)
+   if (__le32_to_cpu(dp->ldp_flags) & LDF_EMPTY)
return NULL;
else
return dp->ldp_entries;
@@ -399,8 +400,8 @@ static inline struct lu_dirent *lu_dirent_next(struct 
lu_dirent *ent)
 {
struct lu_dirent *next;
 
-   if (le16_to_cpu(ent->lde_reclen) != 0)
-   next = ((void *)ent) + le16_to_cpu(ent->lde_reclen);
+   if (__le16_to_cpu(ent->lde_reclen) != 0)
+   next = ((void *)ent) + __le16_to_cpu(ent->lde_reclen);
else
next = NULL;
 
@@ -1840,11 +1841,11 @@ static inline ssize_t lmv_mds_md_size(int stripe_count, 
unsigned int lmm_magic)
 
 static inline int lmv_mds_md_stripe_count_get(const union lmv_mds_md *lmm)
 {
-   switch (le32_to_cpu(lmm->lmv_magic)) {
+   switch (__le32_to_cpu(lmm->lmv_magic)) {
case LMV_MAGIC_V1:
-   return le32_to_cpu(lmm->lmv_md_v1.lmv_stripe_count);
+   return __le32_to_cpu(lmm->lmv_md_v1.lmv_stripe_count);
case LMV_USER_MAGIC:
-   return le32_to_cpu(lmm->lmv_user_md.lum_stripe_count);
+   return __le32_to_cpu(lmm->lmv_user_md.lum_stripe_count);
default:
return -EINVAL;
}
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 01/14] staging: lustre: llite: Remove filtering of seclabel xattr

2017-08-19 Thread James Simmons

> On Mon, Aug 14, 2017 at 12:20:51PM -0400, James Simmons wrote:
> > From: Robin Humble 
> > 
> > The security.capability xattr is used to implement File
> > Capabilities in recent Linux versions. Capabilities are a
> > fine grained approach to granting executables elevated
> > privileges. eg. /bin/ping can have capabilities
> > cap_net_admin, cap_net_raw+ep instead of being setuid root.
> > 
> > This xattr has long been filtered out by llite, initially for
> > stability reasons (b15587), and later over performance
> > concerns as this xattr is read for every file with eg.
> > 'ls --color'. Since LU-2869 xattr's are cached on clients,
> > alleviating most performance concerns.
> > 
> > Removing llite's filtering of the security.capability xattr
> > enables using Lustre as a root filesystem, which is used on
> > some large clusters.
> > 
> > Signed-off-by: Robin Humble 
> > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9562
> > Reviewed-on: https://review.whamcloud.com/27292
> > Reviewed-by: John L. Hammond 
> > Reviewed-by: Sebastien Buisson 
> > Reviewed-by: Oleg Drokin 
> > Signed-off-by: James Simmons 
> > ---
> > Changelog:
> > 
> > v1) Initial submit with wrong patch attached.
> > v2) Proper patch this time.
> 
> I don't see a v1 patch anywhere...

Its the patch I asked you to drop earlier. Same commit message but I mixed
up the patch with another patch.

> Anyway, when you do this, please make your subject such that I can sort
> the emails properly and they show up in the correct order, so put the
> "v2" after the patch number like this:
> 
>Subject: [PATCH 01/14 v2] staging: lustre: llite: Remove filtering of
> 
> I think git does that correctly for you automatically if you use it...

Will do.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lustre: fix structure size for ARM OABI

2017-08-19 Thread James Simmons

> On Aug 17, 2017, at 10:26, Greg KH  wrote:
> > 
> > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> >> When building the kernel for the ARM architecture without setting
> >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> >> differs, due to different alignment requirements of OABI and EABI.

I have to ask are you testing the lustre on ARM?
 
> >> Marking the anonymous union within struct lov_user_md_v3 as
> >> '_packed' solves this issue. Otherwise we get the following
> >> error:
> >> 
> >> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> >> of macro ‘BUILD_BUG_ON’
> >>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> >> 
> >> Signed-off-by: Cihangir Akturk 
> >> ---
> >> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > This file is no longer in the tree :(
> 
> With James' recent patch series, this has moved to 
> include/uapi/linux/lustre/lustre_user.h

BTW is __packed valid for UAPI headers?___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH RFC] staging: lustre: libcfs: tracepoint implementation

2017-08-19 Thread James Simmons
The other eye sore for lustre after the UAPI mess is the loony
debugging system. This debugging system was written long before
trace point existed. Well it shows and todays trace point has
surpassed lustre debugging system.

Some of the things implemented are:

1) trace events have a specific naming scheme to allow advance
   filter. With this layout you can still use the libcfs module
   parameters debugging options to enable classes of trace
   events enabled at module startup. This allows debugging for
   those special cases.

2) trace events are ratelimited. Its very easy to have 2
   lustre clients over whelm the logging servers. The lustre
   debugging code was ratelimited for each debugging statement
   which is over kill. For ratelimited trace events its per
   subsystem.

3) As each subsystem gets moved over to trace events the native
   lustre debugging no longer prints to the console. Currently
   I unroll to have trace_event(); pr_info(). Prehaps its could
   be rolled into the trace_event macro to make it cleaner.

Signed-off-by: James Simmons 
---
 .../lustre/include/linux/libcfs/libcfs_debug.h |6 +
 .../lustre/include/linux/libcfs/libcfs_fail.h  |   46 +-
 drivers/staging/lustre/lnet/libcfs/Makefile|2 +-
 drivers/staging/lustre/lnet/libcfs/debug.c |   57 +-
 drivers/staging/lustre/lnet/libcfs/fail.c  |   53 +-
 drivers/staging/lustre/lnet/libcfs/libcfs_trace.c  |   38 +
 drivers/staging/lustre/lnet/libcfs/libcfs_trace.h  | 2610 
 .../lustre/lnet/libcfs/linux/linux-tracefile.c |5 +-
 drivers/staging/lustre/lnet/libcfs/tracefile.c |3 +-
 drivers/staging/lustre/lnet/libcfs/tracefile.h |6 -
 10 files changed, 2766 insertions(+), 60 deletions(-)
 create mode 100644 drivers/staging/lustre/lnet/libcfs/libcfs_trace.c
 create mode 100644 drivers/staging/lustre/lnet/libcfs/libcfs_trace.h

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index e7c3741..1fc945c 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -38,6 +38,7 @@
 #ifndef __LIBCFS_DEBUG_H__
 #define __LIBCFS_DEBUG_H__
 
+#include 
 #include 
 
 /*
@@ -102,6 +103,11 @@ struct libcfs_debug_msg_data {
   .msg_cdls   = (cdls)  }; \
dataname.msg_mask   = (mask)
 
+#define CFS_TRACE_CONSOLE_BUFFER_SIZE  1024
+
+int libcfs_debug_trace_init(struct module *module, int sub_system,
+   struct ratelimit_state *rs);
+
 /**
  * Filters out logging messages based on mask and subsystem.
  */
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
index fedb46d..b22160c 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
@@ -76,26 +76,7 @@ static inline bool CFS_FAIL_PRECHECK(u32 id)
(cfs_fail_loc & id & CFS_FAULT));
 }
 
-static inline int cfs_fail_check_set(u32 id, u32 value,
-int set, int quiet)
-{
-   int ret = 0;
-
-   if (unlikely(CFS_FAIL_PRECHECK(id))) {
-   ret = __cfs_fail_check_set(id, value, set);
-   if (ret) {
-   if (quiet) {
-   CDEBUG(D_INFO, "*** cfs_fail_loc=%x, 
val=%u***\n",
-  id, value);
-   } else {
-   LCONSOLE_INFO("*** cfs_fail_loc=%x, 
val=%u***\n",
- id, value);
-   }
-   }
-   }
-
-   return ret;
-}
+int cfs_fail_check_set(u32 id, u32 value, int set, int quiet);
 
 /* If id hit cfs_fail_loc, return 1, otherwise return 0 */
 #define CFS_FAIL_CHECK(id) \
@@ -160,30 +141,7 @@ static inline int cfs_fail_timeout_set(u32 id, u32 value, 
int ms, int set)
 #define CFS_FAULT_CHECK(id)\
CFS_FAIL_CHECK(CFS_FAULT | (id))
 
-/*
- * The idea here is to synchronise two threads to force a race. The
- * first thread that calls this with a matching fail_loc is put to
- * sleep. The next thread that calls with the same fail_loc wakes up
- * the first and continues.
- */
-static inline void cfs_race(u32 id)
-{
-   if (CFS_FAIL_PRECHECK(id)) {
-   if (unlikely(__cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET))) {
-   int rc;
-
-   cfs_race_state = 0;
-   CERROR("cfs_race id %x sleeping\n", id);
-   rc = wait_event_interruptible(cfs_race_waitq,
- !!cfs_race_state);
-   CERROR("cfs_fail_race id %x awake, rc=%d\n", id, rc);
-   } else {
-  

[PATCH 27/64 v2] staging: lustre: uapi: change variable type to match

2017-08-19 Thread James Simmons
Change i from int to __u32 to match lcfg_bufcount field. Also
this matches what the other functions also do.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index a45d167..4d23938 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -199,7 +199,7 @@ static inline void lustre_cfg_init(struct lustre_cfg *lcfg, 
int cmd,
   struct lustre_cfg_bufs *bufs)
 {
char *ptr;
-   int i;
+   __u32 i;
 
lcfg->lcfg_version = LUSTRE_CFG_VERSION;
lcfg->lcfg_command = cmd;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 28/64 v2] staging: lustre: uapi: check if argument for lustre_cfg_buf() is NULL

2017-08-19 Thread James Simmons
Check if lcfg passed in is NULL and if it is just return NULL.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin 
Reviewed-by: Jinshan Xiong 
Reviewed-by: Fan Yong 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index 4d23938..4208d61 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -161,6 +161,9 @@ static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, 
__u32 index)
size_t offset;
__u32 bufcount;
 
+   if (!lcfg)
+   return NULL;
+
bufcount = lcfg->lcfg_bufcount;
if (index >= bufcount)
return NULL;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 23/64 v2] staging: lustre: uapi: move lustre_cfg_string() to obd_config.c

2017-08-19 Thread James Simmons
To perserve the truncate warning move lustre_cfg_string()
to obd_config.c. A identical function was created for
userland. This function was a bit big for a inline function.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_cfg.h | 29 --
 drivers/staging/lustre/lustre/include/obd_class.h  |  1 +
 .../staging/lustre/lustre/obdclass/obd_config.c| 34 ++
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c  |  1 +
 4 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h 
b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index 9d6934b..21a48b1 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -179,35 +179,6 @@ static inline void lustre_cfg_bufs_init(struct 
lustre_cfg_bufs *bufs,
}
 }
 
-static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, __u32 index)
-{
-   char *s;
-
-   if (lcfg->lcfg_buflens[index] == 0)
-   return NULL;
-
-   s = lustre_cfg_buf(lcfg, index);
-   if (!s)
-   return NULL;
-
-   /*
-* make sure it's NULL terminated, even if this kills a char
-* of data.  Try to use the padding first though.
-*/
-   if (s[lcfg->lcfg_buflens[index] - 1] != '\0') {
-   size_t last = min((size_t)lcfg->lcfg_buflens[index],
- cfs_size_round(lcfg->lcfg_buflens[index]) - 
1);
-   char lost = s[last];
-
-   s[last] = '\0';
-   if (lost != '\0') {
-   CWARN("Truncated buf %d to '%s' (lost '%c'...)\n",
- index, s, lost);
-   }
-   }
-   return s;
-}
-
 static inline __u32 lustre_cfg_len(__u32 bufcount, __u32 *buflens)
 {
__u32 i;
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h 
b/drivers/staging/lustre/lustre/include/obd_class.h
index 8cc13ea..7d98485 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -107,6 +107,7 @@ typedef int (*llog_cb_t)(const struct lu_env *, struct 
llog_handle *,
 struct llog_rec_hdr *, void *);
 
 /* obd_config.c */
+char *lustre_cfg_string(struct lustre_cfg *lcfg, u32 index);
 int class_process_config(struct lustre_cfg *lcfg);
 int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
 struct lustre_cfg *lcfg, void *data);
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 4c7c4f3..dc7b27e 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -170,6 +170,40 @@ int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char 
**endh)
 }
 EXPORT_SYMBOL(class_parse_nid_quiet);
 
+char *lustre_cfg_string(struct lustre_cfg *lcfg, u32 index)
+{
+   char *s;
+
+   if (!lcfg->lcfg_buflens[index])
+   return NULL;
+
+   s = lustre_cfg_buf(lcfg, index);
+   if (!s)
+   return NULL;
+
+   /*
+* make sure it's NULL terminated, even if this kills a char
+* of data.  Try to use the padding first though.
+*/
+   if (s[lcfg->lcfg_buflens[index] - 1] != '\0') {
+   size_t last = ALIGN(lcfg->lcfg_buflens[index], 8) - 1;
+   char lost;
+
+   /* Use the smaller value */
+   if (last > lcfg->lcfg_buflens[index])
+   last = lcfg->lcfg_buflens[index];
+
+   lost = s[last];
+   s[last] = '\0';
+   if (lost != '\0') {
+   CWARN("Truncated buf %d to '%s' (lost '%c'...)\n",
+ index, s, lost);
+   }
+   }
+   return s;
+}
+EXPORT_SYMBOL(lustre_cfg_string);
+
 /** class fns **/
 
 /**
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c 
b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c
index bb953d4..9143441 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c
@@ -37,6 +37,7 @@
 #include 
 
 #include "../include/obd.h"
+#include "../include/obd_class.h"
 #include "../include/obd_support.h"
 #include "../include/lustre_import.h"
 #include "../../include/uapi/linux/lustre/lustre_param.h"
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org

[PATCH 38/64 v2] staging: lustre: lnet: remove userland function prototype in lnetctl.h

2017-08-19 Thread James Simmons
Several function prototypes of the form jt_ptl_* are only needed
by userland so they can be removed.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman 
Reviewed-by: John L. Hammond 
Reviewed-by: Dmitry Eremin 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/include/uapi/linux/lnet/lnetctl.h   | 41 --
 1 file changed, 41 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
index 2ce1c50..65b2bf8 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
@@ -131,45 +131,4 @@ struct lnet_fault_stat {
 #define SMFS_DEV_MAJOR 10
 #define SMFS_DEV_MINOR 242
 
-int ptl_initialize(int argc, char **argv);
-int jt_ptl_network(int argc, char **argv);
-int jt_ptl_list_nids(int argc, char **argv);
-int jt_ptl_which_nid(int argc, char **argv);
-int jt_ptl_print_interfaces(int argc, char **argv);
-int jt_ptl_add_interface(int argc, char **argv);
-int jt_ptl_del_interface(int argc, char **argv);
-int jt_ptl_print_peers(int argc, char **argv);
-int jt_ptl_add_peer(int argc, char **argv);
-int jt_ptl_del_peer(int argc, char **argv);
-int jt_ptl_print_connections(int argc, char **argv);
-int jt_ptl_disconnect(int argc, char **argv);
-int jt_ptl_push_connection(int argc, char **argv);
-int jt_ptl_print_active_txs(int argc, char **argv);
-int jt_ptl_ping(int argc, char **argv);
-int jt_ptl_mynid(int argc, char **argv);
-int jt_ptl_add_uuid(int argc, char **argv);
-int jt_ptl_add_uuid_old(int argc, char **argv); /* backwards compatibility  */
-int jt_ptl_close_uuid(int argc, char **argv);
-int jt_ptl_del_uuid(int argc, char **argv);
-int jt_ptl_add_route(int argc, char **argv);
-int jt_ptl_del_route(int argc, char **argv);
-int jt_ptl_notify_router(int argc, char **argv);
-int jt_ptl_print_routes(int argc, char **argv);
-int jt_ptl_fail_nid(int argc, char **argv);
-int jt_ptl_lwt(int argc, char **argv);
-int jt_ptl_testprotocompat(int argc, char **argv);
-int jt_ptl_memhog(int argc, char **argv);
-
-int dbg_initialize(int argc, char **argv);
-int jt_dbg_filter(int argc, char **argv);
-int jt_dbg_show(int argc, char **argv);
-int jt_dbg_list(int argc, char **argv);
-int jt_dbg_debug_kernel(int argc, char **argv);
-int jt_dbg_debug_daemon(int argc, char **argv);
-int jt_dbg_debug_file(int argc, char **argv);
-int jt_dbg_clear_debug_buf(int argc, char **argv);
-int jt_dbg_mark_debug_buf(int argc, char **argv);
-int jt_dbg_modules(int argc, char **argv);
-int jt_dbg_panic(int argc, char **argv);
-
 #endif
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 20/64 v2] staging: lustre: uapi: style cleanups for lustre_param.h

2017-08-19 Thread James Simmons
Remove the white space in the lustre_param.h header and
align the code so its easier to read.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans 
Reviewed-by: John L. Hammond 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../include/uapi/linux/lustre/lustre_param.h   | 67 +++---
 1 file changed, 34 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
index cab0056..1eab2ce 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
@@ -44,49 +44,50 @@
 
 /** User-settable parameter keys */
 /* e.g.
-   tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
-   lctl conf_param testfs-OST failover.node=3@elan,192.168.0.3@tcp0
-   ... testfs-MDT.lov.stripesize=4M
-   ... testfs-OST.ost.client_cache_seconds=15
-   ... testfs.sys.timeout=
-   ... testfs.llite.max_read_ahead_mb=16
-*/
+ * tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
+ * lctl conf_param testfs-OST failover.node=3@elan,192.168.0.3@tcp0
+ * ... testfs-MDT.lov.stripesize=4M
+ * ... testfs-OST.ost.client_cache_seconds=15
+ * ... testfs.sys.timeout=
+ * ... testfs.llite.max_read_ahead_mb=16
+ */
 
 /* System global or special params not handled in obd's proc
  * See mgs_write_log_sys()
  */
-#define PARAM_TIMEOUT"timeout="  /* global */
-#define PARAM_LDLM_TIMEOUT  "ldlm_timeout=" /* global */
-#define PARAM_AT_MIN  "at_min="   /* global */
-#define PARAM_AT_MAX  "at_max="   /* global */
-#define PARAM_AT_EXTRA  "at_extra=" /* global */
-#define PARAM_AT_EARLY_MARGIN  "at_early_margin="  /* global */
-#define PARAM_AT_HISTORY  "at_history="   /* global */
-#define PARAM_JOBID_VAR   "jobid_var="/* global */
-#define PARAM_MGSNODE"mgsnode="  /* only at mounttime */
-#define PARAM_FAILNODE  "failover.node="/* add failover nid */
-#define PARAM_FAILMODE  "failover.mode="/* initial mount only */
-#define PARAM_ACTIVE  "active="   /* activate/deactivate */
-#define PARAM_NETWORK"network="  /* bind on nid */
-#define PARAM_ID_UPCALL"identity_upcall="  /* identity upcall 
*/
+#define PARAM_TIMEOUT  "timeout=" /* global */
+#define PARAM_LDLM_TIMEOUT "ldlm_timeout="/* global */
+#define PARAM_AT_MIN   "at_min="  /* global */
+#define PARAM_AT_MAX   "at_max="  /* global */
+#define PARAM_AT_EXTRA "at_extra="/* global */
+#define PARAM_AT_EARLY_MARGIN  "at_early_margin=" /* global */
+#define PARAM_AT_HISTORY   "at_history="  /* global */
+#define PARAM_JOBID_VAR"jobid_var="   /* global */
+#define PARAM_MGSNODE  "mgsnode=" /* only at mounttime */
+#define PARAM_FAILNODE "failover.node="   /* add failover nid */
+#define PARAM_FAILMODE "failover.mode="   /* initial mount only */
+#define PARAM_ACTIVE   "active="  /* activate/deactivate */
+#define PARAM_NETWORK  "network=" /* bind on nid */
+#define PARAM_ID_UPCALL"identity_upcall=" /* identity upcall */
 
 /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) 
*/
-#define PARAM_OST"ost."
+#define PARAM_OST  "ost."
 #define PARAM_OSD  "osd."
-#define PARAM_OSC"osc."
-#define PARAM_MDT"mdt."
-#define PARAM_MDD"mdd."
-#define PARAM_MDC"mdc."
+#define PARAM_OSC  "osc."
+#define PARAM_MDT  "mdt."
+#define PARAM_HSM  "mdt.hsm."
+#define PARAM_MDD  "mdd."
+#define PARAM_MDC  "mdc."
 #define PARAM_LLITE"llite."
-#define PARAM_LOV"lov."
+#define PARAM_LOV  "lov."
 #define PARAM_LOD  "lod."
 #define PARAM_OSP  "osp."
-#define PARAM_SYS"sys."  /* global */
-#define PARAM_SRPC  "srpc."
-#define PARAM_SRPC_FLVR"srpc.flavor."
-#define PARAM_SRPC_UDESC  "srpc.udesc.cli2mdt"
-#define PARAM_SEC"security."
-#define PARAM_QUOTA"quota."/* global */
+#define PARAM_SYS  "sys."  /* global */
+#define PARAM_SRPC 

[PATCH 31/64 v2] staging: lustre: libcfs: remove htonl hack in libcfs.h

2017-08-19 Thread James Simmons
This is really old hack for earlier gcc version that
had a hard time compiling byteorder.h. Lets remove it.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin 
Reviewed-by: Jinshan Xiong 
Reviewed-by: Fan Yong 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index e774c75..005713b 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -154,18 +154,6 @@
 
 
/**/
 
-/* htonl hack - either this, or compile with -O2. Stupid byteorder/generic.h */
-#if defined(__GNUC__) && (__GNUC__ >= 2) && !defined(__OPTIMIZE__)
-#define ___htonl(x) __cpu_to_be32(x)
-#define ___htons(x) __cpu_to_be16(x)
-#define ___ntohl(x) __be32_to_cpu(x)
-#define ___ntohs(x) __be16_to_cpu(x)
-#define htonl(x) ___htonl(x)
-#define ntohl(x) ___ntohl(x)
-#define htons(x) ___htons(x)
-#define ntohs(x) ___ntohs(x)
-#endif
-
 void libcfs_debug_dumplog(void);
 int libcfs_debug_init(unsigned long bufsize);
 int libcfs_debug_cleanup(void);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 30/64 v2] staging: lustre: uapi: label lustre_cfg.h as an uapi header

2017-08-19 Thread James Simmons
Change LUSTRE_CFG_H to _UAPI_LUSTRE_CFG_H_ now that it is
a proper UAPI header.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index 2d37d1b..1533dcb 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -30,8 +30,8 @@
  * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
-#ifndef _LUSTRE_CFG_H
-#define _LUSTRE_CFG_H
+#ifndef _UAPI_LUSTRE_CFG_H_
+#define _UAPI_LUSTRE_CFG_H_
 
 #include 
 #include 
@@ -258,4 +258,4 @@ static inline int lustre_cfg_sanity_check(void *buf, size_t 
len)
 
 /** @} cfg */
 
-#endif /* _LUSTRE_CFG_H */
+#endif /* _UAPI_LUSTRE_CFG_H_ */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 26/64 v2] staging: lustre: uapi: remove need for libcfs.h from lustre_cfg.h

2017-08-19 Thread James Simmons
Several libcfs.h macros are present in lustre_cfg.h, but libcfs.h
is not available so lets replace those macros with real code.
The header libcfs.h also provides errno.h so with libcfs.h gone
include errno.h directly.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index a762aab..a45d167 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -33,6 +33,8 @@
 #ifndef _LUSTRE_CFG_H
 #define _LUSTRE_CFG_H
 
+#include 
+#include 
 #include "../../../../lustre/include/lustre/lustre_user.h"
 
 /** \defgroup cfg cfg
@@ -48,7 +50,7 @@
 #define LUSTRE_CFG_MAX_BUFCOUNT 8
 
 #define LCFG_HDR_SIZE(count) \
-   cfs_size_round(offsetof(struct lustre_cfg, lcfg_buflens[(count)]))
+   __ALIGN_KERNEL(offsetof(struct lustre_cfg, lcfg_buflens[(count)]), 8)
 
 /** If the LCFG_REQUIRED bit is set in a configuration command,
  * then the client is required to understand this parameter
@@ -165,7 +167,7 @@ static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, 
__u32 index)
 
offset = LCFG_HDR_SIZE(lcfg->lcfg_bufcount);
for (i = 0; i < index; i++)
-   offset += cfs_size_round(lcfg->lcfg_buflens[i]);
+   offset += __ALIGN_KERNEL(lcfg->lcfg_buflens[i], 8);
return (char *)lcfg + offset;
 }
 
@@ -188,9 +190,9 @@ static inline __u32 lustre_cfg_len(__u32 bufcount, __u32 
*buflens)
 
len = LCFG_HDR_SIZE(bufcount);
for (i = 0; i < bufcount; i++)
-   len += cfs_size_round(buflens[i]);
+   len += __ALIGN_KERNEL(buflens[i], 8);
 
-   return cfs_size_round(len);
+   return __ALIGN_KERNEL(len, 8);
 }
 
 static inline void lustre_cfg_init(struct lustre_cfg *lcfg, int cmd,
@@ -206,7 +208,10 @@ static inline void lustre_cfg_init(struct lustre_cfg 
*lcfg, int cmd,
ptr = (char *)lcfg + LCFG_HDR_SIZE(lcfg->lcfg_bufcount);
for (i = 0; i < lcfg->lcfg_bufcount; i++) {
lcfg->lcfg_buflens[i] = bufs->lcfg_buflen[i];
-   LOGL((char *)bufs->lcfg_buf[i], bufs->lcfg_buflen[i], ptr);
+   if (bufs->lcfg_buf[i]) {
+   memcpy(ptr, bufs->lcfg_buf[i], bufs->lcfg_buflen[i]);
+   ptr += __ALIGN_KERNEL(bufs->lcfg_buflen[i], 8);
+   }
}
 }
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 33/64 v2] staging: lustre: libcfs: create libcfs_debug.h UAPI header

2017-08-19 Thread James Simmons
Break out the parts from libcfs_debug.h that is used by both user
land and kernel space into a new UAPI header.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin 
Reviewed-by: Olaf Weber 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/include/linux/libcfs/libcfs_debug.h | 104 +-
 .../lustre/include/uapi/linux/lnet/libcfs_debug.h  | 149 +
 2 files changed, 151 insertions(+), 102 deletions(-)
 create mode 100644 
drivers/staging/lustre/include/uapi/linux/lnet/libcfs_debug.h

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index b7bd6e8..91d141d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -38,6 +38,8 @@
 #ifndef __LIBCFS_DEBUG_H__
 #define __LIBCFS_DEBUG_H__
 
+#include "../../uapi/linux/lnet/libcfs_debug.h"
+
 /*
  *  Debugging
  */
@@ -59,108 +61,6 @@
 extern unsigned int libcfs_catastrophe;
 extern unsigned int libcfs_panic_on_lbug;
 
-/**
- * Format for debug message headers
- */
-struct ptldebug_header {
-   __u32 ph_len;
-   __u32 ph_flags;
-   __u32 ph_subsys;
-   __u32 ph_mask;
-   __u16 ph_cpu_id;
-   __u16 ph_type;
-   /* time_t overflow in 2106 */
-   __u32 ph_sec;
-   __u64 ph_usec;
-   __u32 ph_stack;
-   __u32 ph_pid;
-   __u32 ph_extern_pid;
-   __u32 ph_line_num;
-} __packed;
-
-#define PH_FLAG_FIRST_RECORD 1
-
-/* Debugging subsystems (32 bits, non-overlapping) */
-#define S_UNDEFINED0x0001
-#define S_MDC  0x0002
-#define S_MDS  0x0004
-#define S_OSC  0x0008
-#define S_OST  0x0010
-#define S_CLASS0x0020
-#define S_LOG  0x0040
-#define S_LLITE0x0080
-#define S_RPC  0x0100
-#define S_MGMT 0x0200
-#define S_LNET 0x0400
-#define S_LND  0x0800 /* ALL LNDs */
-#define S_PINGER   0x1000
-#define S_FILTER   0x2000
-/* unused */
-#define S_ECHO 0x8000
-#define S_LDLM 0x0001
-#define S_LOV  0x0002
-#define S_LQUOTA   0x0004
-#define S_OSD  0x0008
-#define S_LFSCK0x0010
-/* unused */
-/* unused */
-#define S_LMV  0x0080 /* b_new_cmd */
-/* unused */
-#define S_SEC  0x0200 /* upcall cache */
-#define S_GSS  0x0400 /* b_new_cmd */
-/* unused */
-#define S_MGC  0x1000
-#define S_MGS  0x2000
-#define S_FID  0x4000 /* b_new_cmd */
-#define S_FLD  0x8000 /* b_new_cmd */
-
-#define LIBCFS_DEBUG_SUBSYS_NAMES {\
-   "undefined", "mdc", "mds", "osc", "ost", "class", "log",\
-   "llite", "rpc", "mgmt", "lnet", "lnd", "pinger", "filter", "",  \
-   "echo", "ldlm", "lov", "lquota", "osd", "lfsck", "", "", "lmv", \
-   "", "sec", "gss", "", "mgc", "mgs", "fid", "fld", NULL }
-
-/* Debugging masks (32 bits, non-overlapping) */
-#define D_TRACE0x0001 /* ENTRY/EXIT markers */
-#define D_INODE0x0002
-#define D_SUPER0x0004
-#define D_EXT2 0x0008 /* anything from ext2_debug */
-#define D_MALLOC   0x0010 /* print malloc, free information */
-#define D_CACHE0x0020 /* cache-related items */
-#define D_INFO 0x0040 /* general information */
-#define D_IOCTL0x0080 /* ioctl related information */
-#define D_NETERROR 0x0100 /* network errors */
-#define D_NET  0x0200 /* network communications */
-#define D_WARNING  0x0400 /* CWARN(...) == CDEBUG (D_WARNING, ...) */
-#define D_BUFFS0x0800
-#define D_OTHER0x1000
-#define D_DENTRY   0x2000
-#define D_NETTRACE 0x4000
-#define D_PAGE 0x8000 /* bulk page handling */
-#define D_DLMTRACE 0x0001
-#define D_ERROR0x0002 /* CERROR(...) == CDEBUG (D_ERROR, 
...) */
-#define D_EMERG0x0004 /* CEMERG(...) == CDEBUG (D_EMERG, 
...) */
-#define D_HA   0x0008 /* recovery and failover */
-#define D_RPCTRACE 0x0010 /* for distributed debugging */
-#define D_VFSTRACE 0x0020
-#define D_READA0x0040 /* read-ahead */
-#define D_MMAP 0x0080
-#define D_CONFIG   0x0100
-#define D_CONSOLE  0x0200
-#define D_QUOTA0x0400
-#define D_SEC  0x0800
-#define D_LFSCK0x1000 /* For both OI scrub and LFSCK */
-#define D_HSM

[PATCH 29/64 v2] staging: lustre: uapi: style cleanup of lustre_cfg.h

2017-08-19 Thread James Simmons
Some style and white space cleanups to make lustre_cfg.h
easy to read.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/include/uapi/linux/lustre/lustre_cfg.h  | 110 +++--
 1 file changed, 60 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index 4208d61..2d37d1b 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -57,48 +57,61 @@
  * in order to mount the filesystem. If it does not understand
  * a REQUIRED command the client mount will fail.
  */
-#define LCFG_REQUIRED   0x0001000
+#define LCFG_REQUIRED  0x0001000
 
 enum lcfg_command_type {
-   LCFG_ATTACH  = 0x00cf001, /**< create a new obd instance */
-   LCFG_DETACH  = 0x00cf002, /**< destroy obd instance */
-   LCFG_SETUP= 0x00cf003, /**< call type-specific setup */
-   LCFG_CLEANUP= 0x00cf004, /**< call type-specific cleanup */
-   LCFG_ADD_UUID  = 0x00cf005, /**< add a nid to a niduuid */
-   LCFG_DEL_UUID  = 0x00cf006, /**< remove a nid from a niduuid */
-   LCFG_MOUNTOPT  = 0x00cf007, /**< create a profile (mdc, osc) */
-   LCFG_DEL_MOUNTOPT   = 0x00cf008, /**< destroy a profile */
-   LCFG_SET_TIMEOUT= 0x00cf009, /**< set obd_timeout */
-   LCFG_SET_UPCALL  = 0x00cf00a, /**< deprecated */
-   LCFG_ADD_CONN  = 0x00cf00b, /**< add a failover niduuid to an obd */
-   LCFG_DEL_CONN  = 0x00cf00c, /**< remove a failover niduuid */
-   LCFG_LOV_ADD_OBD= 0x00cf00d, /**< add an osc to a lov */
-   LCFG_LOV_DEL_OBD= 0x00cf00e, /**< remove an osc from a lov */
-   LCFG_PARAM= 0x00cf00f, /**< set a proc parameter */
-   LCFG_MARKER  = 0x00cf010, /**< metadata about next cfg rec */
-   LCFG_LOG_START= 0x00ce011, /**< mgc only, process a cfg log */
-   LCFG_LOG_END= 0x00ce012, /**< stop processing updates */
-   LCFG_LOV_ADD_INA= 0x00ce013, /**< like LOV_ADD_OBD, inactive */
-   LCFG_ADD_MDC= 0x00cf014, /**< add an mdc to a lmv */
-   LCFG_DEL_MDC= 0x00cf015, /**< remove an mdc from a lmv */
-   LCFG_SPTLRPC_CONF   = 0x00ce016, /**< security */
-   LCFG_POOL_NEW  = 0x00ce020, /**< create an ost pool name */
-   LCFG_POOL_ADD  = 0x00ce021, /**< add an ost to a pool */
-   LCFG_POOL_REM  = 0x00ce022, /**< remove an ost from a pool */
-   LCFG_POOL_DEL  = 0x00ce023, /**< destroy an ost pool name */
-   LCFG_SET_LDLM_TIMEOUT   = 0x00ce030, /**< set ldlm_timeout */
-   LCFG_PRE_CLEANUP= 0x00cf031, /**< call type-specific pre
- * cleanup cleanup
- */
-   LCFG_SET_PARAM  = 0x00ce032, /**< use set_param syntax to set
- * a proc parameters
- */
+   LCFG_ATTACH   = 0x00cf001, /**< create a new obd instance */
+   LCFG_DETACH   = 0x00cf002, /**< destroy obd instance */
+   LCFG_SETUP= 0x00cf003, /**< call type-specific setup */
+   LCFG_CLEANUP  = 0x00cf004, /**< call type-specific cleanup
+*/
+   LCFG_ADD_UUID = 0x00cf005, /**< add a nid to a niduuid */
+   LCFG_DEL_UUID = 0x00cf006, /**< remove a nid from
+*  a niduuid
+*/
+   LCFG_MOUNTOPT = 0x00cf007, /**< create a profile
+* (mdc, osc)
+*/
+   LCFG_DEL_MOUNTOPT = 0x00cf008, /**< destroy a profile */
+   LCFG_SET_TIMEOUT  = 0x00cf009, /**< set obd_timeout */
+   LCFG_SET_UPCALL   = 0x00cf00a, /**< deprecated */
+   LCFG_ADD_CONN = 0x00cf00b, /**< add a failover niduuid to
+*  an obd
+*/
+   LCFG_DEL_CONN = 0x00cf00c, /**< remove a failover niduuid */
+   LCFG_LOV_ADD_OBD  = 0x00cf00d, /**< add an osc to a lov */
+   LCFG_LOV_DEL_OBD  = 0x00cf00e, /**< remove an osc from a lov */
+   LCFG_PARAM= 0x00cf00f, /**< set a proc parameter */
+   LCFG_MARKER 

[PATCH 35/64 v2] staging: lustre: lnet: delete lnet.h

2017-08-19 Thread James Simmons
The header lnet.h is just a bunch of headers included in
a header. Just delete it and include the appropriate
headers where needed.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin 
Reviewed-by: Olaf Weber 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   |  4 +-
 drivers/staging/lustre/include/linux/lnet/lnet.h   | 44 --
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h|  1 -
 .../staging/lustre/lnet/klnds/socklnd/socklnd.h|  1 -
 drivers/staging/lustre/lnet/libcfs/module.c|  1 -
 drivers/staging/lustre/lnet/lnet/nidstrings.c  |  2 +-
 drivers/staging/lustre/lnet/selftest/conrpc.h  |  1 -
 drivers/staging/lustre/lnet/selftest/console.h |  1 -
 drivers/staging/lustre/lnet/selftest/selftest.h|  1 -
 9 files changed, 4 insertions(+), 52 deletions(-)
 delete mode 100644 drivers/staging/lustre/include/linux/lnet/lnet.h

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index f534115..9b923ec 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -37,9 +37,11 @@
 
 #include "../libcfs/libcfs.h"
 #include "api.h"
-#include "lnet.h"
 #include "lib-types.h"
 #include "lib-dlc.h"
+#include "types.h"
+#include "lnetctl.h"
+#include "nidstr.h"
 
 extern struct lnet the_lnet;   /* THE network */
 
diff --git a/drivers/staging/lustre/include/linux/lnet/lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lnet.h
deleted file mode 100644
index 5d1559a..000
--- a/drivers/staging/lustre/include/linux/lnet/lnet.h
+++ /dev/null
@@ -1,44 +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) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012 - 2015, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Seagate, Inc.
- */
-
-#ifndef __LNET_H__
-#define __LNET_H__
-
-/*
- * lnet.h
- *
- * User application interface file
- */
-#include "types.h"
-#include "nidstr.h"
-
-#endif
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index 16e437b..8e59506 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -64,7 +64,6 @@
 #define DEBUG_SUBSYSTEM S_LND
 
 #include "../../../include/linux/libcfs/libcfs.h"
-#include "../../../include/linux/lnet/lnet.h"
 #include "../../../include/linux/lnet/lib-lnet.h"
 
 #define IBLND_PEER_HASH_SIZE   101 /* # peer lists */
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
index 9eb169d..88afe09 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
@@ -47,7 +47,6 @@
 #include 
 
 #include "../../../include/linux/libcfs/libcfs.h"
-#include "../../../include/linux/lnet/lnet.h"
 #include "../../../include/linux/lnet/lib-lnet.h"
 #include "../../../include/linux/lnet/socklnd.h"
 
diff --git a/drivers/staging/lustre/lnet/libcfs/module.c 
b/drivers/staging/lustre/lnet/libcfs/module.c
index c388550..9ece869 100644
--- a/drivers/staging/lustre/lnet/libcfs/module.c
+++ b/drivers/staging/lustre/lnet/libcfs/module.c
@@ -56,7 +56,6 @@
 #include "../../include/linux/libcfs/libcfs_crypto.h"
 #include "../../include/linux/lnet/lib-lnet.h"
 #include "../../include/linux/lnet/lib-dlc.h"
-#include "../../include/linux/lnet/lnet.h"
 #include "tracefile.h"
 
 static struct dentry *lnet_debugfs_root;
diff --git a/drivers/staging/lustre/lnet/lnet/nidstrings.c 
b/drivers/staging/lustre/lnet/lnet/nidstrings.c
index 298533d..cbbd11f 100644
--- a/drivers/staging/lustre/lnet/lnet/nidstrings.c
+++ 

[PATCH 24/64 v2] staging: lustre: obdclass: no need to check for kfree

2017-08-19 Thread James Simmons
In class_config_llog_handler() a flag, inst, was used to
determine if it was safe to call kfree. Its not needed so
remove the flag.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index dc7b27e..32ffa25 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1142,7 +1142,7 @@ int class_config_llog_handler(const struct lu_env *env,
char *inst_name = NULL;
int inst_len = 0;
size_t lcfg_len;
-   int inst = 0, swab = 0;
+   int swab = 0;
 
lcfg = (struct lustre_cfg *)cfg_buf;
if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION)) {
@@ -1233,7 +1233,6 @@ int class_config_llog_handler(const struct lu_env *env,
 
if (clli && clli->cfg_instance &&
LUSTRE_CFG_BUFLEN(lcfg, 0) > 0) {
-   inst = 1;
inst_len = LUSTRE_CFG_BUFLEN(lcfg, 0) +
   sizeof(clli->cfg_instance) * 2 + 4;
inst_name = kasprintf(GFP_NOFS, "%s-%p",
@@ -1304,9 +1303,7 @@ int class_config_llog_handler(const struct lu_env *env,
 
rc = class_process_config(lcfg_new);
kfree(lcfg_new);
-
-   if (inst)
-   kfree(inst_name);
+   kfree(inst_name);
break;
}
default:
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 37/64 v2] staging: lustre: libcfs: sort headers in libcfs.h

2017-08-19 Thread James Simmons
Move all the included headers in libcfs.h to the top of the
file.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin 
Reviewed-by: Olaf Weber 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/linux/libcfs/libcfs.h   | 26 ++
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 71bb55e..3a5ebc2 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -33,9 +33,20 @@
 #ifndef __LIBCFS_LIBCFS_H__
 #define __LIBCFS_LIBCFS_H__
 
-#include "linux/libcfs.h"
 #include 
+#include 
 
+#include "../../uapi/linux/lnet/libcfs_ioctl.h"
+#include "linux/libcfs.h"
+#include "libcfs_debug.h"
+#include "libcfs_private.h"
+#include "libcfs_cpu.h"
+#include "libcfs_prim.h"
+#include "libcfs_time.h"
+#include "libcfs_string.h"
+#include "libcfs_workitem.h"
+#include "libcfs_hash.h"
+#include "libcfs_fail.h"
 #include "curproc.h"
 
 #define LIBCFS_VERSION "0.7.0"
@@ -49,8 +60,6 @@
 #define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \
   ((hexnum) >> 8 & 0xf))
 
-#include 
-
 /* need both kernel and user-land acceptor */
 #define LNET_ACCEPTOR_MIN_RESERVED_PORT512
 #define LNET_ACCEPTOR_MAX_RESERVED_PORT1023
@@ -74,17 +83,6 @@
 void cfs_srand(unsigned int seed1, unsigned int seed2);
 void cfs_get_random_bytes(void *buf, int size);
 
-#include "libcfs_debug.h"
-#include "libcfs_cpu.h"
-#include "libcfs_private.h"
-#include "../../uapi/linux/lnet/libcfs_ioctl.h"
-#include "libcfs_prim.h"
-#include "libcfs_time.h"
-#include "libcfs_string.h"
-#include "libcfs_workitem.h"
-#include "libcfs_hash.h"
-#include "libcfs_fail.h"
-
 struct libcfs_ioctl_handler {
struct list_head item;
int (*handle_ioctl)(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 32/64 v2] staging: lustre: libcfs: remove LOGL and LOGU macros

2017-08-19 Thread James Simmons
The macro LOGU is not used anymore and LOGL is used in
one place. No reason to keep LOGL around anymore.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin 
Reviewed-by: Jinshan Xiong 
Reviewed-by: Fan Yong 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/linux/libcfs/libcfs_private.h   | 14 --
 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c|  4 +++-
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 005713b..709771d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -296,18 +296,4 @@ static inline size_t cfs_round_strlen(char *fset)
return cfs_size_round((int)strlen(fset) + 1);
 }
 
-#define LOGL(var, len, ptr)   \
-do {   \
-   if (var)\
-   memcpy((char *)ptr, (const char *)var, len);\
-   ptr += cfs_size_round(len);  \
-} while (0)
-
-#define LOGU(var, len, ptr)   \
-do {   \
-   if (var)\
-   memcpy((char *)var, (const char *)ptr, len);\
-   ptr += cfs_size_round(len);  \
-} while (0)
-
 #endif
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c 
b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index 55e8696e..f116995 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -186,7 +186,9 @@ void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int 
count, __u32 *lens,
for (i = 0; i < count; i++) {
char *tmp = bufs[i];
 
-   LOGL(tmp, lens[i], ptr);
+   if (tmp)
+   memcpy(ptr, tmp, lens[i]);
+   ptr += cfs_size_round(lens[i]);
}
 }
 EXPORT_SYMBOL(lustre_init_msg_v2);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 36/64 v2] staging: lustre: lnet: migrate headers to lnet uapi directory

2017-08-19 Thread James Simmons
Migrate the headers used by user land and kernel space to the
libcfs/lnet uapi directory.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin 
Reviewed-by: Olaf Weber 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs.h  | 2 +-
 drivers/staging/lustre/include/linux/lnet/api.h   | 2 +-
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h  | 8 
 drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++--
 drivers/staging/lustre/include/linux/lnet/socklnd.h   | 2 +-
 .../include/{linux/libcfs => uapi/linux/lnet}/libcfs_ioctl.h  | 0
 .../include/{linux/lnet/lib-dlc.h => uapi/linux/lnet/lnet-dlc.h}  | 4 ++--
 .../include/{linux/lnet/types.h => uapi/linux/lnet/lnet-types.h}  | 0
 drivers/staging/lustre/include/{ => uapi}/linux/lnet/lnetctl.h| 2 +-
 drivers/staging/lustre/include/{ => uapi}/linux/lnet/lnetst.h | 0
 drivers/staging/lustre/include/{ => uapi}/linux/lnet/nidstr.h | 2 +-
 drivers/staging/lustre/lnet/libcfs/module.c   | 2 +-
 drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +-
 drivers/staging/lustre/lnet/lnet/module.c | 2 +-
 drivers/staging/lustre/lnet/lnet/net_fault.c  | 2 +-
 drivers/staging/lustre/lnet/lnet/nidstrings.c | 2 +-
 drivers/staging/lustre/lnet/lnet/peer.c   | 2 +-
 drivers/staging/lustre/lnet/selftest/conctl.c | 2 +-
 drivers/staging/lustre/lnet/selftest/conrpc.h | 2 +-
 drivers/staging/lustre/lnet/selftest/console.h| 2 +-
 drivers/staging/lustre/lnet/selftest/rpc.h| 2 +-
 drivers/staging/lustre/lnet/selftest/selftest.h   | 2 +-
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 3 +--
 drivers/staging/lustre/lustre/include/lustre_disk.h   | 1 -
 drivers/staging/lustre/lustre/include/lustre_net.h| 2 +-
 drivers/staging/lustre/lustre/obdclass/class_obd.c| 2 +-
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c   | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/service.c| 2 +-
 28 files changed, 29 insertions(+), 31 deletions(-)
 rename drivers/staging/lustre/include/{linux/libcfs => 
uapi/linux/lnet}/libcfs_ioctl.h (100%)
 rename drivers/staging/lustre/include/{linux/lnet/lib-dlc.h => 
uapi/linux/lnet/lnet-dlc.h} (98%)
 rename drivers/staging/lustre/include/{linux/lnet/types.h => 
uapi/linux/lnet/lnet-types.h} (100%)
 rename drivers/staging/lustre/include/{ => uapi}/linux/lnet/lnetctl.h (99%)
 rename drivers/staging/lustre/include/{ => uapi}/linux/lnet/lnetst.h (100%)
 rename drivers/staging/lustre/include/{ => uapi}/linux/lnet/nidstr.h (99%)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index cc2c0e9..71bb55e 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -77,7 +77,7 @@
 #include "libcfs_debug.h"
 #include "libcfs_cpu.h"
 #include "libcfs_private.h"
-#include "libcfs_ioctl.h"
+#include "../../uapi/linux/lnet/libcfs_ioctl.h"
 #include "libcfs_prim.h"
 #include "libcfs_time.h"
 #include "libcfs_string.h"
diff --git a/drivers/staging/lustre/include/linux/lnet/api.h 
b/drivers/staging/lustre/include/linux/lnet/api.h
index f4b6de2..01ae62e 100644
--- a/drivers/staging/lustre/include/linux/lnet/api.h
+++ b/drivers/staging/lustre/include/linux/lnet/api.h
@@ -44,7 +44,7 @@
  * @{
  */
 
-#include "../lnet/types.h"
+#include "../../uapi/linux/lnet/lnet-types.h"
 
 /** \defgroup lnet_init_fini Initialization and cleanup
  * The LNet must be properly initialized before any LNet calls can be made.
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 9b923ec..bc55d57 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -38,10 +38,10 @@
 #include "../libcfs/libcfs.h"
 #include "api.h"
 #include "lib-types.h"
-#include "lib-dlc.h"
-#include "types.h"
-#include "lnetctl.h"
-#include "nidstr.h"
+#include "../../uapi/linux/lnet/lnet-dlc.h"
+#include "../../uapi/linux/lnet/lnet-types.h"
+#include "../../uapi/linux/lnet/lnetctl.h"
+#include "../../uapi/linux/lnet/nidstr.h"
 
 extern struct lnet the_lnet;   /* THE network */
 
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h 
b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index ddb808e..94d3a53 100644
--- 

[PATCH 34/64 v2] staging: lustre: socklnd: create socklnd.h UAPI header

2017-08-19 Thread James Simmons
Break out the parts from libcfs_debug.h that is used by both user
land and kernel space into a new UAPI header.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/28089
Reviewed-by: Dmitry Eremin 
Reviewed-by: Olaf Weber 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/linux/lnet/socklnd.h| 10 +
 .../lustre/include/uapi/linux/lnet/socklnd.h   | 44 ++
 2 files changed, 45 insertions(+), 9 deletions(-)
 create mode 100644 drivers/staging/lustre/include/uapi/linux/lnet/socklnd.h

diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h 
b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index a1ae66e..27ce6ce 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -35,15 +35,7 @@
 #define __LNET_LNET_SOCKLND_H__
 
 #include "types.h"
-
-#define SOCKLND_CONN_NONE (-1)
-#define SOCKLND_CONN_ANY   0
-#define SOCKLND_CONN_CONTROL   1
-#define SOCKLND_CONN_BULK_IN   2
-#define SOCKLND_CONN_BULK_OUT  3
-#define SOCKLND_CONN_NTYPES4
-
-#define SOCKLND_CONN_ACK   SOCKLND_CONN_BULK_IN
+#include "../../uapi/linux/lnet/socklnd.h"
 
 struct ksock_hello_msg {
__u32   kshm_magic; /* magic number of socklnd message */
diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/socklnd.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/socklnd.h
new file mode 100644
index 000..6453e05
--- /dev/null
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/socklnd.h
@@ -0,0 +1,44 @@
+/*
+ * 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) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * #defines shared between socknal implementation and utilities
+ */
+#ifndef __UAPI_LNET_SOCKLND_H__
+#define __UAPI_LNET_SOCKLND_H__
+
+#define SOCKLND_CONN_NONE (-1)
+#define SOCKLND_CONN_ANY   0
+#define SOCKLND_CONN_CONTROL   1
+#define SOCKLND_CONN_BULK_IN   2
+#define SOCKLND_CONN_BULK_OUT  3
+#define SOCKLND_CONN_NTYPES4
+
+#define SOCKLND_CONN_ACK   SOCKLND_CONN_BULK_IN
+
+#endif
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 39/64 v2] staging: lustre: lnet: remove BIT macro from lnetctl.h

2017-08-19 Thread James Simmons
Now that lnetctl.h is a UAPI header the BIT macro has to be
removed.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
index 65b2bf8..f7ffc53 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
@@ -32,10 +32,10 @@ enum {
LNET_CTL_DELAY_LIST,
 };
 
-#define LNET_ACK_BIT   BIT(0)
-#define LNET_PUT_BIT   BIT(1)
-#define LNET_GET_BIT   BIT(2)
-#define LNET_REPLY_BIT BIT(3)
+#define LNET_ACK_BIT   (1 << 0)
+#define LNET_PUT_BIT   (1 << 1)
+#define LNET_GET_BIT   (1 << 2)
+#define LNET_REPLY_BIT (1 << 3)
 
 /** ioctl parameter for LNet fault simulation */
 struct lnet_fault_attr {
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 25/64 v2] staging: lustre: uapi: move lustre_cfg.h to uapi directory

2017-08-19 Thread James Simmons
Move lustre_cfg.h to its proper place. Adjust additonal headers
included in lustre_cfg.h.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../{lustre/include => include/uapi/linux/lustre}/lustre_cfg.h  | 6 ++
 drivers/staging/lustre/lustre/include/lprocfs_status.h  | 2 +-
 drivers/staging/lustre/lustre/include/lustre_lib.h  | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)
 rename drivers/staging/lustre/{lustre/include => 
include/uapi/linux/lustre}/lustre_cfg.h (99%)

diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
similarity index 99%
rename from drivers/staging/lustre/lustre/include/lustre_cfg.h
rename to drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
index 21a48b1..a762aab 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h
@@ -33,6 +33,8 @@
 #ifndef _LUSTRE_CFG_H
 #define _LUSTRE_CFG_H
 
+#include "../../../../lustre/include/lustre/lustre_user.h"
+
 /** \defgroup cfg cfg
  *
  * @{
@@ -191,8 +193,6 @@ static inline __u32 lustre_cfg_len(__u32 bufcount, __u32 
*buflens)
return cfs_size_round(len);
 }
 
-#include "obd_support.h"
-
 static inline void lustre_cfg_init(struct lustre_cfg *lcfg, int cmd,
   struct lustre_cfg_bufs *bufs)
 {
@@ -238,8 +238,6 @@ static inline int lustre_cfg_sanity_check(void *buf, size_t 
len)
return 0;
 }
 
-#include "lustre/lustre_user.h"
-
 /** @} cfg */
 
 #endif /* _LUSTRE_CFG_H */
diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h 
b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index 9054d37..694062a 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -44,7 +44,7 @@
 #include 
 
 #include "../../include/linux/libcfs/libcfs.h"
-#include "lustre_cfg.h"
+#include "../../include/uapi/linux/lustre/lustre_cfg.h"
 #include "lustre/lustre_idl.h"
 
 struct lprocfs_vars {
diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h 
b/drivers/staging/lustre/lustre/include/lustre_lib.h
index f24970d..c68dd5d 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lib.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lib.h
@@ -48,7 +48,7 @@
 #include "../../include/linux/libcfs/libcfs.h"
 #include "lustre/lustre_idl.h"
 #include "lustre_ver.h"
-#include "lustre_cfg.h"
+#include "../../include/uapi/linux/lustre/lustre_cfg.h"
 
 /* target.c */
 struct ptlrpc_request;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/64 v2] staging: lustre: uapi: remove userland version of obd_ioctl_*()

2017-08-19 Thread James Simmons
The header lustre_ioctl.h has both kernel and user space versions
of obd_ioctl_*() functions. Lets remove the user land version
which have been integrated into the lustre tools.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/lustre/include/lustre/lustre_ioctl.h| 87 --
 1 file changed, 87 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
index eb08df3..84654af 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
@@ -208,8 +208,6 @@ static inline int obd_ioctl_is_invalid(struct 
obd_ioctl_data *data)
return 0;
 }
 
-#ifdef __KERNEL__
-
 int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
 int obd_ioctl_popdata(void __user *arg, void *data, int len);
 
@@ -218,91 +216,6 @@ static inline void obd_ioctl_freedata(char *buf, size_t 
len)
kvfree(buf);
 }
 
-#else /* __KERNEL__ */
-
-static inline int obd_ioctl_pack(struct obd_ioctl_data *data, char **pbuf,
-int max_len)
-{
-   char *ptr;
-   struct obd_ioctl_data *overlay;
-
-   data->ioc_len = obd_ioctl_packlen(data);
-   data->ioc_version = OBD_IOCTL_VERSION;
-
-   if (*pbuf && data->ioc_len > max_len) {
-   fprintf(stderr, "pbuf = %p, ioc_len = %u, max_len = %d\n",
-   *pbuf, data->ioc_len, max_len);
-   return -EINVAL;
-   }
-
-   if (!*pbuf)
-   *pbuf = malloc(data->ioc_len);
-
-   if (!*pbuf)
-   return -ENOMEM;
-
-   overlay = (struct obd_ioctl_data *)*pbuf;
-   memcpy(*pbuf, data, sizeof(*data));
-
-   ptr = overlay->ioc_bulk;
-   if (data->ioc_inlbuf1)
-   LOGL(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
-
-   if (data->ioc_inlbuf2)
-   LOGL(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
-
-   if (data->ioc_inlbuf3)
-   LOGL(data->ioc_inlbuf3, data->ioc_inllen3, ptr);
-
-   if (data->ioc_inlbuf4)
-   LOGL(data->ioc_inlbuf4, data->ioc_inllen4, ptr);
-
-   if (obd_ioctl_is_invalid(overlay)) {
-   fprintf(stderr, "invalid ioctl data: ioc_len = %u, max_len = 
%d\n",
-   data->ioc_len, max_len);
-   return -EINVAL;
-   }
-
-   return 0;
-}
-
-static inline int
-obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, int max_len)
-{
-   char *ptr;
-   struct obd_ioctl_data *overlay;
-
-   if (!pbuf)
-   return 1;
-
-   overlay = (struct obd_ioctl_data *)pbuf;
-
-   /* Preserve the caller's buffer pointers */
-   overlay->ioc_inlbuf1 = data->ioc_inlbuf1;
-   overlay->ioc_inlbuf2 = data->ioc_inlbuf2;
-   overlay->ioc_inlbuf3 = data->ioc_inlbuf3;
-   overlay->ioc_inlbuf4 = data->ioc_inlbuf4;
-
-   memcpy(data, pbuf, sizeof(*data));
-
-   ptr = overlay->ioc_bulk;
-   if (data->ioc_inlbuf1)
-   LOGU(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
-
-   if (data->ioc_inlbuf2)
-   LOGU(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
-
-   if (data->ioc_inlbuf3)
-   LOGU(data->ioc_inlbuf3, data->ioc_inllen3, ptr);
-
-   if (data->ioc_inlbuf4)
-   LOGU(data->ioc_inlbuf4, data->ioc_inllen4, ptr);
-
-   return 0;
-}
-
-#endif /* !__KERNEL__ */
-
 /*
  * OBD_IOC_DATA_TYPE is only for compatibility reasons with older
  * Linux Lustre user tools. New ioctls should NOT use this macro as
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/64 v2] staging: lustre: uapi: move obd_ioctl_is_invalid() to linux-module.c

2017-08-19 Thread James Simmons
The inline function obd_ioctl_is_invalid() is no longer needed by
userland and also the function was pretty bug for a inline function.
Since this is the case we can move this kernel only code to the
linux-module.c which is the only place it is used.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/lustre/include/lustre/lustre_ioctl.h| 76 --
 .../lustre/lustre/obdclass/linux/linux-module.c| 76 ++
 2 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
index 914cea1..8585302 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
@@ -132,82 +132,6 @@ static inline __u32 obd_ioctl_packlen(struct 
obd_ioctl_data *data)
return len;
 }
 
-static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data)
-{
-   if (data->ioc_len > (1 << 30)) {
-   CERROR("OBD ioctl: ioc_len larger than 1<<30\n");
-   return 1;
-   }
-
-   if (data->ioc_inllen1 > (1 << 30)) {
-   CERROR("OBD ioctl: ioc_inllen1 larger than 1<<30\n");
-   return 1;
-   }
-
-   if (data->ioc_inllen2 > (1 << 30)) {
-   CERROR("OBD ioctl: ioc_inllen2 larger than 1<<30\n");
-   return 1;
-   }
-
-   if (data->ioc_inllen3 > (1 << 30)) {
-   CERROR("OBD ioctl: ioc_inllen3 larger than 1<<30\n");
-   return 1;
-   }
-
-   if (data->ioc_inllen4 > (1 << 30)) {
-   CERROR("OBD ioctl: ioc_inllen4 larger than 1<<30\n");
-   return 1;
-   }
-
-   if (data->ioc_inlbuf1 && !data->ioc_inllen1) {
-   CERROR("OBD ioctl: inlbuf1 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (data->ioc_inlbuf2 && !data->ioc_inllen2) {
-   CERROR("OBD ioctl: inlbuf2 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (data->ioc_inlbuf3 && !data->ioc_inllen3) {
-   CERROR("OBD ioctl: inlbuf3 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (data->ioc_inlbuf4 && !data->ioc_inllen4) {
-   CERROR("OBD ioctl: inlbuf4 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (data->ioc_pbuf1 && !data->ioc_plen1) {
-   CERROR("OBD ioctl: pbuf1 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (data->ioc_pbuf2 && !data->ioc_plen2) {
-   CERROR("OBD ioctl: pbuf2 pointer but 0 length\n");
-   return 1;
-   }
-
-   if (!data->ioc_pbuf1 && data->ioc_plen1) {
-   CERROR("OBD ioctl: plen1 set but NULL pointer\n");
-   return 1;
-   }
-
-   if (!data->ioc_pbuf2 && data->ioc_plen2) {
-   CERROR("OBD ioctl: plen2 set but NULL pointer\n");
-   return 1;
-   }
-
-   if (obd_ioctl_packlen(data) > data->ioc_len) {
-   CERROR("OBD ioctl: packlen exceeds ioc_len (%d > %d)\n",
-  obd_ioctl_packlen(data), data->ioc_len);
-   return 1;
-   }
-
-   return 0;
-}
-
 /*
  * OBD_IOC_DATA_TYPE is only for compatibility reasons with older
  * Linux Lustre user tools. New ioctls should NOT use this macro as
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c 
b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 3a394d2..092e68a 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -68,6 +68,82 @@
 #include "../../include/lustre/lustre_ioctl.h"
 #include "../../include/lustre_ver.h"
 
+static int obd_ioctl_is_invalid(struct obd_ioctl_data *data)
+{
+   if (data->ioc_len > BIT(30)) {
+   CERROR("OBD ioctl: ioc_len larger than 1<<30\n");
+   return 1;
+   }
+
+   if (data->ioc_inllen1 > BIT(30)) {
+   CERROR("OBD ioctl: ioc_inllen1 larger than 1<<30\n");
+   return 1;
+   }
+
+   if (data->ioc_inllen2 > BIT(30)) {
+   CERROR("OBD ioctl: ioc_inllen2 larger than 1<<30\n");
+   return 1;
+   }
+
+   if (data->ioc_inllen3 > BIT(30)) {
+   CERROR("OBD ioctl: ioc_inllen3 larger than 1<<30\n");
+   return 1;
+   }
+
+   if (data->ioc_inllen4 > BIT(30)) {
+   CERROR("OBD ioctl: ioc_inllen4 larger than 1<<30\n");
+   return 1;
+   }
+
+   if (data->ioc_inlbuf1 && data->ioc_inllen1 

[PATCH 15/64 v2] staging: lustre: uapi: label lustre_ioctl.h as a UAPI header

2017-08-19 Thread James Simmons
Change LUSTRE_IOCTL_H_ to _UAPI_LUSTRE_IOCTL_H_ now that is
a proper UAPI header

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index fb87a8b..c2c0b27 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -25,8 +25,8 @@
  *
  * Copyright (c) 2011, 2015, Intel Corporation.
  */
-#ifndef LUSTRE_IOCTL_H_
-#define LUSTRE_IOCTL_H_
+#ifndef _UAPI_LUSTRE_IOCTL_H_
+#define _UAPI_LUSTRE_IOCTL_H_
 
 #include 
 #include 
@@ -229,4 +229,4 @@ static inline __u32 obd_ioctl_packlen(struct obd_ioctl_data 
*data)
 
 #define IOC_OSC_SET_ACTIVE _IOWR('h', 21, void *)
 
-#endif /* LUSTRE_IOCTL_H_ */
+#endif /* _UAPI_LUSTRE_IOCTL_H_ */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [staging:staging-testing 306/323] drivers/staging/lustre/lustre/ptlrpc/errno.c:29:44: fatal error: ../include/lustre/lustre_errno.h: No such file or directory

2017-08-19 Thread James Simmons

> On Sat, Aug 19, 2017 at 02:50:48AM +0100, James Simmons wrote:
> > 
> > > On Fri, Aug 18, 2017 at 03:53:56PM -0700, Greg Kroah-Hartman wrote:
> > > > On Sat, Aug 19, 2017 at 02:49:02AM +0800, kbuild test robot wrote:
> > > > > tree:   
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
> > > > > staging-testing
> > > > > head:   4d64b24f1fd892842e4502c0ff9c0e6b8144efa0
> > > > > commit: 1c4e5aa23a78c16ac15966a7704fa8a6201be095 [306/323] staging: 
> > > > > lustre: uapi: migrate remaining uapi headers to uapi directory
> > > > 
> > > > Ugh.  Let me drop this one, and another uapi one as well from the tree,
> > > > hopefully that should fix the build issues...
> > > 
> > > What a mess, am dropping all of the uapi patches now, please fix them up
> > > and resend.
> > >
> > 
> > No reason to drop them all. Its just a one line fix. I will send right 
> > away.
> 
> They are now all dropped, sorry, please send a fixed up patch series
> that does not break the build at any point in it.

Done. I also updated the patches as [PACTH XX/64 v2] as you requested in 
the other email. Strange that kbuild didn't see this before the patches 
landed and that the build breakage was only on one platform. I tested it
ever which way possible to make sure its right. One question is how do
I run header checker on these UAPI header since they are not in the 
usually UAPI header path yet.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/64 v2] staging: lustre: uapi: remove included headers out of lustre_param.h

2017-08-19 Thread James Simmons
All the included headers in lustre_param.h are lustre kernel
internal headers and they are not even needed. Just remove them.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans 
Reviewed-by: John L. Hammond 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_param.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_param.h 
b/drivers/staging/lustre/lustre/include/lustre_param.h
index 2620e02..f6f4752 100644
--- a/drivers/staging/lustre/lustre/include/lustre_param.h
+++ b/drivers/staging/lustre/lustre/include/lustre_param.h
@@ -39,9 +39,6 @@
 #ifndef _LUSTRE_PARAM_H
 #define _LUSTRE_PARAM_H
 
-#include "../../include/linux/libcfs/libcfs.h"
-#include "../../include/linux/lnet/types.h"
-
 /** \defgroup param param
  *
  * @{
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/64 v2] staging: lustre: uapi: move lustre_ioctl.h to uapi directory

2017-08-19 Thread James Simmons
Move the header lustre_ioctl.h to proper uapi directory.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../{lustre/include => include/uapi/linux}/lustre/lustre_ioctl.h | 5 ++---
 drivers/staging/lustre/lustre/llite/dir.c| 2 +-
 drivers/staging/lustre/lustre/llite/file.c   | 2 +-
 drivers/staging/lustre/lustre/llite/llite_lib.c  | 2 +-
 drivers/staging/lustre/lustre/lmv/lmv_obd.c  | 2 +-
 drivers/staging/lustre/lustre/lov/lov_obd.c  | 2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c  | 2 +-
 drivers/staging/lustre/lustre/obdclass/class_obd.c   | 2 +-
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c  | 2 +-
 drivers/staging/lustre/lustre/obdclass/obd_config.c  | 2 +-
 drivers/staging/lustre/lustre/obdecho/echo_client.c  | 2 +-
 drivers/staging/lustre/lustre/osc/osc_request.c  | 2 +-
 12 files changed, 13 insertions(+), 14 deletions(-)
 rename drivers/staging/lustre/{lustre/include => 
include/uapi/linux}/lustre/lustre_ioctl.h (98%)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
similarity index 98%
rename from drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
rename to drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index 8585302..880dd92 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -29,13 +29,12 @@
 #define LUSTRE_IOCTL_H_
 
 #include 
-#include "../../../include/linux/libcfs/libcfs.h"
-#include "lustre_idl.h"
+#include "../../../linux/libcfs/libcfs.h"
+#include "../../../../lustre/include/lustre/lustre_idl.h"
 
 #ifdef __KERNEL__
 # include 
 # include 
-# include "../obd_support.h"
 #else /* __KERNEL__ */
 # include 
 # include 
diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
b/drivers/staging/lustre/lustre/llite/dir.c
index dd592d9..4b46271 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -46,7 +46,7 @@
 
 #include "../include/obd_support.h"
 #include "../include/obd_class.h"
-#include "../include/lustre/lustre_ioctl.h"
+#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../include/lustre_lib.h"
 #include "../include/lustre_dlm.h"
 #include "../include/lustre_fid.h"
diff --git a/drivers/staging/lustre/lustre/llite/file.c 
b/drivers/staging/lustre/lustre/llite/file.c
index 215479a..71d1878 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -43,7 +43,7 @@
 #include 
 #include 
 #include "../include/lustre/ll_fiemap.h"
-#include "../include/lustre/lustre_ioctl.h"
+#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../include/lustre_swab.h"
 
 #include "../include/cl_object.h"
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c 
b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 451e4fa..e7d5228 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -41,7 +41,7 @@
 #include 
 #include 
 
-#include "../include/lustre/lustre_ioctl.h"
+#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../include/lustre_ha.h"
 #include "../include/lustre_dlm.h"
 #include "../include/lprocfs_status.h"
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c 
b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index 1c9ff24..ab77dbe 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -49,7 +49,7 @@
 #include "../include/lprocfs_status.h"
 #include "../include/cl_object.h"
 #include "../include/lustre_fid.h"
-#include "../include/lustre/lustre_ioctl.h"
+#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../include/lustre_kernelcomm.h"
 #include "lmv_internal.h"
 
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c 
b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 8871624..8777d4b 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -41,7 +41,7 @@
 #include "../../include/linux/libcfs/libcfs.h"
 
 #include "../include/lustre/lustre_idl.h"
-#include "../include/lustre/lustre_ioctl.h"
+#include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 
 #include "../include/cl_object.h"
 #include "../include/lustre_dlm.h"
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c 

[PATCH 13/64 v2] staging: lustre: uapi: use __ALIGN_KERNEL for lustre_ioctl.h

2017-08-19 Thread James Simmons
Replace cfs_size_round() standard __ALIGN_KERNEL macro. This
removes the dependency of libcfs.h which is a kernel only
header.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h  | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index 880dd92..a7e2fc4 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -28,8 +28,8 @@
 #ifndef LUSTRE_IOCTL_H_
 #define LUSTRE_IOCTL_H_
 
+#include 
 #include 
-#include "../../../linux/libcfs/libcfs.h"
 #include "../../../../lustre/include/lustre/lustre_idl.h"
 
 #ifdef __KERNEL__
@@ -121,12 +121,12 @@ struct obd_ioctl_hdr {
 
 static inline __u32 obd_ioctl_packlen(struct obd_ioctl_data *data)
 {
-   __u32 len = cfs_size_round(sizeof(*data));
+   __u32 len = __ALIGN_KERNEL(sizeof(*data), 8);
 
-   len += cfs_size_round(data->ioc_inllen1);
-   len += cfs_size_round(data->ioc_inllen2);
-   len += cfs_size_round(data->ioc_inllen3);
-   len += cfs_size_round(data->ioc_inllen4);
+   len += __ALIGN_KERNEL(data->ioc_inllen1, 8);
+   len += __ALIGN_KERNEL(data->ioc_inllen2, 8);
+   len += __ALIGN_KERNEL(data->ioc_inllen3, 8);
+   len += __ALIGN_KERNEL(data->ioc_inllen4, 8);
 
return len;
 }
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/64 v2] staging: lustre: uapi: remove obd_ioctl_freedata() wrapper

2017-08-19 Thread James Simmons
Replace obd_ioctl_freedata() with direct kvfree() call.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h | 5 -
 drivers/staging/lustre/lustre/llite/dir.c   | 6 +++---
 drivers/staging/lustre/lustre/llite/llite_lib.c | 3 +--
 drivers/staging/lustre/lustre/lov/lov_obd.c | 8 
 drivers/staging/lustre/lustre/obdclass/class_obd.c  | 3 +--
 5 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
index 84654af..7a61a00 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
@@ -211,11 +211,6 @@ static inline int obd_ioctl_is_invalid(struct 
obd_ioctl_data *data)
 int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
 int obd_ioctl_popdata(void __user *arg, void *data, int len);
 
-static inline void obd_ioctl_freedata(char *buf, size_t len)
-{
-   kvfree(buf);
-}
-
 /*
  * OBD_IOC_DATA_TYPE is only for compatibility reasons with older
  * Linux Lustre user tools. New ioctls should NOT use this macro as
diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
b/drivers/staging/lustre/lustre/llite/dir.c
index 03a72c0..dd592d9 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1097,7 +1097,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
goto out_free;
}
 out_free:
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return rc;
}
case LL_IOC_LMV_SETSTRIPE: {
@@ -1147,7 +1147,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
 #endif
rc = ll_dir_setdirstripe(inode, lum, filename, mode);
 lmv_out_free:
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return rc;
}
case LL_IOC_LMV_SET_DEFAULT_STRIPE: {
@@ -1626,7 +1626,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
 
rc = ll_migrate(inode, file, mdtidx, filename, namelen - 1);
 migrate_free:
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
 
return rc;
}
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c 
b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 5c8405c..451e4fa 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -2231,8 +2231,7 @@ int ll_obd_statfs(struct inode *inode, void __user *arg)
if (rc)
goto out_statfs;
 out_statfs:
-   if (buf)
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return rc;
 }
 
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c 
b/drivers/staging/lustre/lustre/lov/lov_obd.c
index f27b11f..8871624 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -1087,17 +1087,17 @@ static int lov_iocontrol(unsigned int cmd, struct 
obd_export *exp, int len,
data = (struct obd_ioctl_data *)buf;
 
if (sizeof(*desc) > data->ioc_inllen1) {
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return -EINVAL;
}
 
if (sizeof(uuidp->uuid) * count > data->ioc_inllen2) {
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return -EINVAL;
}
 
if (sizeof(__u32) * count > data->ioc_inllen3) {
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
return -EINVAL;
}
 
@@ -1116,7 +1116,7 @@ static int lov_iocontrol(unsigned int cmd, struct 
obd_export *exp, int len,
 
if (copy_to_user(uarg, buf, len))
rc = -EFAULT;
-   obd_ioctl_freedata(buf, len);
+   kvfree(buf);
break;
}
case OBD_IOC_QUOTACTL: {
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 76e1ee8..8cc1fdc 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -369,8 +369,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)

[PATCH 05/64 v2] staging: lustre: uapi: move lu_fid, ost_id funcs out of lustre_idl.h

2017-08-19 Thread James Simmons
From: Ben Evans 

Move lu_fid functions into lustre/lustre_fid.h
Move ost_id functions into lustre/lustre_ostid.h
Fix indenting, include new headers as needed.

Several inline functions in the header lustre_ostid.h
are using debug macros instead of returning proper errors.
Remove the debug macros and properly handle the returned
error codes. Place both UAPI headers lustre_fid.h and
lustre_ostid.h into the uapi directory.

Signed-off-by: Ben Evans 
Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons 
Reviewed-by: Frank Zago 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/include/uapi/linux/lustre/lustre_fid.h  | 293 +++
 .../include/uapi/linux/lustre/lustre_ostid.h   | 237 +
 .../lustre/lustre/include/lustre/lustre_idl.h  | 541 +
 drivers/staging/lustre/lustre/include/lustre_fid.h |  49 +-
 drivers/staging/lustre/lustre/include/lustre_fld.h |   1 +
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |   2 +
 drivers/staging/lustre/lustre/mdc/mdc_request.c|   2 +
 7 files changed, 587 insertions(+), 538 deletions(-)
 create mode 100644 
drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
 create mode 100644 
drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
new file mode 100644
index 000..9adc106
--- /dev/null
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h
@@ -0,0 +1,293 @@
+/*
+ * 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2014, Intel Corporation.
+ *
+ * Copyright 2016 Cray Inc, all rights reserved.
+ * Author: Ben Evans.
+ *
+ * all fid manipulation functions go here
+ *
+ * FIDS are globally unique within a Lustre filessytem, and are made up
+ * of three parts: sequence, Object ID, and version.
+ *
+ */
+#ifndef _UAPI_LUSTRE_FID_H_
+#define _UAPI_LUSTRE_FID_H_
+
+#include "../../../../lustre/include/lustre/lustre_idl.h"
+
+/** returns fid object sequence */
+static inline __u64 fid_seq(const struct lu_fid *fid)
+{
+   return fid->f_seq;
+}
+
+/** returns fid object id */
+static inline __u32 fid_oid(const struct lu_fid *fid)
+{
+   return fid->f_oid;
+}
+
+/** returns fid object version */
+static inline __u32 fid_ver(const struct lu_fid *fid)
+{
+   return fid->f_ver;
+}
+
+static inline void fid_zero(struct lu_fid *fid)
+{
+   memset(fid, 0, sizeof(*fid));
+}
+
+static inline __u64 fid_ver_oid(const struct lu_fid *fid)
+{
+   return (__u64)fid_ver(fid) << 32 | fid_oid(fid);
+}
+
+static inline bool fid_seq_is_mdt0(__u64 seq)
+{
+   return seq == FID_SEQ_OST_MDT0;
+}
+
+static inline bool fid_seq_is_mdt(__u64 seq)
+{
+   return seq == FID_SEQ_OST_MDT0 || seq >= FID_SEQ_NORMAL;
+};
+
+static inline bool fid_seq_is_echo(__u64 seq)
+{
+   return seq == FID_SEQ_ECHO;
+}
+
+static inline bool fid_is_echo(const struct lu_fid *fid)
+{
+   return fid_seq_is_echo(fid_seq(fid));
+}
+
+static inline bool fid_seq_is_llog(__u64 seq)
+{
+   return seq == FID_SEQ_LLOG;
+}
+
+static inline bool fid_is_llog(const struct lu_fid *fid)
+{
+   /* file with OID == 0 is not llog but contains last oid */
+   return fid_seq_is_llog(fid_seq(fid)) && fid_oid(fid) > 0;
+}
+
+static inline bool fid_seq_is_rsvd(__u64 seq)
+{
+   return seq > FID_SEQ_OST_MDT0 && seq <= FID_SEQ_RSVD;
+};
+
+static inline bool fid_seq_is_special(__u64 seq)
+{
+   return seq == FID_SEQ_SPECIAL;
+};
+
+static inline bool fid_seq_is_local_file(__u64 seq)
+{
+   return seq == FID_SEQ_LOCAL_FILE ||
+  seq == FID_SEQ_LOCAL_NAME;
+};
+
+static inline bool fid_seq_is_root(__u64 seq)
+{
+   return seq == FID_SEQ_ROOT;
+}
+

[PATCH 03/64 v2] staging: lustre: uapi: return error code for ostid_set_id

2017-08-19 Thread James Simmons
From: Ben Evans 

Currently the function ostid_set_id() just logs an error
and just keeps going. This function is also used by user
land tools so having special lustre kernel debugging
code is not desired. So instead just return an error
code and have the calling kernel code print the error
instead.

Signed-off-by: Ben Evans 
Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons 
Reviewed-by: Frank Zago 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/lustre/include/lustre/lustre_idl.h  | 23 --
 .../staging/lustre/lustre/obdecho/echo_client.c|  7 +--
 drivers/staging/lustre/lustre/osc/osc_object.c |  9 -
 3 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 1e8ecdf..d70495d 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -515,32 +515,25 @@ static inline void ostid_set_seq_llog(struct ost_id *oi)
  * Note: we need check oi_seq to decide where to set oi_id,
  * so oi_seq should always be set ahead of oi_id.
  */
-static inline void ostid_set_id(struct ost_id *oi, __u64 oid)
+static inline int ostid_set_id(struct ost_id *oi, __u64 oid)
 {
if (fid_seq_is_mdt0(oi->oi.oi_seq)) {
-   if (oid >= IDIF_MAX_OID) {
-   CERROR("Too large OID %#llx to set MDT0 " DOSTID "\n",
-  oid, POSTID(oi));
-   return;
-   }
+   if (oid >= IDIF_MAX_OID)
+   return -E2BIG;
oi->oi.oi_id = oid;
} else if (fid_is_idif(>oi_fid)) {
-   if (oid >= IDIF_MAX_OID) {
-   CERROR("Too large OID %#llx to set IDIF " DOSTID "\n",
-  oid, POSTID(oi));
-   return;
-   }
+   if (oid >= IDIF_MAX_OID)
+   return -E2BIG;
oi->oi_fid.f_seq = fid_idif_seq(oid,
fid_idif_ost_idx(>oi_fid));
oi->oi_fid.f_oid = oid;
oi->oi_fid.f_ver = oid >> 48;
} else {
-   if (oid >= OBIF_MAX_OID) {
-   CERROR("Bad %llu to set " DOSTID "\n", oid, POSTID(oi));
-   return;
-   }
+   if (oid >= OBIF_MAX_OID)
+   return -E2BIG;
oi->oi_fid.f_oid = oid;
}
+   return 0;
 }
 
 static inline int fid_set_id(struct lu_fid *fid, __u64 oid)
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c 
b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index b3fbc3c..363d205 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -1102,8 +1102,11 @@ static int echo_create_object(const struct lu_env *env, 
struct echo_device *ed,
return -EINVAL;
}
 
-   if (!ostid_id(>o_oi))
-   ostid_set_id(>o_oi, ++last_object_id);
+   if (!ostid_id(>o_oi)) {
+   rc = ostid_set_id(>o_oi, ++last_object_id);
+   if (rc)
+   goto failed;
+   }
 
rc = obd_create(env, ec->ec_exp, oa);
if (rc != 0) {
diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c 
b/drivers/staging/lustre/lustre/osc/osc_object.c
index fa621bd..945ae6e 100644
--- a/drivers/staging/lustre/lustre/osc/osc_object.c
+++ b/drivers/staging/lustre/lustre/osc/osc_object.c
@@ -369,7 +369,14 @@ static void osc_req_attr_set(const struct lu_env *env, 
struct cl_object *obj,
oa->o_valid |= OBD_MD_FLGROUP;
}
if (flags & OBD_MD_FLID) {
-   ostid_set_id(>o_oi, ostid_id(>loi_oi));
+   int rc;
+
+   rc = ostid_set_id(>o_oi, ostid_id(>loi_oi));
+   if (rc) {
+   CERROR("Bad %llu to set " DOSTID " : rc %d\n",
+  (unsigned long long)ostid_id(>loi_oi),
+  POSTID(>o_oi), rc);
+   }
oa->o_valid |= OBD_MD_FLID;
}
if (flags & OBD_MD_FLHANDLE) {
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/64 v2] staging: lustre: uapi: update URL doc link in lustre_fid.h

2017-08-19 Thread James Simmons
From: Ben Evans 

The wiki has been revived so update the URL about the FID
design in lustre_fid.h.

Signed-off-by: Ben Evans 
Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/22712
Reviewed-on: https://review.whamcloud.com/24569
Reviewed-by: James Simmons 
Reviewed-by: Frank Zago 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h 
b/drivers/staging/lustre/lustre/include/lustre_fid.h
index 681f698..0446bec 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -41,7 +41,7 @@
  *
  * @{
  *
- * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
+ * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  * describes the FID namespace and interoperability requirements for FIDs.
  * The important parts of that document are included here for reference.
  *
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/64 v2] staging: lustre: uapi: remove unused function in lustre_disk.h

2017-08-19 Thread James Simmons
Delete code that is used by only the server or just in user
land. Now this file is a normal kernel header. The UAPI
version of this header is only needed for server side so
no need to create a new header in uapi directory.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/25194
Reviewed-by: Dmitry Eremin 
Reviewed-by: John L. Hammond 
Reviewed-by: Lai Siyao 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_disk.h | 18 --
 1 file changed, 18 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h 
b/drivers/staging/lustre/lustre/include/lustre_disk.h
index a676bcc..1a532ad 100644
--- a/drivers/staging/lustre/lustre/include/lustre_disk.h
+++ b/drivers/staging/lustre/lustre/include/lustre_disk.h
@@ -108,14 +108,6 @@ struct lustre_mount_data {
 
 #define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
 
-/** last_rcvd file */
-
-/** version recovery epoch */
-#define LR_EPOCH_BITS   32
-#define lr_epoch(a) ((a) >> LR_EPOCH_BITS)
-#define LR_EXPIRE_INTERVALS 16 /**< number of intervals to track transno */
-#define ENOENT_VERSION 1 /** 'virtual' version of non-existent object */
-
 /** superblock additional info */
 
 struct ll_sb_info;
@@ -141,16 +133,6 @@ struct lustre_sb_info {
 #define s2lsi_nocast(sb) ((sb)->s_fs_info)
 
 #define get_profile_name(sb)   (s2lsi(sb)->lsi_lmd->lmd_profile)
-#defineget_mount_flags(sb)(s2lsi(sb)->lsi_lmd->lmd_flags)
-#defineget_mntdev_name(sb)(s2lsi(sb)->lsi_lmd->lmd_dev)
-
-/** mount lookup info */
-
-struct lustre_mount_info {
-   char *lmi_name;
-   struct super_block   *lmi_sb;
-   struct list_headlmi_list_chain;
-};
 
 /** prototypes */
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/64 v2] staging: lustre: uapi: remove obd_ioctl_popdata() wrapper

2017-08-19 Thread James Simmons
Replace obd_ioctl_popdata() with direct copy_to_user() call.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/lustre/include/lustre/lustre_ioctl.h|  1 -
 drivers/staging/lustre/lustre/obdclass/class_obd.c | 18 +++---
 .../lustre/lustre/obdclass/linux/linux-module.c|  8 
 3 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
index 7a61a00..da9a071 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
@@ -209,7 +209,6 @@ static inline int obd_ioctl_is_invalid(struct 
obd_ioctl_data *data)
 }
 
 int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
-int obd_ioctl_popdata(void __user *arg, void *data, int len);
 
 /*
  * OBD_IOC_DATA_TYPE is only for compatibility reasons with older
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 8cc1fdc..477d611 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -206,8 +206,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
memcpy(data->ioc_bulk, LUSTRE_VERSION_STRING,
   strlen(LUSTRE_VERSION_STRING) + 1);
 
-   err = obd_ioctl_popdata((void __user *)arg, data, len);
-   if (err)
+   if (copy_to_user((void __user *)arg, data, len))
err = -EFAULT;
goto out;
 
@@ -225,9 +224,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
goto out;
}
 
-   err = obd_ioctl_popdata((void __user *)arg, data,
-   sizeof(*data));
-   if (err)
+   if (copy_to_user((void __user *)arg, data, sizeof(*data)))
err = -EFAULT;
goto out;
}
@@ -263,8 +260,8 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
 
CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
   dev);
-   err = obd_ioctl_popdata((void __user *)arg, data,
-   sizeof(*data));
+
+   if (copy_to_user((void __user *)arg, data, sizeof(*data)))
if (err)
err = -EFAULT;
goto out;
@@ -304,9 +301,9 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
 (int)index, status, obd->obd_type->typ_name,
 obd->obd_name, obd->obd_uuid.uuid,
 atomic_read(>obd_refcount));
-   err = obd_ioctl_popdata((void __user *)arg, data, len);
 
-   err = 0;
+   if (copy_to_user((void __user *)arg, data, len))
+   err = -EFAULT;
goto out;
}
}
@@ -361,8 +358,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
if (err)
goto out;
 
-   err = obd_ioctl_popdata((void __user *)arg, data, len);
-   if (err)
+   if (copy_to_user((void __user *)arg, data, len))
err = -EFAULT;
goto out;
}
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c 
b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index eb88bd9..3a394d2 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -151,14 +151,6 @@ int obd_ioctl_getdata(char **buf, int *len, void __user 
*arg)
 }
 EXPORT_SYMBOL(obd_ioctl_getdata);
 
-int obd_ioctl_popdata(void __user *arg, void *data, int len)
-{
-   int err;
-
-   err = copy_to_user(arg, data, len) ? -EFAULT : 0;
-   return err;
-}
-
 /*  opening /dev/obd */
 static int obd_class_open(struct inode *inode, struct file *file)
 {
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 22/64 v2] staging: lustre: uapi: don't memory allocate in UAPI header

2017-08-19 Thread James Simmons
The inline function lustre_cfg_new() calls kzalloc() but
this is a UAPI header. Remove kzalloc() and rename the
function to lustre_cfg_init(). The lustre kernel code
that was calling lustre_cfg_new() can doing the memory
allocation and pass the new buffer to lustre_cfg_init()
to fill in.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_cfg.h | 11 ++
 drivers/staging/lustre/lustre/mgc/mgc_request.c|  9 +---
 .../staging/lustre/lustre/obdclass/obd_config.c| 17 +++
 drivers/staging/lustre/lustre/obdclass/obd_mount.c | 24 ++
 4 files changed, 41 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h 
b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index 3f280b5..9d6934b 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -222,18 +222,12 @@ static inline __u32 lustre_cfg_len(__u32 bufcount, __u32 
*buflens)
 
 #include "obd_support.h"
 
-static inline struct lustre_cfg *lustre_cfg_new(int cmd,
-   struct lustre_cfg_bufs *bufs)
+static inline void lustre_cfg_init(struct lustre_cfg *lcfg, int cmd,
+  struct lustre_cfg_bufs *bufs)
 {
-   struct lustre_cfg *lcfg;
char *ptr;
int i;
 
-   lcfg = kzalloc(lustre_cfg_len(bufs->lcfg_bufcount, bufs->lcfg_buflen),
-  GFP_NOFS);
-   if (!lcfg)
-   return ERR_PTR(-ENOMEM);
-
lcfg->lcfg_version = LUSTRE_CFG_VERSION;
lcfg->lcfg_command = cmd;
lcfg->lcfg_bufcount = bufs->lcfg_bufcount;
@@ -243,7 +237,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
lcfg->lcfg_buflens[i] = bufs->lcfg_buflen[i];
LOGL((char *)bufs->lcfg_buf[i], bufs->lcfg_buflen[i], ptr);
}
-   return lcfg;
 }
 
 static inline int lustre_cfg_sanity_check(void *buf, size_t len)
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c 
b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 192b24d..d344b01 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -1155,6 +1155,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
char *cname;
char *params;
char *uuid;
+   size_t len;
 
rc = -EINVAL;
if (datalen < sizeof(*entry))
@@ -1283,11 +1284,13 @@ static int mgc_apply_recover_logs(struct obd_device 
*mgc,
lustre_cfg_bufs_set_string(, 1, params);
 
rc = -ENOMEM;
-   lcfg = lustre_cfg_new(LCFG_PARAM, );
-   if (IS_ERR(lcfg)) {
-   CERROR("mgc: cannot allocate memory\n");
+   len = lustre_cfg_len(bufs.lcfg_bufcount, bufs.lcfg_buflen);
+   lcfg = kzalloc(len, GFP_NOFS);
+   if (!lcfg) {
+   rc = -ENOMEM;
break;
}
+   lustre_cfg_init(lcfg, LCFG_PARAM, );
 
CDEBUG(D_INFO, "ir apply logs %lld/%lld for %s -> %s\n",
   prev_version, max_version, obdname, params);
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 4b5cd7d..4c7c4f3 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1107,6 +1107,7 @@ int class_config_llog_handler(const struct lu_env *env,
struct lustre_cfg_bufs bufs;
char *inst_name = NULL;
int inst_len = 0;
+   size_t lcfg_len;
int inst = 0, swab = 0;
 
lcfg = (struct lustre_cfg *)cfg_buf;
@@ -1238,8 +1239,14 @@ int class_config_llog_handler(const struct lu_env *env,
   clli->cfg_obdname);
}
 
-   lcfg_new = lustre_cfg_new(lcfg->lcfg_command, );
+   lcfg_len = lustre_cfg_len(bufs.lcfg_bufcount, bufs.lcfg_buflen);
+   lcfg_new = kzalloc(lcfg_len, GFP_NOFS);
+   if (!lcfg_new) {
+   rc = -ENOMEM;
+   goto out;
+   }
 
+   lustre_cfg_init(lcfg_new, lcfg->lcfg_command, );
lcfg_new->lcfg_num   = lcfg->lcfg_num;
lcfg_new->lcfg_flags = lcfg->lcfg_flags;
 
@@ -1426,9 +1433,11 @@ int class_manual_cleanup(struct obd_device *obd)
 
lustre_cfg_bufs_reset(, 

[PATCH 21/64 v2] staging: lustre: uapi: remove lustre_cfg_free wrapper

2017-08-19 Thread James Simmons
Replace all lustre_cfg_free() calls with direct kfree()
call.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966
Reviewed-by: Quentin Bouget 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_cfg.h  | 6 --
 drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++--
 drivers/staging/lustre/lustre/obdclass/obd_mount.c  | 6 +++---
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h 
b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index 8eb394e..3f280b5 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -246,12 +246,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
return lcfg;
 }
 
-static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
-{
-   kfree(lcfg);
-   return;
-}
-
 static inline int lustre_cfg_sanity_check(void *buf, size_t len)
 {
struct lustre_cfg *lcfg = (struct lustre_cfg *)buf;
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c 
b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 36c3049..192b24d 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -1293,7 +1293,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
   prev_version, max_version, obdname, params);
 
rc = class_process_config(lcfg);
-   lustre_cfg_free(lcfg);
+   kfree(lcfg);
if (rc)
CDEBUG(D_INFO, "process config for %s error %d\n",
   obdname, rc);
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 783f9e0..4b5cd7d 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1262,7 +1262,7 @@ int class_config_llog_handler(const struct lu_env *env,
lcfg_new->lcfg_nal = 0; /* illegal value for obsolete field */
 
rc = class_process_config(lcfg_new);
-   lustre_cfg_free(lcfg_new);
+   kfree(lcfg_new);
 
if (inst)
kfree(inst_name);
@@ -1442,7 +1442,7 @@ int class_manual_cleanup(struct obd_device *obd)
if (rc)
CERROR("detach failed %d: %s\n", rc, obd->obd_name);
 out:
-   lustre_cfg_free(lcfg);
+   kfree(lcfg);
return rc;
 }
 EXPORT_SYMBOL(class_manual_cleanup);
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c 
b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
index 555e67e..74de1fa 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
@@ -90,7 +90,7 @@ int lustre_process_log(struct super_block *sb, char *logname,
lustre_cfg_bufs_set(bufs, 3, , sizeof(sb));
lcfg = lustre_cfg_new(LCFG_LOG_START, bufs);
rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
-   lustre_cfg_free(lcfg);
+   kfree(lcfg);
 
kfree(bufs);
 
@@ -128,7 +128,7 @@ int lustre_end_log(struct super_block *sb, char *logname,
lustre_cfg_bufs_set(, 2, cfg, sizeof(*cfg));
lcfg = lustre_cfg_new(LCFG_LOG_END, );
rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
-   lustre_cfg_free(lcfg);
+   kfree(lcfg);
return rc;
 }
 EXPORT_SYMBOL(lustre_end_log);
@@ -161,7 +161,7 @@ static int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
lcfg = lustre_cfg_new(cmd, );
lcfg->lcfg_nid = nid;
rc = class_process_config(lcfg);
-   lustre_cfg_free(lcfg);
+   kfree(lcfg);
return rc;
 }
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/64 v2] staging: lustre: uapi: move kernel only prototypes out of lustre_param.h

2017-08-19 Thread James Simmons
Move all the kernel specific function prototypes from
lustre_param.h into obd_config.h which is a kernel only
header.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans 
Reviewed-by: John L. Hammond 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_param.h | 11 ---
 drivers/staging/lustre/lustre/include/obd_class.h| 18 ++
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_param.h 
b/drivers/staging/lustre/lustre/include/lustre_param.h
index 8061a04..2620e02 100644
--- a/drivers/staging/lustre/lustre/include/lustre_param.h
+++ b/drivers/staging/lustre/lustre/include/lustre_param.h
@@ -47,17 +47,6 @@
  * @{
  */
 
-/* For interoperability */
-struct cfg_interop_param {
-   char *old_param;
-   char *new_param;
-};
-
-/* obd_config.c */
-int class_find_param(char *buf, char *key, char **valp);
-int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
-int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh);
-
 /** User-settable parameter keys */
 /* e.g.
tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h 
b/drivers/staging/lustre/lustre/include/obd_class.h
index d4a632a..8cc13ea 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -105,10 +105,28 @@ void obd_put_mod_rpc_slot(struct client_obd *cli, u32 opc,
 struct llog_rec_hdr;
 typedef int (*llog_cb_t)(const struct lu_env *, struct llog_handle *,
 struct llog_rec_hdr *, void *);
+
 /* obd_config.c */
 int class_process_config(struct lustre_cfg *lcfg);
 int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
 struct lustre_cfg *lcfg, void *data);
+
+/* For interoperability */
+struct cfg_interop_param {
+   char *old_param;
+   char *new_param;
+};
+
+int class_find_param(char *buf, char *key, char **valp);
+struct cfg_interop_param *class_find_old_param(const char *param,
+  struct cfg_interop_param *ptr);
+int class_get_next_param(char **params, char *copy);
+int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
+int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh);
+int class_parse_net(char *buf, u32 *net, char **endh);
+int class_match_nid(char *buf, char *key, lnet_nid_t nid);
+int class_match_net(char *buf, char *key, u32 net);
+
 struct obd_device *class_incref(struct obd_device *obd,
const char *scope, const void *source);
 void class_decref(struct obd_device *obd,
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 18/64 v2] staging: lustre: uapi: move lustre_param.h to uapi directory

2017-08-19 Thread James Simmons
Move the header lustre_param.h to proper uapi directory.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans 
Reviewed-by: John L. Hammond 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../lustre/{lustre/include => include/uapi/linux/lustre}/lustre_param.h | 0
 drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +-
 drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/obd_mount.c  | 2 +-
 drivers/staging/lustre/lustre/osc/osc_request.c | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c   | 2 +-
 8 files changed, 7 insertions(+), 7 deletions(-)
 rename drivers/staging/lustre/{lustre/include => 
include/uapi/linux/lustre}/lustre_param.h (100%)

diff --git a/drivers/staging/lustre/lustre/include/lustre_param.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
similarity index 100%
rename from drivers/staging/lustre/lustre/include/lustre_param.h
rename to drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c 
b/drivers/staging/lustre/lustre/llite/llite_lib.c
index e7d5228..3ab3a63 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -46,7 +46,7 @@
 #include "../include/lustre_dlm.h"
 #include "../include/lprocfs_status.h"
 #include "../include/lustre_disk.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 #include "../include/lustre_log.h"
 #include "../include/cl_object.h"
 #include "../include/obd_cksum.h"
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c 
b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 8777d4b..475bf7e 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -49,7 +49,7 @@
 #include "../include/lustre_lib.h"
 #include "../include/lustre_mds.h"
 #include "../include/lustre_net.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 #include "../include/lustre_swab.h"
 #include "../include/lprocfs_status.h"
 #include "../include/obd_class.h"
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c 
b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 93fb195..4dcf3902 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -49,7 +49,7 @@
 #include "../include/lustre_kernelcomm.h"
 #include "../include/lustre_lmv.h"
 #include "../include/lustre_log.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 #include "../include/lustre_swab.h"
 #include "../include/obd_class.h"
 
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 2a93d67..783f9e0 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -42,7 +42,7 @@
 #include "../include/llog_swab.h"
 #include "../include/lprocfs_status.h"
 #include "../include/lustre_log.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 #include "../include/obd_class.h"
 
 #include "llog_internal.h"
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c 
b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
index 8e0d4b1..555e67e 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
@@ -46,7 +46,7 @@
 #include "../include/lustre/lustre_user.h"
 #include "../include/lustre_log.h"
 #include "../include/lustre_disk.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 
 static int (*client_fill_super)(struct super_block *sb,
struct vfsmount *mnt);
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c 
b/drivers/staging/lustre/lustre/osc/osc_request.c
index e103d5a..453a59a 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -44,7 +44,7 @@
 #include "../../include/uapi/linux/lustre/lustre_ioctl.h"
 #include "../include/lustre_debug.h"
 #include "../include/lustre_obdo.h"
-#include "../include/lustre_param.h"
+#include "../../include/uapi/linux/lustre/lustre_param.h"
 #include "../include/lustre_fid.h"
 #include "../include/obd_class.h"
 #include "../include/obd.h"
diff --git 

[PATCH 01/64 v2] staging: lustre: uapi: Move functions out of lustre_idl.h

2017-08-19 Thread James Simmons
From: Ben Evans 

Migrate functions set/get_mrc_cr_flags, ldlm_res_eq
ldlm_extent_overlap, ldlm_extent_contain,
ldlm_request_bufsize, and all the PTLRPC dump_*
functions out of lustre_idl.h which is a UAPI header
to the places in the kernel code they are actually used.
Delete unused lmv_mds_md_stripe_count and
agent_req_in_final_state.

Signed-off-by: Ben Evans 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: http://review.whamcloud.com/21484
Reviewed-by: Frank Zago 
Reviewed-by: James Simmons 
Reviewed-by: Andreas Dilger 
Reviewed-by: John L. Hammond 
Signed-off-by: James Simmons 
---
 .../lustre/lustre/include/lustre/lustre_idl.h  | 73 --
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 13 
 .../staging/lustre/lustre/include/lustre_swab.h|  6 ++
 drivers/staging/lustre/lustre/ldlm/ldlm_internal.h |  6 ++
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  | 27 
 drivers/staging/lustre/lustre/mdc/mdc_lib.c|  6 ++
 6 files changed, 58 insertions(+), 73 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 1db1ab8..1e8ecdf 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2130,17 +2130,6 @@ struct mdt_rec_create {
__u32  cr_padding_4;   /* rr_padding_4 */
 };
 
-static inline void set_mrc_cr_flags(struct mdt_rec_create *mrc, __u64 flags)
-{
-   mrc->cr_flags_l = (__u32)(flags & 0xUll);
-   mrc->cr_flags_h = (__u32)(flags >> 32);
-}
-
-static inline __u64 get_mrc_cr_flags(struct mdt_rec_create *mrc)
-{
-   return ((__u64)(mrc->cr_flags_l) | ((__u64)mrc->cr_flags_h << 32));
-}
-
 /* instance of mdt_reint_rec */
 struct mdt_rec_link {
__u32  lk_opcode;
@@ -2403,25 +2392,6 @@ static inline int lmv_mds_md_stripe_count_get(const 
union lmv_mds_md *lmm)
}
 }
 
-static inline int lmv_mds_md_stripe_count_set(union lmv_mds_md *lmm,
- unsigned int stripe_count)
-{
-   int rc = 0;
-
-   switch (le32_to_cpu(lmm->lmv_magic)) {
-   case LMV_MAGIC_V1:
-   lmm->lmv_md_v1.lmv_stripe_count = cpu_to_le32(stripe_count);
-   break;
-   case LMV_USER_MAGIC:
-   lmm->lmv_user_md.lum_stripe_count = cpu_to_le32(stripe_count);
-   break;
-   default:
-   rc = -EINVAL;
-   break;
-   }
-   return rc;
-}
-
 enum fld_rpc_opc {
FLD_QUERY   = 900,
FLD_READ= 901,
@@ -2502,12 +2472,6 @@ struct ldlm_res_id {
 #define PLDLMRES(res)  (res)->lr_name.name[0], (res)->lr_name.name[1], \
(res)->lr_name.name[2], (res)->lr_name.name[3]
 
-static inline bool ldlm_res_eq(const struct ldlm_res_id *res0,
-  const struct ldlm_res_id *res1)
-{
-   return !memcmp(res0, res1, sizeof(*res0));
-}
-
 /* lock types */
 enum ldlm_mode {
LCK_MINMODE = 0,
@@ -2540,19 +2504,6 @@ struct ldlm_extent {
__u64 gid;
 };
 
-static inline int ldlm_extent_overlap(const struct ldlm_extent *ex1,
- const struct ldlm_extent *ex2)
-{
-   return (ex1->start <= ex2->end) && (ex2->start <= ex1->end);
-}
-
-/* check if @ex1 contains @ex2 */
-static inline int ldlm_extent_contain(const struct ldlm_extent *ex1,
- const struct ldlm_extent *ex2)
-{
-   return (ex1->start <= ex2->start) && (ex1->end >= ex2->end);
-}
-
 struct ldlm_inodebits {
__u64 bits;
 };
@@ -2627,18 +2578,6 @@ struct ldlm_request {
struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES];
 };
 
-/* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available.
- * Otherwise, 2 are available.
- */
-#define ldlm_request_bufsize(count, type)  \
-({   \
-   int _avail = LDLM_LOCKREQ_HANDLES;\
-   _avail -= (type == LDLM_ENQUEUE ? LDLM_ENQUEUE_CANCEL_OFF : 0); \
-   sizeof(struct ldlm_request) +  \
-   (count > _avail ? count - _avail : 0) *  \
-   sizeof(struct lustre_handle);  \
-})
-
 struct ldlm_reply {
__u32 lock_flags;
__u32 lock_padding; /* also fix lustre_swab_ldlm_reply */
@@ -2942,12 +2881,6 @@ static inline const char *agent_req_status2name(const 
enum agent_req_status ars)
}
 }
 
-static inline bool agent_req_in_final_state(enum agent_req_status ars)
-{
-   return ((ars == ARS_SUCCEED) || (ars == ARS_FAILED) ||
-   (ars == ARS_CANCELED));
-}
-
 struct llog_agent_req_rec {

[PATCH 10/64 v2] staging: lustre: uapi: move obd_ioctl_getdata() declaration

2017-08-19 Thread James Simmons
Move obd_ioctl_getdata() from lustre_ioctl.h to obd_class.h
since this function is only used by kernel space.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h | 2 --
 drivers/staging/lustre/lustre/include/obd_class.h   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
index da9a071..914cea1 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h
@@ -208,8 +208,6 @@ static inline int obd_ioctl_is_invalid(struct 
obd_ioctl_data *data)
return 0;
 }
 
-int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
-
 /*
  * OBD_IOC_DATA_TYPE is only for compatibility reasons with older
  * Linux Lustre user tools. New ioctls should NOT use this macro as
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h 
b/drivers/staging/lustre/lustre/include/obd_class.h
index a6a4b2f..d4a632a 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -1559,4 +1559,7 @@ struct root_squash_info {
struct rw_semaphore rsi_sem;
 };
 
+/* linux-module.c */
+int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
+
 #endif /* __LINUX_OBD_CLASS_H */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/64 v2] staging: lustre: uapi: normalize the lustre headers

2017-08-19 Thread James Simmons
The headers for lustre/LNet for a long time lacked a clean separation in
its internal headers which resulted in kernel specific data structures
being exposed in user land code. This work unravels this mess and creates
a clear separation between lustre kernel space and lustre user land.
With this work done the include paths in the lustre kernel code can now
be normalized. This is the second version of the patch series which
includes a fix to include lustre_errno.h in the header lustre_net.h.
For some reason this only showed up on ia64 platforms but should be
resolved now. Second change was to add errno.h into lustre_ostid.h.
It is needed to handle the error codes returned for both user land
and kernel space.

Ben Evans (4):
  staging: lustre: uapi: Move functions out of lustre_idl.h
  staging: lustre: uapi: return error code for ostid_set_id
  staging: lustre: uapi: update URL doc link in lustre_fid.h
  staging: lustre: uapi: move lu_fid, ost_id funcs out of lustre_idl.h

James Simmons (60):
  staging: lustre: uapi: remove unused functions for lustre_fid.h
  staging: lustre: uapi: remove unused function in lustre_disk.h
  staging: lustre: uapi: remove userland version of obd_ioctl_*()
  staging: lustre: uapi: remove obd_ioctl_freedata() wrapper
  staging: lustre: uapi: remove obd_ioctl_popdata() wrapper
  staging: lustre: uapi: move obd_ioctl_getdata() declaration
  staging: lustre: uapi: move obd_ioctl_is_invalid() to linux-module.c
  staging: lustre: uapi: move lustre_ioctl.h to uapi directory
  staging: lustre: uapi: use __ALIGN_KERNEL for lustre_ioctl.h
  staging: lustre: uapi: cleanup headers for lustre_ioctl.h
  staging: lustre: uapi: label lustre_ioctl.h as a UAPI header
  staging: lustre: uapi: move kernel only prototypes out of lustre_param.h
  staging: lustre: uapi: remove included headers out of lustre_param.h
  staging: lustre: uapi: move lustre_param.h to uapi directory
  staging: lustre: uapi: label lustre_param.h as an uapi header
  staging: lustre: uapi: style cleanups for lustre_param.h
  staging: lustre: uapi: remove lustre_cfg_free wrapper
  staging: lustre: uapi: don't memory allocate in UAPI header
  staging: lustre: uapi: move lustre_cfg_string() to obd_config.c
  staging: lustre: obdclass: no need to check for kfree
  staging: lustre: uapi: move lustre_cfg.h to uapi directory
  staging: lustre: uapi: remove need for libcfs.h from lustre_cfg.h
  staging: lustre: uapi: change variable type to match
  staging: lustre: uapi: check if argument for lustre_cfg_buf() is NULL
  staging: lustre: uapi: style cleanup of lustre_cfg.h
  staging: lustre: uapi: label lustre_cfg.h as an uapi header
  staging: lustre: libcfs: remove htonl hack in libcfs.h
  staging: lustre: libcfs: remove LOGL and LOGU macros
  staging: lustre: libcfs: create libcfs_debug.h UAPI header
  staging: lustre: socklnd: create socklnd.h UAPI header
  staging: lustre: lnet: delete lnet.h
  staging: lustre: lnet: migrate headers to lnet uapi directory
  staging: lustre: libcfs: sort headers in libcfs.h
  staging: lustre: lnet: remove userland function prototype in lnetctl.h
  staging: lustre: lnet: remove BIT macro from lnetctl.h
  staging: lustre: uapi: remove libcfs.h from lustre_id.h/lustre_user.h
  staging: lustre: uapi: migrate remaining uapi headers to uapi directory
  staging: lustre: uapi: remove CONFIG_LUSTRE_OBD_MAX_IOCTL
  staging: lustre: uapi: use proper byteorder functions in lustre_idl.h
  staging: lustre: uapi: remove BIT macro from UAPI headers
  staging: lustre: fid: add include path to Makefile
  staging: lustre: fld: add include path to Makefile
  staging: lustre: ptlrpc: add include path to Makefile
  staging: lustre: llite: add include path to Makefile
  staging: lustre: lmv: add include path to Makefile
  staging: lustre: lov: add include path to Makefile
  staging: lustre: mdc: add include path to Makefile
  staging: lustre: mgc: add include path to Makefile
  staging: lustre: obdclass: add include path to Makefile
  staging: lustre: obdecho: add include path to Makefile
  staging: lustre: osc: add include path to Makefile
  staging: lustre: lustre: cleanup paths for lustre internal headers
  staging: lustre: lustre: cleanup paths for lustre UAPI headers
  staging: lustre: lnet: selftest: add include path to Makefile
  staging: lustre: lnet: add include path to Makefile
  staging: lustre: ko2iblnd: add include path to Makefile
  staging: lustre: ksocklnd: add include path to Makefile
  staging: lustre: libcfs: add include path to Makefile
  staging: lustre: libcfs: cleanup paths for libcfs headers
  staging: lustre: lnet: cleanup paths for all LNet headers

 .../staging/lustre/include/linux/libcfs/libcfs.h   |  28 +-
 .../lustre/include/linux/libcfs/libcfs_debug.h | 104 +---
 .../lustre/include/linux/libcfs/libcfs_private.h   |  26 -
 drivers/staging/lustre/include/linux/lnet/api.h|   2 +-
 .../staging/lustre/include/linux/lnet/lib-lnet.h   |  12 +-
 

[PATCH 14/64 v2] staging: lustre: uapi: cleanup headers for lustre_ioctl.h

2017-08-19 Thread James Simmons
With the cleanups we no longer need to drag in tons of
user land headers. Lets simplify the include headers.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568
Reviewed-by: Andreas Dilger 
Reviewed-by: Ben Evans 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h| 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index a7e2fc4..fb87a8b 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -28,19 +28,11 @@
 #ifndef LUSTRE_IOCTL_H_
 #define LUSTRE_IOCTL_H_
 
+#include 
 #include 
 #include 
 #include "../../../../lustre/include/lustre/lustre_idl.h"
 
-#ifdef __KERNEL__
-# include 
-# include 
-#else /* __KERNEL__ */
-# include 
-# include 
-#include 
-#endif /* !__KERNEL__ */
-
 #if !defined(__KERNEL__) && !defined(LUSTRE_UTILS)
 # error This file is for Lustre internal use only.
 #endif
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/64 v2] staging: lustre: uapi: remove unused functions for lustre_fid.h

2017-08-19 Thread James Simmons
The inline function fid_is_namespace_visible and ost_fid_from_resid
are only used for server code so we can remove it.

Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre_fid.h | 29 --
 1 file changed, 29 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h 
b/drivers/staging/lustre/lustre/include/lustre_fid.h
index 6dc24a7..681f698 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -288,18 +288,6 @@ static inline int fid_is_quota(const struct lu_fid *fid)
   fid_seq(fid) == FID_SEQ_QUOTA_GLB;
 }
 
-static inline int fid_is_namespace_visible(const struct lu_fid *fid)
-{
-   const __u64 seq = fid_seq(fid);
-
-   /* Here, we cannot distinguish whether the normal FID is for OST
-* object or not. It is caller's duty to check more if needed.
-*/
-   return (!fid_is_last_id(fid) &&
-   (fid_seq_is_norm(seq) || fid_seq_is_igif(seq))) ||
-  fid_is_root(fid) || fid_is_dot_lustre(fid);
-}
-
 static inline int fid_seq_in_fldb(__u64 seq)
 {
return fid_seq_is_igif(seq) || fid_seq_is_norm(seq) ||
@@ -522,23 +510,6 @@ static inline void ost_fid_build_resid(const struct lu_fid 
*fid,
}
 }
 
-static inline void ost_fid_from_resid(struct lu_fid *fid,
- const struct ldlm_res_id *name,
- int ost_idx)
-{
-   if (fid_seq_is_mdt0(name->name[LUSTRE_RES_ID_VER_OID_OFF])) {
-   /* old resid */
-   struct ost_id oi;
-
-   ostid_set_seq(, name->name[LUSTRE_RES_ID_VER_OID_OFF]);
-   ostid_set_id(, name->name[LUSTRE_RES_ID_SEQ_OFF]);
-   ostid_to_fid(fid, , ost_idx);
-   } else {
-   /* new resid */
-   fid_extract_from_res_name(fid, name);
-   }
-}
-
 /**
  * Flatten 128-bit FID values into a 64-bit value for use as an inode number.
  * For non-IGIF FIDs this starts just over 2^32, and continues without
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 19/64 v2] staging: lustre: uapi: label lustre_param.h as an uapi header

2017-08-19 Thread James Simmons
Change LUSTRE_PARAM_H_ to _UAPI_LUSTRE_PARAM_H_ now that is
a proper UAPI header

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24325
Reviewed-by: Ben Evans 
Reviewed-by: John L. Hammond 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
index f6f4752..cab0056 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h
@@ -29,15 +29,13 @@
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
- * lustre/include/lustre_param.h
- *
  * User-settable parameter keys
  *
  * Author: Nathan Rutman 
  */
 
-#ifndef _LUSTRE_PARAM_H
-#define _LUSTRE_PARAM_H
+#ifndef _UAPI_LUSTRE_PARAM_H_
+#define _UAPI_LUSTRE_PARAM_H_
 
 /** \defgroup param param
  *
@@ -92,4 +90,4 @@
 
 /** @} param */
 
-#endif /* _LUSTRE_PARAM_H */
+#endif /* _UAPI_LUSTRE_PARAM_H_ */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: fsl-dpaa2: ethernet: dpni.c: Fixed alignment to match open parenthesis.

2017-08-19 Thread Srishti Sharma
Fixed alignment so that it matched open parenthesis

Signed-off-by: Srishti Sharma 
---
 drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.c 
b/drivers/staging/fsl-dpaa2/ethernet/dpni.c
index 5b9d442..04a5b14 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpni.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpni.c
@@ -1443,7 +1443,7 @@ int dpni_get_queue(struct fsl_mc_io *mc_io,
queue->destination.id = le32_to_cpu(rsp_params->dest_id);
queue->destination.priority = rsp_params->dest_prio;
queue->destination.type = dpni_get_field(rsp_params->flags,
-DEST_TYPE);
+DEST_TYPE);
queue->flc.stash_control = dpni_get_field(rsp_params->flags,
  STASH_CTRL);
queue->destination.hold_active = dpni_get_field(rsp_params->flags,
--
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.

2017-08-19 Thread Srishti Sharma
On Sun, Aug 20, 2017 at 5:37 AM, Greg KH  wrote:
> On Sun, Aug 20, 2017 at 04:01:25AM +0530, Srishti Sharma wrote:
>> Fixed a check reported by checkpatch.pl to avoid multiple assignments in a 
>> single statement.
>
> Always wrap your changelog text at 72 columns please.
>
>>
>> Signed-off-by: Srishti Sharma 
>> ---
>>  drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c 
>> b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
>> index 26017fe..75e3366 100644
>> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
>> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
>> @@ -1636,7 +1636,8 @@ static void set_fq_affinity(struct dpaa2_eth_priv 
>> *priv)
>>* This may well change at runtime, either through irqbalance or
>>* through direct user intervention.
>>*/
>> - rx_cpu = txc_cpu = cpumask_first(>dpio_cpumask);
>> + rx_cpu = cpumask_first(>dpio_cpumask);
>> + txc_cpu = cpumask_first(>dpio_cpumask);
>
> The original code is nicer, as you don't have to do the computation
> twice.
>
> thanks,
>
> greg k-h

Okay, Thanks :)

Regards,
Srishti
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.

2017-08-19 Thread Greg KH
On Sun, Aug 20, 2017 at 04:01:25AM +0530, Srishti Sharma wrote:
> Fixed a check reported by checkpatch.pl to avoid multiple assignments in a 
> single statement.

Always wrap your changelog text at 72 columns please.

> 
> Signed-off-by: Srishti Sharma 
> ---
>  drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c 
> b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> index 26017fe..75e3366 100644
> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> @@ -1636,7 +1636,8 @@ static void set_fq_affinity(struct dpaa2_eth_priv *priv)
>* This may well change at runtime, either through irqbalance or
>* through direct user intervention.
>*/
> - rx_cpu = txc_cpu = cpumask_first(>dpio_cpumask);
> + rx_cpu = cpumask_first(>dpio_cpumask);
> + txc_cpu = cpumask_first(>dpio_cpumask);

The original code is nicer, as you don't have to do the computation
twice.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.

2017-08-19 Thread Srishti Sharma
Fixed a check reported by checkpatch.pl to avoid multiple assignments in a 
single statement.

Signed-off-by: Srishti Sharma 
---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c 
b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index 26017fe..75e3366 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -1636,7 +1636,8 @@ static void set_fq_affinity(struct dpaa2_eth_priv *priv)
 * This may well change at runtime, either through irqbalance or
 * through direct user intervention.
 */
-   rx_cpu = txc_cpu = cpumask_first(>dpio_cpumask);
+   rx_cpu = cpumask_first(>dpio_cpumask);
+   txc_cpu = cpumask_first(>dpio_cpumask);

for (i = 0; i < priv->num_fqs; i++) {
fq = >fq[i];
--
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 7/8] staging: r8822be: Add Makefiles and Kconfig for new driver

2017-08-19 Thread kbuild test robot
Hi Larry,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.13-rc5 next-20170817]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Larry-Finger/staging-r8822be-Add-existing-rtlwifi-and-rtl_pci-parts-for-new-driver/20170820-023830
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key':
>> drivers/staging/rtlwifi/base.c:2546:34: warning: 'ht_cap_ie' may be used 
>> uninitialized in this function [-Wmaybe-uninitialized]
  bcn_key.ht_cap_info = ht_cap_ie->cap_info;
~^~

vim +/ht_cap_ie +2546 drivers/staging/rtlwifi/base.c

128be9f8 Ping-Ke Shih 2017-08-17  2465  
128be9f8 Ping-Ke Shih 2017-08-17  2466  bool rtl_check_beacon_key(struct 
ieee80211_hw *hw, void *data, unsigned int len)
128be9f8 Ping-Ke Shih 2017-08-17  2467  {
128be9f8 Ping-Ke Shih 2017-08-17  2468  struct rtl_priv *rtlpriv = 
rtl_priv(hw);
128be9f8 Ping-Ke Shih 2017-08-17  2469  struct rtl_mac *mac = 
rtl_mac(rtl_priv(hw));
128be9f8 Ping-Ke Shih 2017-08-17  2470  struct rtl_phy *rtlphy = 
>phy;
128be9f8 Ping-Ke Shih 2017-08-17  2471  struct ieee80211_hdr *hdr = 
data;
128be9f8 Ping-Ke Shih 2017-08-17  2472  struct ieee80211_ht_cap 
*ht_cap_ie;
128be9f8 Ping-Ke Shih 2017-08-17  2473  struct ieee80211_ht_operation 
*ht_oper_ie = NULL;
128be9f8 Ping-Ke Shih 2017-08-17  2474  struct rtl_beacon_keys bcn_key;
128be9f8 Ping-Ke Shih 2017-08-17  2475  struct rtl_beacon_keys 
*cur_bcn_key;
128be9f8 Ping-Ke Shih 2017-08-17  2476  u8 *ht_cap;
128be9f8 Ping-Ke Shih 2017-08-17  2477  u8 ht_cap_len;
128be9f8 Ping-Ke Shih 2017-08-17  2478  u8 *ht_oper;
128be9f8 Ping-Ke Shih 2017-08-17  2479  u8 ht_oper_len;
128be9f8 Ping-Ke Shih 2017-08-17  2480  u8 *ds_param;
128be9f8 Ping-Ke Shih 2017-08-17  2481  u8 ds_param_len;
128be9f8 Ping-Ke Shih 2017-08-17  2482  
128be9f8 Ping-Ke Shih 2017-08-17  2483  if (mac->opmode != 
NL80211_IFTYPE_STATION)
128be9f8 Ping-Ke Shih 2017-08-17  2484  return false;
128be9f8 Ping-Ke Shih 2017-08-17  2485  
128be9f8 Ping-Ke Shih 2017-08-17  2486  /* check if this really is a 
beacon*/
128be9f8 Ping-Ke Shih 2017-08-17  2487  if 
(!ieee80211_is_beacon(hdr->frame_control))
128be9f8 Ping-Ke Shih 2017-08-17  2488  return false;
128be9f8 Ping-Ke Shih 2017-08-17  2489  
128be9f8 Ping-Ke Shih 2017-08-17  2490  /* min. beacon length + FCS_LEN 
*/
128be9f8 Ping-Ke Shih 2017-08-17  2491  if (len <= 40 + FCS_LEN)
128be9f8 Ping-Ke Shih 2017-08-17  2492  return false;
128be9f8 Ping-Ke Shih 2017-08-17  2493  
128be9f8 Ping-Ke Shih 2017-08-17  2494  cur_bcn_key = 
>cur_beacon_keys;
128be9f8 Ping-Ke Shih 2017-08-17  2495  
128be9f8 Ping-Ke Shih 2017-08-17  2496  if 
(rtlpriv->mac80211.link_state == MAC80211_NOLINK) {
128be9f8 Ping-Ke Shih 2017-08-17  2497  if (cur_bcn_key->valid) 
{
128be9f8 Ping-Ke Shih 2017-08-17  2498  
cur_bcn_key->valid = false;
128be9f8 Ping-Ke Shih 2017-08-17  2499  
RT_TRACE(rtlpriv, COMP_BEACON, DBG_LOUD,
128be9f8 Ping-Ke Shih 2017-08-17  2500   "Reset 
cur_beacon_keys.valid to false!\n");
128be9f8 Ping-Ke Shih 2017-08-17  2501  }
128be9f8 Ping-Ke Shih 2017-08-17  2502  return false;
128be9f8 Ping-Ke Shih 2017-08-17  2503  }
128be9f8 Ping-Ke Shih 2017-08-17  2504  
128be9f8 Ping-Ke Shih 2017-08-17  2505  /* and only beacons from the 
associated BSSID, please */
128be9f8 Ping-Ke Shih 2017-08-17  2506  if 
(!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
128be9f8 Ping-Ke Shih 2017-08-17  2507  return false;
128be9f8 Ping-Ke Shih 2017-08-17  2508  
128be9f8 Ping-Ke Shih 2017-08-17  2509  /* Parsing DS Param IE 
**/
128be9f8 Ping-Ke Shih 2017-08-17  2510  ds_param = rtl_find_ie(data, 
len - FCS_LEN, WLAN_EID_DS_PARAMS);
128be9f8 Ping-Ke Shih 2017-08-17  2511  
128be9f8 Ping-Ke Shih 2017-08-17  2512  if (ds_param && !(ds_param[1] < 
sizeof(*ds_param)))
128be9f8 Ping-Ke Shih 2017-08-17  2513  ds_param_len = 
ds_param[1];
128be9f8 Ping-Ke Shih 2017-08-17  2514  else
128be9f8 Ping-Ke Shih 2017-08-17  2515  ds_param = NULL;
128be9f8 Ping-Ke Shih 2017-08-17  2516  
128be9f8 Ping-Ke Shih 2017-08-17  2517  /* Parsing HT 

[PATCH] staging: fsl-mc: move bus driver out of staging

2017-08-19 Thread laurentiu.tudor
From: Stuart Yoder 

Move the source files out of staging into their final locations:
  -include files in drivers/staging/fsl-mc/include go to include/linux/fsl
  -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip
  -source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc
  -README.txt, providing and overview of DPAA goes to
   Documentation/dpaa2/overview.txt

Update or delete other remaining staging files-- Makefile, Kconfig, TODO.
Update dpaa2_eth and dpio staging drivers.

Signed-off-by: Stuart Yoder 
Signed-off-by: Laurentiu Tudor 
[Laurentiu: rebased, add dpaa2_eth and dpio #include updates]
Cc: Thomas Gleixner 
Cc: Jason Cooper 
Cc: Marc Zyngier 
---
 .../README.txt => Documentation/dpaa2/overview.txt |  0
 MAINTAINERS|  2 +-
 drivers/bus/Kconfig|  2 ++
 drivers/bus/Makefile   |  3 +++
 drivers/bus/fsl-mc/Kconfig | 17 +
 drivers/bus/fsl-mc/Makefile| 17 +
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h |  0
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c |  2 +-
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h |  0
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h |  0
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h  |  0
 .../{staging/fsl-mc/bus => bus/fsl-mc}/dprc-driver.c   |  1 -
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.c  |  2 +-
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.h  |  0
 .../fsl-mc/bus => bus/fsl-mc}/fsl-mc-allocator.c   |  1 -
 .../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c|  0
 .../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c|  0
 .../fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h |  2 +-
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c |  1 -
 drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-sys.c|  2 +-
 drivers/irqchip/Makefile   |  1 +
 .../fsl-mc/bus => irqchip}/irq-gic-v3-its-fsl-mc-msi.c |  2 +-
 drivers/staging/fsl-dpaa2/ethernet/README  |  2 +-
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c |  2 +-
 drivers/staging/fsl-dpaa2/ethernet/dpni.c  |  2 +-
 drivers/staging/fsl-mc/TODO| 18 --
 drivers/staging/fsl-mc/bus/Kconfig | 10 --
 drivers/staging/fsl-mc/bus/Makefile| 15 ++-
 drivers/staging/fsl-mc/bus/dpbp.c  |  2 +-
 drivers/staging/fsl-mc/bus/dpcon.c |  2 +-
 drivers/staging/fsl-mc/bus/dpio/dpio-driver.c  |  2 +-
 drivers/staging/fsl-mc/bus/dpio/dpio-service.c |  2 +-
 drivers/staging/fsl-mc/bus/dpio/dpio.c |  2 +-
 .../staging/fsl-mc/include => include/linux/fsl}/mc.h  |  0
 34 files changed, 56 insertions(+), 58 deletions(-)
 rename drivers/staging/fsl-mc/README.txt => Documentation/dpaa2/overview.txt 
(100%)
 create mode 100644 drivers/bus/fsl-mc/Kconfig
 create mode 100644 drivers/bus/fsl-mc/Makefile
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-driver.c (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.c (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.h (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-allocator.c (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c (100%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c (99%)
 rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-sys.c (99%)
 rename drivers/{staging/fsl-mc/bus => irqchip}/irq-gic-v3-its-fsl-mc-msi.c 
(99%)
 delete mode 100644 drivers/staging/fsl-mc/TODO
 rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc.h (100%)

diff --git a/drivers/staging/fsl-mc/README.txt 
b/Documentation/dpaa2/overview.txt
similarity index 100%
rename from drivers/staging/fsl-mc/README.txt
rename to Documentation/dpaa2/overview.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index 6f7721d..2149eeb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10900,7 +10900,7 @@ M:  Stuart Yoder 
 M: Laurentiu Tudor 
 L: linux-ker...@vger.kernel.org
 S: Maintained
-F: drivers/staging/fsl-mc/
+F: drivers/bus/fsl-mc/
 F: 

RE: [PATCH 05/15] mei: make device_type const

2017-08-19 Thread Winkler, Tomas

> Subject: [PATCH 05/15] mei: make device_type const
> 
> Make this const as it is only stored in the type field of a device structure,
> which is const.
> Done using Coccinelle.
> 
> Signed-off-by: Bhumika Goyal 
> ---
>  drivers/misc/mei/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index
> 40c7908..1ac10cb 100644
> --- a/drivers/misc/mei/bus.c
> +++ b/drivers/misc/mei/bus.c
> @@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device
> *dev)
>   kfree(cldev);
>  }
> 
> -static struct device_type mei_cl_device_type = {
> +static const struct device_type mei_cl_device_type = {
>   .release= mei_cl_bus_dev_release,
>  };
> 
LGTM
Thanks
Tomas 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: greybus: vibrator.c: Fixed alignment to match open parenthesis.

2017-08-19 Thread Srishti Sharma
Fixed alignment so that it matched open parenthesis

Signed-off-by: Srishti Sharma 
---
 drivers/staging/greybus/vibrator.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/greybus/vibrator.c 
b/drivers/staging/greybus/vibrator.c
index 77a2365..5cd8a50 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -34,7 +34,7 @@ static int turn_off(struct gb_vibrator_device *vib)
int ret;

ret = gb_operation_sync(vib->connection, GB_VIBRATOR_TYPE_OFF,
-   NULL, 0, NULL, 0);
+   NULL, 0, NULL, 0);

gb_pm_runtime_put_autosuspend(bundle);

@@ -55,7 +55,7 @@ static int turn_on(struct gb_vibrator_device *vib, u16 
timeout_ms)
turn_off(vib);

ret = gb_operation_sync(vib->connection, GB_VIBRATOR_TYPE_ON,
-   NULL, 0, NULL, 0);
+   NULL, 0, NULL, 0);
if (ret) {
gb_pm_runtime_put_autosuspend(bundle);
return ret;
@@ -116,7 +116,7 @@ static struct class vibrator_class = {
 static DEFINE_IDA(minors);

 static int gb_vibrator_probe(struct gb_bundle *bundle,
-   const struct greybus_bundle_id *id)
+const struct greybus_bundle_id *id)
 {
struct greybus_descriptor_cport *cport_desc;
struct gb_connection *connection;
@@ -136,7 +136,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
return -ENOMEM;

connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id),
-   NULL);
+ NULL);
if (IS_ERR(connection)) {
retval = PTR_ERR(connection);
goto err_free_vib;
--
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/15] staging: greybus: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/gbphy.c b/drivers/staging/greybus/gbphy.c
index 603de6f..80c1da8 100644
--- a/drivers/staging/greybus/gbphy.c
+++ b/drivers/staging/greybus/gbphy.c
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
.name=  "gbphy_device",
.release =  gbphy_dev_release,
.pm =   _gbphy_pm_ops,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/15] usb: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 930e8f3..4aa5195 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
.name = "ulpi_device",
.groups = ulpi_dev_attr_groups,
.release = ulpi_dev_release,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/15] scsi: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/scsi/fcoe/fcoe_sysfs.c  | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 9cf3d56..5c8310b 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -659,13 +659,13 @@ static void fcoe_fcf_device_release(struct device *dev)
kfree(fcf);
 }
 
-static struct device_type fcoe_ctlr_device_type = {
+static const struct device_type fcoe_ctlr_device_type = {
.name = "fcoe_ctlr",
.groups = fcoe_ctlr_attr_groups,
.release = fcoe_ctlr_device_release,
 };
 
-static struct device_type fcoe_fcf_device_type = {
+static const struct device_type fcoe_fcf_device_type = {
.name = "fcoe_fcf",
.groups = fcoe_fcf_attr_groups,
.release = fcoe_fcf_device_release,
diff --git a/drivers/scsi/scsi_transport_iscsi.c 
b/drivers/scsi/scsi_transport_iscsi.c
index a424eae..b9513f8 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1009,7 +1009,7 @@ static void iscsi_flashnode_sess_release(struct device 
*dev)
kfree(fnode_sess);
 }
 
-static struct device_type iscsi_flashnode_sess_dev_type = {
+static const struct device_type iscsi_flashnode_sess_dev_type = {
.name = "iscsi_flashnode_sess_dev_type",
.groups = iscsi_flashnode_sess_attr_groups,
.release = iscsi_flashnode_sess_release,
@@ -1195,7 +1195,7 @@ static void iscsi_flashnode_conn_release(struct device 
*dev)
kfree(fnode_conn);
 }
 
-static struct device_type iscsi_flashnode_conn_dev_type = {
+static const struct device_type iscsi_flashnode_conn_dev_type = {
.name = "iscsi_flashnode_conn_dev_type",
.groups = iscsi_flashnode_conn_attr_groups,
.release = iscsi_flashnode_conn_release,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/15] remoteproc: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/remoteproc_core.c 
b/drivers/remoteproc/remoteproc_core.c
index 364ef28..48b2c5d 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
.name   = "remoteproc",
.release= rproc_type_release,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/15] s390/zcrypt: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/crypto/ap_card.c b/drivers/s390/crypto/ap_card.c
index 836efac9..0329148 100644
--- a/drivers/s390/crypto/ap_card.c
+++ b/drivers/s390/crypto/ap_card.c
@@ -153,7 +153,7 @@ static ssize_t ap_modalias_show(struct device *dev,
NULL
 };
 
-static struct device_type ap_card_type = {
+static const struct device_type ap_card_type = {
.name = "ap_card",
.groups = ap_card_dev_attr_groups,
 };
diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c
index 0f1a5d0..e2a85c26 100644
--- a/drivers/s390/crypto/ap_queue.c
+++ b/drivers/s390/crypto/ap_queue.c
@@ -577,7 +577,7 @@ static ssize_t ap_interrupt_show(struct device *dev,
NULL
 };
 
-static struct device_type ap_queue_type = {
+static const struct device_type ap_queue_type = {
.name = "ap_queue",
.groups = ap_queue_dev_attr_groups,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/15] platform/x86: wmi: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index e32ba57..a37c253 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
.remove = wmi_dev_remove,
 };
 
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
.name = "event",
.groups = wmi_event_groups,
.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
.name = "method",
.groups = wmi_method_groups,
.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
.name = "data",
.groups = wmi_data_groups,
.release = wmi_dev_release,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/15] PCI: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/endpoint/pci-epf-core.c 
b/drivers/pci/endpoint/pci-epf-core.c
index 6877d6a..9d0de12 100644
--- a/drivers/pci/endpoint/pci-epf-core.c
+++ b/drivers/pci/endpoint/pci-epf-core.c
@@ -27,7 +27,7 @@
 #include 
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
.release= pci_epf_dev_release,
 };
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/15] mux: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c
index 2fe96c4..68bd16d 100644
--- a/drivers/mux/mux-core.c
+++ b/drivers/mux/mux-core.c
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
.name = "mux-chip",
.release = mux_chip_release,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/15] phy: tegra: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/phy/tegra/xusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 3cbcb25..bd3f1b6 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -155,7 +155,7 @@ static void tegra_xusb_pad_release(struct device *dev)
pad->soc->ops->remove(pad);
 }
 
-static struct device_type tegra_xusb_pad_type = {
+static const struct device_type tegra_xusb_pad_type = {
.release = tegra_xusb_pad_release,
 };
 
@@ -512,7 +512,7 @@ static void tegra_xusb_port_release(struct device *dev)
 {
 }
 
-static struct device_type tegra_xusb_port_type = {
+static const struct device_type tegra_xusb_port_type = {
.release = tegra_xusb_port_release,
 };
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/15] mei: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 40c7908..1ac10cb 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device *dev)
kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
.release= mei_cl_bus_dev_release,
 };
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/15] [media] rc: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/rc/rc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index a9eba00..ea3da3e 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1532,7 +1532,7 @@ static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
.attrs  = rc_dev_wakeup_filter_attrs,
 };
 
-static struct device_type rc_dev_type = {
+static const struct device_type rc_dev_type = {
.release= rc_dev_release,
.uevent = rc_dev_uevent,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/15] mtd: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index f872a99..e7ea842 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
.name   = "mtd",
.groups = mtd_groups,
.release= mtd_release,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/15] [media] i2c: make device_type const

2017-08-19 Thread Bhumika Goyal
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/soc_camera/mt9t031.c 
b/drivers/media/i2c/soc_camera/mt9t031.c
index 714fb35..4802d30 100644
--- a/drivers/media/i2c/soc_camera/mt9t031.c
+++ b/drivers/media/i2c/soc_camera/mt9t031.c
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
.runtime_resume = mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
.name   = "MT9T031",
.pm = _dev_pm_ops,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/15] drivers: make device_type const

2017-08-19 Thread Bhumika Goyal
Make device_type const. Done using Coccinelle.

Bhumika Goyal (15):
  EDAC: make device_type const
  drm: make device_type const
  [media] i2c: make device_type const
  [media] rc: make device_type const
  mei: make device_type const
  mtd:  make device_type const
  mux: make device_type const
  PCI: make device_type const
  phy: tegra: make device_type const
  platform/x86: wmi: make device_type const
  remoteproc: make device_type const
  s390/zcrypt: make device_type const
  scsi: make device_type const
  staging: greybus: make device_type const
  usb: make device_type const

 drivers/edac/edac_mc_sysfs.c   | 8 
 drivers/edac/i7core_edac.c | 4 ++--
 drivers/gpu/drm/drm_sysfs.c| 2 +-
 drivers/gpu/drm/ttm/ttm_module.c   | 2 +-
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 drivers/media/rc/rc-main.c | 2 +-
 drivers/misc/mei/bus.c | 2 +-
 drivers/mtd/mtdcore.c  | 2 +-
 drivers/mux/mux-core.c | 2 +-
 drivers/pci/endpoint/pci-epf-core.c| 4 ++--
 drivers/phy/tegra/xusb.c   | 4 ++--
 drivers/platform/x86/wmi.c | 6 +++---
 drivers/remoteproc/remoteproc_core.c   | 2 +-
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 drivers/scsi/fcoe/fcoe_sysfs.c | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c| 4 ++--
 drivers/staging/greybus/gbphy.c| 2 +-
 drivers/usb/common/ulpi.c  | 2 +-
 19 files changed, 29 insertions(+), 29 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/15] drm: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.
---
 drivers/gpu/drm/drm_sysfs.c  | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 1c5b5ce..84e4ebe 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
.name = "drm_minor"
 };
 
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
index 66fc639..e6604e0 100644
--- a/drivers/gpu/drm/ttm/ttm_module.c
+++ b/drivers/gpu/drm/ttm/ttm_module.c
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
.name = "ttm",
/**
 * Add pm ops here.
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/15] EDAC: make device_type const

2017-08-19 Thread Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal 
---
 drivers/edac/edac_mc_sysfs.c | 8 
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index dbc6446..e4fcfa8 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
kfree(csrow);
 }
 
-static struct device_type csrow_attr_type = {
+static const struct device_type csrow_attr_type = {
.groups = csrow_attr_groups,
.release= csrow_attr_release,
 };
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
kfree(dimm);
 }
 
-static struct device_type dimm_attr_type = {
+static const struct device_type dimm_attr_type = {
.groups = dimm_attr_groups,
.release= dimm_attr_release,
 };
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
kfree(mci);
 }
 
-static struct device_type mci_attr_type = {
+static const struct device_type mci_attr_type = {
.groups = mci_attr_groups,
.release= mci_attr_release,
 };
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
kfree(dev);
 }
 
-static struct device_type mc_attr_type = {
+static const struct device_type mc_attr_type = {
.release= mc_attr_release,
 };
 /*
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index d36cc84..c16c3b9 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
kfree(device);
 }
 
-static struct device_type addrmatch_type = {
+static const struct device_type addrmatch_type = {
.groups = addrmatch_groups,
.release= addrmatch_release,
 };
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device 
*device)
kfree(device);
 }
 
-static struct device_type all_channel_counts_type = {
+static const struct device_type all_channel_counts_type = {
.groups = all_channel_counts_groups,
.release= all_channel_counts_release,
 };
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel