Commit graph

82 commits

Author SHA1 Message Date
Oleg Drokin 18e042f0c9 lustre: Correct KUC code max changelog msg size
The kernel to userspace communication routines (KUC) allocate
and limit the maximum cs_buf size to CR_MAXSIZE.  However this
fails to account for the fact that the buffer is assumed to begin
with a struct kuc_hdr.  To allocate and account for that space,
we introduce a new define, KUC_CHANGELOG_MSG_MAXSIZE.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7406
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3587
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 09:09:38 -08:00
Marek Szyprowski 1ebf5b72dc staging: lustre: fix GFP_ATOMIC macro usage
GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an
atomic allocation, the code must test __GFP_WAIT flag presence.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 09:05:00 -08:00
Salym Senyonga 1c4738c35e staging: lustre: libcfs_debug: small whitespace cleanups
Just a few minor changes to make columns line up.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:39:22 -08:00
Salym Senyonga e6ee5f4bb4 staging: lustre: libcfs_debug.h: remove extra blank lines
This patch removes consecutive blank lines.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:39:22 -08:00
Salym Senyonga 924a9f949c staging: lustre: libcfs_debug.h: Align backslashes in macros
Uniformly align backslashes to improve readability.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:39:22 -08:00
Salym Senyonga 5b50eeffee staging: lustre: libcfs_debug.h: align define values
Give all the constants a uniform alignment.

Signed-off-by: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:35:49 -08:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Doug Oucharek e75fb87f86 staging/lustre/lnet: Add LNet Router Priority parameter
This change adds a priority parameter to the route module settings.
This paramter can be >= 0. Like hops, the lower the prioirty number
the higher the priority.  So lower numbered priorities will be
selected over higher numbers.

Lustre-change: http://review.whamcloud.com/5663
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2934
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10 18:22:55 -08:00
Dmitry Eremin 4504a3c11e staging/lustre: clean up SET_BUT_UNUSED/UNUSED macros
This is SET_BUT_UNUSED/UNUSED macro cleaning up part
of the original Lustre tree commit.

Lustre-change: http://review.whamcloud.com/6139
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3204
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 08:51:40 -08:00
Peng Tao 76d791a075 staging/lustre/libcfs: remove LI_POISON
The extactly same definition exitst in lustre_lib.h.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:04 -08:00
Peng Tao 8cc7b4b9f1 staging/lustre: remove CFS_MODULE_PARM
Patch generated by coccinelle:

@generic_type@
declarer name CFS_MODULE_PARM;
declarer name module_param;
declarer name MODULE_PARM_DESC;
expression E1, E2, E3, E4;
type t;
@@
-CFS_MODULE_PARM(E1, E2, t, E3, E4);
+module_param(E1, t, E3);
+MODULE_PARM_DESC(E1, E4);

@charp@
expression E1, E2, E3, E4, E5;
@@
-CFS_MODULE_PARM(E1, E2, E3, E4, E5);
+module_param(E1, E3, E4);
+MODULE_PARM_DESC(E1, E5);

With manual modification to remove CFS_MODULE_PARM definition and
fix up checkpatch.pl warnnings.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:04 -08:00
Peng Tao da7a96ae19 staging/lustre/libcfs: remove lwt code
It was never enabled.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:04 -08:00
Peng Tao bfc79f3cdb staging/lustre/libcfs: remove linux-fs.h
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao d47b680e7b staging/lustre/libcfs: remove flock wrappers
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao 79783924db staging/lustre: move IFTODT/DTTOIF to lustre_idl.h
They are in fact definition of how client/server talks
to each other about file type.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao 7ebcb731fc staging/lustre/libcfs: remove filp_write
Use vfs_write instead and call kmap/kunmap to ensure
that we can access high memory zone.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao e23f875db9 staging/lustre/libcfs: remove filp_read
no users.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao a630b22d51 staging/lustre/libcfs: remove filp_fsync
we can just call generic vfs_fsync().

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:03 -08:00
Peng Tao b831516cc5 staging/lustre/libcfs: remove filp_size/filp_poff
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:35:02 -08:00
Peng Tao 843cff5abd staging/lustre: remove INIT_STRATEGY
legacy code used to support kernel where struct ctl_table
has strategy member.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:56 -08:00
Peng Tao 7fb3d1c527 staging/lustre: remove INIT_CTL_NAME
legacy code used to support kernel where struct ctl_table
has ctl_name member.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao 9f773620f1 staging/lustre: get_cpu is always defined
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao bace1077ff staging/lustre: remove _LWORDSIZE
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao 414b1419c5 staging/lustre: remove __CYGWIN__
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao 6be96847b3 staging/lustre/libcfs: remove IOCTL_LIBCFS_TYPE
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao 81ddefb004 staging/lustre: remove CFS_SYSFS_MODULE_PARM
No more references to it.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:44:55 -08:00
Peng Tao de55446b8e staging/lustre/libcfs: remove HAVE_MM_INLINE
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19 10:42:06 -08:00
James Simmons c7c99012dd staging/lustre/autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test
is_compat_task has been defined on all arches since v2.6.29.
We can remove the test and dead code.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2800
Lustre-change: http://review.whamcloud.com/5393
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-15 13:21:42 +09:00
Lisa Nguyen ac0a287194 staging: lustre: lnet: Reformat pointer variable in lib-lnet.h
Reformat a pointer variable in lib-lnet.h to meet kernel
coding style and eliminate pointer format warning
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:55 -07:00
Lisa Nguyen 02816395c0 staging: lustre: lnet: Remove unnecessary () from return statements
Remove unnecessary parentheses from return statements in lib-lnet.h
to meet kernel coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:55 -07:00
Lisa Nguyen 62fbc9f75e staging: lustre: lnet: Remove unnecessary spaces in lib-lnet.h
Remove spaces between function names and open parentheses to
meet kernel coding style and eliminate extra space warnings
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:21:54 -07:00
Lisa Nguyen 6da6eabe10 staging: lustre: Remove typedef and update cfs_hash struct
Remove typedef keyword and rename the cfs_hash_t struct to
cfs_hash in libcfs_hash.h. These changes resolve the "Do
not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that
depend on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:19:30 -07:00
Lisa Nguyen 6ea510c189 staging: lustre: Remove typedef and update cfs_hash_bd struct
Remove typedef keyword and rename the cfs_hash_bd_t struct to
cfs_hash_bd in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that depend
on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:18:09 -07:00
Lisa Nguyen a3ea59e0ee staging: lustre: Remove typedef and update cfs_debug_limit_state struct
Removed typedef keyword and rename the cfs_debug_limit_state_t
struct to cfs_debug_limit_state in libcfs_debug.h. These changes
resolve the "Do not add new typedefs" warning generated by
checkpatch.pl and meet kernel coding style.

Struct variables in other header and source files
that depend on libcfs_debug.h are updated as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:16:54 -07:00
Lisa Nguyen 1e27138bae staging: lustre: Remove typedef and update cfs_hash_bucket struct
Remove typedef keyword and rename the cfs_hash_bucket_t struct to
cfs_hash_bucket in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl and
meet kernel coding style.

The struct variables in hash.c are updated to reflect this change
as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-26 20:12:19 -07:00
Lisa Nguyen 29323b3e6b staging: lustre: Remove typedef and update cfs_hash_lock union
Remove typedef keyword and rename the cfs_hash_lock_t
union to cfs_hash_lock in libcfs_hash.h. These changes
resolve the "Do not add new typedefs" warning
generated by checkpatch.pl and meet kernel coding style.

The union variables in hash.c are updated to reflect this
change as well.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 05:48:15 +01:00
Lisa Nguyen d338bce130 staging: lustre: libcfs: Remove bitmap.h file
The functions in the bitmap.h header file are not being used by
any source file in the lustre driver.

Unless there are any objections, please remove the bitmap.h
header file as it contains unused code in the kernel.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-21 04:24:37 +01:00
Peng Tao ea8352c289 staging/lustre/libcfs: cleanup linux-mem.h
remove shrinker related wrappers.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-09-10 18:56:32 -04:00
Masanari Iida 2b28432642 staging: lustre: Fix typo in lustre/lnet
Correct spelling typo in comments and debug messages.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:29:09 -07:00
Geert Uytterhoeven 917ea9a3e1 staging: lustre: Use proper constant types for L*_POISON values
On 32-bit m68k, I get lots of warnings like:

    warning: integer constant is too large for ‘long’ type

Switch the L*_POISON definitions from too-large constants and casts
to the proper constant types to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:21:21 -07:00
Masanari Iida 253d50ebda staging: lustre: Fix typo in lustre/include
Fix spelling typo in comments within lustre/include/linux.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:29 -07:00
Greg Kroah-Hartman b59fe84591 staging: lustre: remove proc_dir_entry_t typedef
Use struct proc_dir_entry like the rest of the kernel does.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 09:10:48 +08:00
Greg Kroah-Hartman 9733ac3330 staging: lustre: remove strange journal macros into the one file using them
This moves the PUSH_JOURNAL and friend macros into debug.c, as that's
the only place they are used, so why are they even a macro?

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 09:03:03 +08:00
Greg Kroah-Hartman 68b636b68e staging: lustre: remove task_t typedef
Use struct task_struct instead.

Also remove the unused libcfs_current() function, while I noticed it
doing this conversion.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:56:42 +08:00
Greg Kroah-Hartman e7e73793d1 staging: lustre: remove cfs_task_state_t
It's just a long, so remove the typedef and use long.

Side note, all the functions like waitq_* should be removed as well,
they are wrapping functions that don't really do what it seems that they
do based on their name.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:48:26 +08:00
Greg Kroah-Hartman 2f5723a1bf staging: lustre: remove CFS_DECL_WAITQ() macro
Just use DECLARE_WAIT_QUEUE_HEAD() instead.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:39:49 +08:00
Greg Kroah-Hartman 5431935116 staging: lustre: remove timer_list_t typedef
Use struct timer_list instead.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:35:40 +08:00
Greg Kroah-Hartman 8db0fc8931 staging: lustre: remove unused cfs_ waitqueue wrappers
These weren't ever used, so just remove them.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:20:58 +08:00
Greg Kroah-Hartman 6960736c01 staging: lustre: remove cfs_module() macro
Open code the module_init/module_exit lines, and also use
MODULE_VERSION, as it seems that was intended, but just never hooked up
at all.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:16:25 +08:00
Greg Kroah-Hartman 305ec768ff staging: lustre: remove wrappers for two atomic functions
Just call them directly, like the rest of the kernel does.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04 08:03:39 +08:00