aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-06-05staging: lustre: delete the filesystem from the tree.Greg Kroah-Hartman1-810/+0
The Lustre filesystem has been in the kernel tree for over 5 years now. While it has been an endless source of enjoyment for new kernel developers learning how to do basic codingstyle cleanups, as well as an semi-entertaining source of bewilderment from the vfs developers any time they have looked into the codebase to try to figure out how to port their latest api changes to this filesystem, it has not really moved forward into the "this is in shape to get out of staging" despite many half-completed attempts. And getting code out of staging is the main goal of that portion of the kernel tree. Code should not stagnate and it feels like having this code in staging is only causing the development cycle of the filesystem to take longer than it should. There is a whole separate out-of-tree copy of this codebase where the developers work on it, and then random changes are thrown over the wall at staging at some later point in time. This dual-tree development model has never worked, and the state of this codebase is proof of that. So, let's just delete the whole mess. Now the lustre developers can go off and work in their out-of-tree codebase and not have to worry about providing valid changelog entries and breaking their patches up into logical pieces. They can take the time they have spend doing those types of housekeeping chores and get the codebase into a much better shape, and it can be submitted for inclusion into the real part of the kernel tree when ready. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.NeilBrown1-4/+4
All usages of the form LIBCFS_ALLOC(variable, sizeof(variable)) or LIBCFS_ALLOC(variable, sizeof(variable's-type)) are changed to variable = kzalloc(sizeof(...), GFP_NOFS); Similarly, all LIBCFS_FREE(variable, sizeof(variable)) become kfree(variable); None of these need the vmalloc option, or any of the other minor benefits of LIBCFS_ALLOC(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: lustre: add SPDX identifiers to all lustre filesGreg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/lustre files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: James Simmons <jsimmons@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: socklnd: change UAPI typedefs to proper structureJames Simmons1-19/+19
The upstream kernel requires proper structures so convert all the UAPI typedefs in socklnd.h. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/18506 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-02staging: lustre: remove CLASSERT macroArnd Bergmann1-1/+1
lustre uses a fake switch() statement as a compile-time assert, but unfortunately each use of that causes a warning when building with clang: drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case matching constant switch condition '42' drivers/staging/lustre/lnet/klnds/socklnd/../../../include/linux/libcfs/libcfs_private.h:294:36: note: expanded from macro 'CLASSERT' #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0) As Greg suggested, let's just kill off this macro completely instead of fixing it. This replaces it with BUILD_BUG_ON(), which means we have to negate all the conditions in the process. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-23staging: lustre: lnet: change lnet_hdr_t to proper structureJames Simmons1-11/+11
Change lnet_hdr_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-23staging: lustre: lnet: change lnet_magicversion_t to proper structureJames Simmons1-3/+3
Change lnet_magicversion_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/24566 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18staging: lustre: lnet: cleanup some of the > 80 line issuesJames Simmons1-6/+20
Cleanup some of the checkpatch over 80 character lines reported. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-18staging/lustre: Remove unnecessary space after a castOleg Drokin1-3/+3
This patch fixes all checkpatch occurences of "CHECK: No space is necessary after a cast" in Lustre code. Signed-off-by: Emoly Liu <emoly.liu@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging: lustre: socklnd: remove typedefsJames Simmons1-34/+34
Remove all remaining typedefs in socklnd driver. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lustre: lnet: socklnd_proto: Use list_for_each_entry_safeBhaktipriya Shridhar1-2/+2
Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: lustre: Use list_{next/prev}_entry instead of list_entryBhumika Goyal1-2/+1
This patch replace list_entry with list_{next/prev}_entry as it makes the code more clear to read. Done using coccinelle: @@ expression e1; identifier e3; type t; @@ ( - list_entry(e1->e3.next,t,e3) + list_next_entry(e1,e3) | - list_entry(e1->e3.prev,t,e3) + list_prev_entry(e1,e3) ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging/lustre: Remove the "write to FSF to get a copy of GPL" wordingOleg Drokin1-3/+0
Checkpatch highlighted that some of our Lustre files carry this extra paragraph and indeed it does seem somewhat redundant, so remove it. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: fix all conditional comparison to zero in LNet layerJames Simmons1-27/+27
Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects the LNet code to behavior according to kernel coding standards. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: fix all NULL comparisons in LNet layerJames Simmons1-23/+23
This removes every instance of checking a variable against NULL in the LNet source code. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: balance braces properly in LNet layerJames Simmons1-2/+1
Properly balance the braces done wrong as reported by checkpatch.pl. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: remove space in LNet function declarationsJames Simmons1-11/+11
Several function declarations have spacing in them. Lets remove all those instances reported by checkpatch.pl. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: don't set more than one variable per line in LNet layerJames Simmons1-4/+8
Cleanup all occurances of more than one variable being set per line as reported by checkpatch.pl. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: align all code properly for LNet coreJames Simmons1-11/+11
In several places in the LNet core the code doesn't align up properly. This resolves those checkpath issues. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: lustre: format properly all comment blocks for LNet coreJames Simmons1-2/+4
In several places in the LNet core comment blocks don't follow the linux kernel style. This patch cleans those problems up. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10staging:lustre: rename tcpip handling functions to lnet_* prefixJames Simmons1-23/+20
With all the TCPIP handling done in the lnet layer we should rename all the functions with the prefix lnet_*. One other change done was changing the remove argument of lnet_sock_getaddr from a int to a bool. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: lustre: lnet: socklnd: code cleanup - align spacingMike Shuey1-64/+64
Unify variable declarations to use a single space. Also include several miscellaneous whitespace cleanups, particularly in socklnd.h. Signed-off-by: Mike Shuey <shuey@purdue.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01Staging: lustre:lnet: klnds: socklnd: Remove space after the name of that functionHatice ERTÜRK1-20/+20
Function names must be adjacent to the parenthesis opened after.That's why remove space after the name of that function. This Warning found with checkpatch.pl Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17lustre: don't use iovec instead of kvecAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-23staging: lustre: Coalesce string fragmentsJoe Perches1-8/+7
Join the string fragments to make it easier to grep. Ignored all the 80+ column lines. Added many missing spaces when coalescing formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30drivers: staging: lustre: Fix space required after that ',' errorsGreg Donald1-2/+4
Fix checkpatch.pl space required after that ',' errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30drivers: staging: lustre: Fix that open brace { should be on the previous line errorsGreg Donald1-6/+3
Fix checkpatch.pl that open brace { should be on the previous line errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12staging: lustre: remove LPU64 defineGreg Kroah-Hartman1-2/+2
Just use the proper modifier type... Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11staging: lustre: remove socket_t typedefGreg Kroah-Hartman1-4/+4
Use 'struct socket' like the rest of the kernel does. Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: hpdd-discuss <hpdd-discuss@lists.01.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org
2014-03-18staging:lustre: Removed assignments from if statements.Chi Pham1-2/+4
Fixed some minor checkpatch warnings such as whitespace. Coccinelle was used for this patch (NOTE: some of the changes were made by hand). The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code. *** IFASSIGNMENT.COCCI START *** /* Coccinelle script to handle assignments in if statements * For compound statements, can so far only handle statements with the * assignment on either extreme */ /* This rule is for simple cases * e.g. just an assignment in if, possibly with unary operator */ @simple@ expression E1, E2; statement S1, S2; @@ + E1 = E2; if ( - (E1 = E2) + E1 ) S1 else S2 /* This rule is for compound statements where the assignment is on the right.*/ @right@ expression E, E1, E2; statement S1, S2; @@ ( /* and */ - if (E && (E1 = E2)) + if (E) { + E1 = E2; + if (E1) S1 else S2 + } else S2 | - if (E && (E1 = E2)) + if (E) { + E1 = E2; + if (E1) S1 + } /* or */ | - if (E || (E1 = E2)) + if (!E) { + E1 = E2; + if (E1) S1 else S2 + } + else S1 | - if (E || (E1 = E2)) + if (!E) { + E1 = E2; + if (E1) S1 + } else S1 /* not equal */ | - if (E != (E1 = E2)) + E1 = E2; + if (E != E1) S1 else S2 | - if (E != (E1 = E2)) + E1 = E2; + if (E != E1) S1 /* equal */ | - if (E == (E1 = E2)) + E1 = E2; + if (E == E1) S1 else S2 | - if (E == (E1 = E2)) + E1 = E2; + if (E == E1) S1 /* greater than */ | - if (E > (E1 = E2)) + E1 = E2; + if (E > E1) S1 else S2 | - if (E > (E1 = E2)) + E1 = E2; + if (E > E1) S1 /* less than */ | - if (E < (E1 = E2)) + E1 = E2; + if (E < E1) S1 else S2 | - if (E < (E1 = E2)) + E1 = E2; + if (E < E1) S1 /* lesser than or equal to */ | - if (E <= (E1 = E2)) + E1 = E2; + if (E <= E1) S1 else S2 | - if (E <= (E1 = E2)) + E1 = E2; + if (E <= E1) S1 /* greater than or equal to */ | - if (E >= (E1 = E2)) + E1 = E2; + if (E >= E1) S1 else S2 | - if (E >= (E1 = E2)) + E1 = E2; + if (E >= E1) S1 ) /* This rule is for compound statements where the assignment is on the left.*/ @left@ expression E, E1, E2; statement S1, S2; @@ ( /* and */ - if ((E1 = E2) && E) + E1 = E2; + if (E1 && E) S1 else S2 | - if ((E1 = E2) && E) + E1 = E2; + if (E1 && E) S1 | /* or */ - if ((E1 = E2) || E) + E1 = E2; + if (E1 || E) S1 | - if ((E1 = E2) || E) + E1 = E2; + if (E1 || E) S1 else S2 | /* not equal */ - if ((E1 = E2) != E) + E1 = E2; + if (E1 != E) S1 | - if ((E1 = E2) != E) + E1 = E2; + if (E1 != E) S1 else S2 | /* equal */ - if ((E1 = E2) == E) + E1 = E2; + if (E1 == E) S1 | - if ((E1 = E2) == E) + E1 = E2; + if (E1 == E) S1 else S2 | /* greater */ - if ((E1 = E2) > E) + E1 = E2; + if (E1 > E) S1 | - if ((E1 = E2) > E) + E1 = E2; + if (E1 > E) S1 else S2 | /* less */ - if ((E1 = E2) < E) + E1 = E2; + if (E1 < E) S1 | - if ((E1 = E2) < E) + E1 = E2; + if (E1 < E) S1 else S2 /* lesser than or equal to */ - if ((E1 = E2) <= E) + E1 = E2; + if (E1 <= E) S1 | - if ((E1 = E2) <= E) + E1 = E2; + if (E1 <= E) S1 else S2 /* greater than or equal to */ - if ((E1 = E2) >= E) + E1 = E2; + if (E1 >= E) S1 | - if ((E1 = E2) >= E) + E1 = E2; + if (E1 >= E) S1 else S2 ) *** IFASSIGNMENT.COCCI END *** Signed-off-by: Chi Pham <fempsci@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26staging: lustre: Fix typo in lustre/lnetMasanari Iida1-1/+1
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-07-23staging/lustre: remove HIPQUADPeng Tao1-30/+30
Stephen Rothwell reported below error on powerpc: In file included from drivers/staging/lustre/include/linux/libcfs/libcfs.h:203:0, from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:41: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c: In function 'kiblnd_dev_need_failover': drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h:215:16: error: implicit declaration of function 'NIPQUAD' [-Werror=implicit-function-declaration] static struct libcfs_debug_msg_data msgdata; \ ^ We should just remove HIPQUAD and replace it with %pI4h. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Joe Perches <joe@perches.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-05-14staging: add Lustre file system client supportPeng Tao1-0/+797
Lustre is the most deployed distributed file system in the HPC (High Performance Computing) world. The patch adds its client side support. The code is not very clean and needs to live in drivers/staging for some time for continuing cleanup work. See drivers/staging/lustre/TODO for details. The code is based on Lustre master commit faefbfc04 commit faefbfc0460bc00f2ee4c1c1c86aa1e39b9eea49 Author: Alex Zhuravlev <alexey.zhuravlev@intel.com> Date: Tue Apr 30 23:05:21 2013 +0400 LU-3244 utils: tunefs.lustre should preserve virgin label Plus a few under-review patches on Whamcloud gerrit: 3.8 kernel support: http://review.whamcloud.com/#change,5973 http://review.whamcloud.com/#change,5974 http://review.whamcloud.com/#change,5768 http://review.whamcloud.com/#change,5781 http://review.whamcloud.com/#change,5763 http://review.whamcloud.com/#change,5613 http://review.whamcloud.com/#change,5655 3.9 kernel support: http://review.whamcloud.com/#change,5898 http://review.whamcloud.com/#change,5899 Kconfig/Kbuild: http://review.whamcloud.com/#change,4646 http://review.whamcloud.com/#change,4644 libcfs cleanup: http://review.whamcloud.com/#change,2831 http://review.whamcloud.com/#change,4775 http://review.whamcloud.com/#change,4776 http://review.whamcloud.com/#change,4777 http://review.whamcloud.com/#change,4778 http://review.whamcloud.com/#change,4779 http://review.whamcloud.com/#change,4780 All starting/trailing whitespaces are removed, to match kernel coding style. Also ran scripts/cleanfile on all lustre source files. [maked the Kconfig depend on BROKEN as the recent procfs changes causes this to fail - gregkh] Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>