- 02 Mar, 2016 40 commits
-
-
Frank Zago authored
This fixes sparse warnings such as: .../o2iblnd.c:424:1: warning: symbol 'kiblnd_get_peer_info' was not declared. Should it be static? This reduces the code size by 400 bytes. The body of "the_o2iblnd" was moved at the end of the file, to avoid having to declare some static prototypes. 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/11255Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
LNet is an abstraction built on top of network APIs such as infiniband or TCP/IP layer. Since LNet is dependent on these other layers we should ensure LNet headers should always come after the infiniband header since the infiniband headers can influence the LNet header definitions. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5140 Reviewed-on: http://review.whamcloud.com/10571Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Shuichi Ihara <sihara@ddn.com> Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Eremin authored
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/9386Reviewed-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>
-
Dmitry Eremin authored
The function lst_test_add_ioctl is always copying lstio_tes_param from userland even if the user doesn't send this data to LNet selftest. Only consider lstio_tes_param data if lstio_tes_param_len is not zero. 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/9386Reviewed-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>
-
Dmitry Eremin authored
Pointer 'ni' checked for NULL at line 1569 may be passed to function and may be dereferenced there by passing argument 1 to function 'lnet_ni_notify_locked' at line 1621. 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/9386Reviewed-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>
-
Dmitry Eremin authored
Null pointer 'best_iface' that comes from line 802 may be dereferenced at line 832. 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/9386Reviewed-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>
-
James Simmons authored
Currently the socklnd driver doesn't support CPT affinity for its peers. Binding peers to a specific CPT and memory allocated to the NUMA node belonging to the CPT should give a performance boost. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7245 Reviewed-on: http://review.whamcloud.com/16710Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jian Yu authored
On some customers' systems, the kernel was compiled with HZ defined to 100, instead of 1000. This improves performance for HPC applications. However, to use these systems with Lustre, customers have to re-build Lustre for the kernel because Lustre directly uses the defined constant HZ. Since kernel 2.6.21, some non-HZ dependent timing APIs become non- inline functions, which can be used in Lustre codes to replace the direct HZ access. These kernel APIs include: jiffies_to_msecs() jiffies_to_usecs() jiffies_to_timespec() msecs_to_jiffies() usecs_to_jiffies() timespec_to_jiffies() And here are some samples of the replacement: HZ -> msecs_to_jiffies(MSEC_PER_SEC) n * HZ -> msecs_to_jiffies(n * MSEC_PER_SEC) HZ / n -> msecs_to_jiffies(MSEC_PER_SEC / n) n / HZ -> jiffies_to_msecs(n) / MSEC_PER_SEC n / HZ * 1000 -> jiffies_to_msecs(n) This patch replaces the direct HZ access in lnet module. Signed-off-by: Jian Yu <jian.yu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5443Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
In the original code change when libcfs_sock_accept() was made into lnet_sock_accept() a call to set_current_state(TASK_INTERRUPTIBLE) got dropped which was restored. For upstream this is an optimization of calling init_waitqueue_entry() only if accept() return -EAGAIN. Also we can remove setting the task to TASK_RUNNING that is not needed. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6407 Reviewed-on: http://review.whamcloud.com/14265Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sebastien Buisson authored
Fix 'copy into fixed size buffer' defects found by Coverity version 6.0.3: Copy into fixed size buffer (STRING_OVERFLOW) The fixed-size string might be overrun by copying without checking the length. Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2074 Reviewed-on: http://review.whamcloud.com/4154Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alyona Romanenko authored
the offset in hash table is overflowed for no wildcard portal. The offset for no wildcard has been corrected as for wildcard in the LU-1622 Signed-off-by: Alyona Romanenko <alyona.romanenko@seagate.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7774 Reviewed-on: http://review.whamcloud.com/18422Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Olaf Weber authored
In lnet_ptl_match_delay() we check msg->msg_rx_delayed to see whether the message has been added to the delay queue. But this check is done after lnet_ptl_unlock() and lnet_res_unlock(), and the message can be processed and freed before the check. Replace the check with checking rc against LNET_MATCHMD_NONE, which is how the callers of lnet_ptl_match_delay() know whether the message was added to the delay queue. To make this work we reset rc in the loop when there was no match and the message hasn't been delayed. In addition reorganize the code and add comments to clarify the logic. In lnet_ptl_match_md() a similar msg->msg_rx_delayed is replaced for the same reason. Signed-off-by: Olaf Weber <olaf@sgi.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7324 Reviewed-on: http://review.whamcloud.com/17840Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Li Xi authored
When setting TBF rules of jobid, parse_nidrange() prints warning messages. However, this is unnecessary and annoying since paring a TBF rule will always try to parse the jobid like a nid. Signed-off-by: Li Xi <lixi@ddn.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7647 Reviewed-on: http://review.whamcloud.com/17916Reviewed-by: Emoly Liu <emoly.liu@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
It is consider bad style in the linux kernel to return -1 or a positive number for an error. Instead return the appropriate error codes. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: http://review.whamcloud.com/17626Reviewed-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amir Shehata authored
Since the # of hops is not a mandatory parameter the LU-6060 patch will cause problems to already existing systems since it changes the behavior by which a route is determined down. To fix this case the # of hops now defaults to LNET_UNDEFINED_HOPS if no hop count is specified. LNET_UNDEFINED_HOPS is defined to ((__u32)-1). When it's printed as %d, it displays as -1. __u32 is used through out the call stack for hop count to explicitly define the size of the hop count and to avoid any sizing issues when passing data to and from the kernel. To keep existing behavior both lnet_compare_routes() and LNetDist() will treat undefined hop count as hop count 1. When executing the logic in lnet_parse_rc_info() there is no longer an assumption that the default hop count is 1. If the hop count is 1 then it must've been explicitly set by the user. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6851 Reviewed-on: http://review.whamcloud.com/15719Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Liang Zhen authored
When lnet_parse_put calls lnet_ptl_match_md, this function can attach current message on the delayed list if there is no match. It means this message can be taken over and freed by another thread who is posting new MD, then it is not safe for caller of lnet_parse_put to check this message again. This patch fixes this issue by adding a local variable "ready_delay" to store corresponding status of lnet_msg, so lnet doesn't need to check the message again if lnet_ptl_match_md returned MATCH_NONE for it. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7324 Reviewed-on: http://review.whamcloud.com/17065Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Liang Zhen authored
lnet_route_t::lr_downis is marked as zero even if there is no NI to target network, this is wrong and breaks logic of ARF. This patch fixes this problem. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6060 Reviewed-on: http://review.whamcloud.com/13417Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
commit 020ecc6f ("staging: lustre: llite: Remove IS_ERR tests") managed to break one of the converted checks by losing a dereference causing the condition to be wrong and hence leading to a crash later on in case of actual error. IS_ERR_OR_NULL(*inode) got converted into !inode. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> CC: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
This reverts commit caa88c26. Turns out that Alpha doesn't define these values :( Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amitoj Kaur Chawla authored
Remove is_tcp_ack_filter() which only returns the value of boolean variable `enabled` by replacing the only call site with the variable `enabled` itself. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tony Cho authored
This patch removes the unused functions anymore related to the configuration of the bus interface clock speed. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bhaktipriya Shridhar authored
Variables pcgroup_encrypt_val,pccipher_group,pcwpa_version, hold different values at different stages of the execution of connect(), however they are not being used anywhere. Hence, the unused variables have been removed. This was done using Coccinelle. @@ type T; identifier i; constant c; @@ -T i; <... when != i -i = c; ...> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
This patch removes the checkpatch.pl warning: else is not generally useful after a break or return Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alison Schofield authored
The function that sent this message id was previously removed. Finish the cleanup by removing the call to the message handler, the message handler, and the #define. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alison Schofield authored
The function that sent this message id was previously removed. Finish the cleanup by removing the call to the message handler, the message handler, and the #define. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alison Schofield authored
The function that sent this message id was previously removed. Finish the cleanup by removing the call to the message handler, the message handler, and the #define. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alison Schofield authored
The function that sent this message id was previously removed. Finish the cleanup by removing the call to the message handler, the message handler, the #define, and the link_speed var. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alison Schofield authored
The function that sent this message id was previously removed. Finish the cleanup by removing the call to the message handler, the message handler, the #define, and the channel var. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sandhya Bankar authored
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bhumika Goyal authored
The memory allocation functions generates a call stack containing all the context information on failure, so print statements can be removed on failure of these functions. Also remove unwanted {} around if block after removal of these statements. Done using coccinelle: @@ expression e,e1,e2; identifier x; @@ e=\(kmalloc\|kmalloc_array\|kzalloc\| devm_kzalloc\)(...); ...when!=e=e1 if(!e) -{ - \(printk\|DBG_8723A\|pr_err\|CERROR\|DBG_88E\)(...); ( goto x; | return e2; | return; ) -} Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sandhya Bankar authored
Remove int typecast of offsetof(). As per below coccinelle rule: @@ type T; expression E; @@ - (int)(offsetof(T,E)) + offsetof(T,E) Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Janani Ravichandran authored
Use list_entry() rather than container_of() for nodes of doubly linked lists. Semantic patch used: @A exists@ identifier var; struct list_head *ptr; @@ var = - container_of + list_entry (ptr, ...); Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anchal Jain authored
Remove space and use tabs for indent the code. Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tapan Prakash T authored
Fixed checkpatch.pl warning 'Block comments use * on subsequent lines' Signed-off-by: Tapan Prakash T <tapanprakasht@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tapan Prakash T authored
Fixed checkpatch.pl warning space prohibited between function name and open parenthesis '(' Signed-off-by: Tapan Prakash T <tapanprakasht@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
M. Vefa Bicakci authored
This commit corrects two sparse warnings caused by the lack of a __user annotation for the third argument of the libcfs_ioctl_handle function. module.c:165:68: warning: incorrect type in argument 1 (different address spaces) module.c:165:68: expected void [noderef] <asn:1>*arg module.c:165:68: got void *arg module.c:209:47: warning: incorrect type in argument 3 (different address spaces) module.c:209:47: expected void *arg module.c:209:47: got void [noderef] <asn:1>*arg The need to have the __user annotation is supported by the fact that libcfs_ioctl_handle passes its third argument to a helper function (libcfs_ioctl_popdata) which also has a __user annotation for its corresponding argument. Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
M. Vefa Bicakci authored
This commit corrects the following sparse warning regarding a file_operations structure being non-static and constifies the structure in question as well. warning: symbol 'lprocfs_stats_seq_fops' was not declared. Should it be static? Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bhaktipriya Shridhar authored
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>
-
Andreas Dilger authored
The documentation about the return values for lnet_lib_init and lnet_lib_exit was in the old style format. Bring it in sync with the rest of the LNet core. Broken out of patch 16787. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204 Reviewed-on: http://review.whamcloud.com/16787Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andreas Dilger authored
Make the name of the module_init()/_exit() functions consistently {module_name}_init and {module_name}_exit. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204 Reviewed-on: http://review.whamcloud.com/16787Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-