summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/selftest/framework.c
AgeCommit message (Collapse)Author
2016-08-15lustre: don't reinvent struct bio_vecAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-18staging/lustre: Replace sun.com GPLv2 URL with gnu.org one.Oleg Drokin
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no longer around, so replae it with (hopefully more permanent) http://http://www.gnu.org/licenses/gpl-2.0.html Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-18staging/lustre: Remove the "Please contact SUN for GPL" from headersOleg Drokin
Since SUN is no longer around and there's no point in contacting them, just remove that whole thing. Copy of GPL is available online anyway (URLs to be updated in next patch). This patch was generated with: find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \; Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-26staging: lustre: selftest: convert wire protocol to use structJames Simmons
Change all the wire protocol typedefs to proper structures Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert srpc_msg_t to proper structJames Simmons
Turn typedef struct srpc_msg to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_test_case_t to proper structJames Simmons
Turn typedef sfw_test_case_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_test_unit_t to proper structJames Simmons
Turn typedef sfw_test_unit_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_test_instance_t to proper structJames Simmons
Turn typedef sfw_test_instance_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_test_client_ops_t to proper structJames Simmons
Turn typedef sfw_test_client_ops_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_batch_t to proper structJames Simmons
Turn typedef sfw_batch_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert sfw_session_t to proper structJames Simmons
Turn typedef sfw_session_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert srpc_service_t to proper structJames Simmons
Turn typedef srpc_service_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert srpc_client_rpc_t to proper structJames Simmons
Turn typedef srpc_client_rpc_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert swi_workitem_t to proper structJames Simmons
Turn typedef swi_workitem_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12staging: lustre: selftest: convert srpc_bulk_t to proper structJames Simmons
Turn typedef srpc_bulk_t to proper structure Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11Merge 4.6-rc3 into staging-nextGreg Kroah-Hartman
This resolves a lot of merge issues with PAGE_CACHE_* changes, and an iio driver merge issue. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-04mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macrosKirill A. Shutemov
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. We have many places where PAGE_CACHE_SIZE assumed to be equal to PAGE_SIZE. And it's constant source of confusion on whether PAGE_CACHE_* or PAGE_* constant should be used in a particular case, especially on the border between fs and mm. Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much breakage to be doable. Let's stop pretending that pages in page cache are special. They are not. The changes are pretty straight-forward: - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN}; - page_cache_get() -> get_page(); - page_cache_release() -> put_page(); This patch contains automated changes generated with coccinelle using script below. For some reason, coccinelle doesn't patch header files. I've called spatch for them manually. The only adjustment after coccinelle is revert of changes to PAGE_CAHCE_ALIGN definition: we are going to drop it later. There are few places in the code where coccinelle didn't reach. I'll fix them manually in a separate patch. Comments and documentation also will be addressed with the separate patch. virtual patch @@ expression E; @@ - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ expression E; @@ - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ @@ - PAGE_CACHE_SHIFT + PAGE_SHIFT @@ @@ - PAGE_CACHE_SIZE + PAGE_SIZE @@ @@ - PAGE_CACHE_MASK + PAGE_MASK @@ expression E; @@ - PAGE_CACHE_ALIGN(E) + PAGE_ALIGN(E) @@ expression E; @@ - page_cache_get(E) + get_page(E) @@ expression E; @@ - page_cache_release(E) + put_page(E) Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-28staging: lustre: cleanup comment style for lnet selftestJames Simmons
Apply a consistent style for comments in the lnet selftest code. Realign some of the comments to make it easier to read. This also fixes a few checkpatch issues as well. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: lustre: Correct missing newline for CERROR call in ↵James Nunez
sfw_handle_server_rpc This is one of the fixes broken out of patch 10000 that was missed in the merger. With this fix the CERROR called in sfw_handle_server_rpc will print out correctly. Signed-off-by: James Nunez <james.a.nunez@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4871 Reviewed-on: http://review.whamcloud.com/10000 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Cliff White <cliff.white@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: lustre: fix aligments in lnet selftestJames Simmons
Some aligment issues were not caught by checkpatch. We address them here. Some of the alignment issues caused greater than 80 character checkpatch issues. Some changes were done to just make the code more readable and to match our production code. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: lustre: report minimum of two buffers for LNet selftest load testJames Simmons
The minimum number reserve buffer for lnet selftest load test is two not one. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: lustre: filter remaining extra spacing for lnet selftestJames Simmons
This patch is a result of a filter applied to the lnet selftest code to remove the last bits of hidden white spaces. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: lustre: remove extra spacing when setting variable for lnet selftestJames Simmons
Remove any extra spacing for the lines of code setting variables to some value. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: lustre: remove returns in void function for lnet selftestJames Simmons
No reason to have returns at end of void function. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12Staging: lustre: lnet: Use list_first_entry_or_nullBhumika Goyal
This patch replaces list_empty and list_entry with list_first_entry_or_null. Done using coccinelle: @@ expression e1,e2; statement S; @@ - if(!list_empty(...)){ e2= - list_entry(e1.next, + list_first_entry_or_null(&e1, ...); + if(e2){ ... } Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-08staging: lustre: Correct missing newlineJames Nunez
Several error messages are missing newline characters at the end of the message. Newlines are added where necessary and other minor corrections; no punctuation at the end of an error message, add a return code to the end of error messages, device name at the beginning, etc. There are just a couple of places where newlines are removed and this is only in LDLM_DEBUG_NOLOCK. The definition of LDLM_DEBUG_NOLOCK already has a newline in it and resulted in double newlines printed. Signed-off-by: James Nunez <james.a.nunez@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4871 Reviewed-on: http://review.whamcloud.com/10000 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Cliff White <cliff.white@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-08staging: lustre: fix 'data race condition' issue in framework.cSebastien Buisson
Fix 'data race condition' defects found by Coverity version 6.5.0: Data race condition (MISSING_LOCK) Accessing variable without holding lock. Elsewhere, this variable is accessed with lock held. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744 Reviewed-on: http://review.whamcloud.com/6568 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-02Staging: lustre: lnet: Remove and rename struct typedefsBhumika Goyal
Remove typedefs from structures stt_timer_t and lst_ping_data_t as typedef for a structure type is not preferred. The suffix '_t' and the typedefs are removed using coccinelle. Script 1: //Drop typedefs and '_t' @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t": coccinelle.T2 = T[:-2]; print T else: coccinelle.T2=T; @@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; Script 2: //Replacement @@ typedef stt_timer_t; typedef lst_ping_data_t; @@ ( - stt_timer_t + struct stt_timer | - lst_ping_data_t + struct lst_ping_data ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-02staging: lustre: fix framework.c issues found by Klocwork Insight toolDmitry Eremin
The functions sfw_test_buffers() and sfw_unload_test() from LNet selftest both assume sfw_test_instance_t being passed in is never null. This is corrected here. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9386 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-23staging: lustre: make some lnet functions staticFrank Zago
Some functions and variables are only used in their C file, so reduce their scope. This reduces the code size, and fixes sparse warnings such as: warning: symbol 'proc_lnet_routes' was not declared. Should it be static? warning: symbol 'proc_lnet_routers' was not declared. Should it be static? Some prototypes were removed from C files and added to the proper header. Signed-off-by: Frank Zago <fzago@cray.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396 Reviewed-on: http://review.whamcloud.com/12206 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: lustre: fix all conditional comparison to zero in LNet layerJames Simmons
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-15staging: lustre: fix all NULL comparisons in LNet layerJames Simmons
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-15staging: lustre: align all code properly for LNet coreJames Simmons
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-15staging: lustre: format properly all comment blocks for LNet coreJames Simmons
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-11-16Staging: lustre: lnet: Remove typedef srpc_server_rpc_tShraddha Barke
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for srpc_server_rpc_t. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: lustre: remove multiple blank linesMike Rapoport
Fixes checkpatch.pl CHECK:LINE_SPACING: Please don't use multiple blank lines. The patch is generated using checkpatch.pl --fix-inplace: for f in $(find drivers/staging/lustre/ -type f) ; do ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=multiple \ --fix-inplace -f $f done Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging/lustre: use 64-bit time for selftestArnd Bergmann
The lustre selftest code has multiple time stamps that are kept as 'time_t' or 'unsigned long' and can therefore overflow on 32-bit systems. This changes the code to use time64_t instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging/lustre: use jiffies_to_*() instead of cfs_duration_usecArnd Bergmann
The cfs_duration_usec() function has a timeval as its output, which we want to avoid in general because of the y2038 problem. There are only two locations remaining in lustre, so we can for now replace one with jiffies_to_timeval(), which is a generic kernel function that does the same thing, the other can just use jiffies_to_usecs() and completely avoid the timeval. This is not a full solution yet, but it's a small step that lets us build a larger portion of lustre without this reference to timeval in a header file, and avoid triggering automated checking tools that wants to warn about timeval. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08Staging: lustre/lnet/selftest: framework.c: Fixed coding style issuesDaniel Machon
Fixed coding style issues where statement should be on the next line Signed-off-by: Daniel Machon <dmachon.dev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: lustre: lnet: selftest: code cleanup - variable spacing, indentationMike Shuey
Unify spacing in variable declarations, and align indentation in headers. General whitespace cleanups. Signed-off-by: Mike Shuey <shuey@purdue.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26Staging: lustre: Deleted space prohibited between function name and open ↵Melike Yurtoglu
parenthesis WARNING: space prohibited between function name and open parenthesis '(' Remove unnecessary space between function name and opening parenthesis. That was found by running checkpatch Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: lustre: selftest: fix sfw_deactivate_session context imbalanceJeremiah Mahler
Fix the sparse warning about a context imbalance in the sfw_deactivate_session function by telling sparse that it should expect the lock to be held on entry and held on exit. drivers/staging/lustre/lnet/selftest/framework.c:210:9: warning: context imbalance in 'sfw_deactivate_session' - unexpected unlock Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: lustre: selftest: fix "not declared" by declaring staticJeremiah Mahler
Fix several "symbol '...' was not declared" sparse warnings for variables which are only used locally by declaring them static. Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-23staging: lustre: Coalesce string fragmentsJoe Perches
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-10-29staging:lustre:lnet:selftest: fix sparse warningsAnton Saraev
Fix sparse warnings: symbol X was not declared. Should it be static? Some functions used only in files where they are declared. They can be static. Signed-off-by: Anton Saraev <antonysaraev@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 ↵Greg Donald
line errors 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-08-30drivers: staging: lustre: Fix space required before the open parenthesis '(' ↵Greg Donald
errors Fix checkpatch.pl space required before the open parenthesis '(' errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13staging: lustre: remove LPU64 defineGreg Kroah-Hartman
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-12staging: lustre: remove cfs_time_current_sec wrapperGreg Kroah-Hartman
Just call get_seconds() directly. 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-06-18staging: lustre: remove memset(0) after LIBCFS_ALLOCVitaly Osipov
Joe Perches mentioned on driverdev-devel that memset after LIBCFS_ALLOC is not necessary as it is already done during LIBCFS_ALLOC_POST. This commit removes these unnecessary memsets. Based on the results of running a cocci patch along the lines of: @@ expression E1, E2; @@ LIBCFS_ALLOC (E1,E2); ... - memset(E1,0,E2); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>