aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-05-09staging: unisys: visorinput: handle_locking_key() simplificationsTim Sell1-11/+7
By directly returning for the error-case, a test was eliminated. Also, the old_state variable was removed as it was not necessary, and some redundant parens were removed. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: visorhba: fail gracefully for thread creation failuresTim Sell1-26/+28
Previously, if visorhba ever failed to create its thread, it would have subsequently attempted to do a kthread_stop() on an invalid task_struct pointer. This was fixed via the new visor_thread_stop() function, which validates the task_struct pointer before doing the kthread_stop(). Also, the other thread-related fields in visor_thread_info (has_stopped and id) were not being used, so visor_thead_info was just removed. We also now spit out an error message if thread creation fails. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: visornic: comment restructuring and removing bad dictionErik Arfvidson1-94/+58
The purpose of this patch is to clean up commenting and making the code with comments be pleasant to eyes. Also make commenting be consistent throughout the file. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: fix format string %Lx to %llx for u64Erik Arfvidson1-5/+5
this patch fixes the following sonarqube issue. %Lx in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long long' Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: remove unused struct membersErik Arfvidson1-6/+0
The following struct members were never used: putfile_active_buffer::pnext putfile_request::file_request_number putfile_request::data_sequence_number Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: visorchannel: correct variable misspellingDavid Binder1-1/+1
Fixes the spelling of a global variable passed into a kernel macro. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: unisys: visorhba: replace functionlike macro with functionAlexander Curtin2-46/+22
The `set_no_disk_inquiry_request` function now uses the correct min macro. Also I removed an unnecessary conditional. Get rid of u8 casts, u32 len, and u32 lun (which is actually defined as a u64 in the scsidev->lun field from whence it originated). Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com> Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: dgnc: Need to check for NULL of chDaeseok Youn1-1/+1
the "ch" from brd structure could be NULL, it need to check for NULL. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: dgnc: remove redundant condition checkDaeseok Youn1-6/+0
dgnc_board(brd) was already checked for NULL before calling neo_parse_isr(). And also port doesn't need to check. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: dgnc: fix 'line over 80 characters'Daeseok Youn1-9/+11
fix checkpatch.pl warning about 'line over 80 characters'. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: dgnc: clean up the dgnc_get_modem_info()Daeseok Youn1-11/+1
the "ch" in dgnc_get_modem_info() was already checked before calling this function and also if "ch" is not NULL, dgnc_get_mstat() returns valid value so it doesn't need to check an error. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: lnet: enable configuration per NI interfaceAmir Shehata1-0/+42
Add the ability to configure each NI interface at bring up. Also give the ability for user land utilities to query the configuration of each NI interface. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: properly set ibr_whyAmir Shehata1-1/+1
For the case of when the connections supported fragment count is smaller than what is supported locally only set ibr_why to IBLND_REJECT_RDMA_FRAGS if the ko2iblnd protocol verison is IBLND_MSG_VERSION. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: remove last of kiblnd_tunables_finiAmir Shehata1-1/+0
The function kibnd_tunables_fini() no longer exist. Remove it from o2iblnd.h Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: per NI map-on-demand valueAmir Shehata4-73/+125
Enables support of different map-on-demand values per NI. This is required to support OPA coexistence with MLX5 cards. MLX5 does not support FMR, which is enabled via map-on-demand. However OPA's performance is greatly enahanced when FMR is enabled. In order to enable coexistence of both of these two types of cards we need to be able to set different map-on-demand values for both NIs. This patch also lays the ground work for other per NI tunables to be added in future patches. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: use data in lnet_ni_t instead of kiblnd_tunablesAmir Shehata3-34/+34
Currently the ko2iblnd creates a kib_tunable_t stucture to allow the ko2iblnd driver to access the module parameters throught the code. Some of those data fields also exist in lnet_ni_t. Migrate to using the lnet_ni_t data fields instead of kib_tunable_t. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: create default o2iblnd tunable settingsAmir Shehata3-8/+20
Create and set the default o2iblnd tunables when the ko2iblnd module loads. Move kiblnd_tunables_setup() to when the NI iterface is initialized. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: convert macros to inline functionsAmir Shehata4-35/+61
Convert a few macros in o2iblnd.h to inline functions. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: lnet: add per NI configuration structuresAmir Shehata3-1/+33
Currently for LNet all hardware configuration is done with the modprobe configuration file. These settings are applied to all hardware instances for a node. That makes it impossible to configure two different pieces of infiniband hardware that require very different settings to function. Here we introduce the infrastructre to allow applying per interface settings. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: lnet: use struct lnet_ioctl_config_data for NI queryAmir Shehata2-46/+18
The functions used to query the NI state passes around the individual fields of struct lnet_ioctl_config_data. To simplify the code lets just pass struct lnet_ioctl_config directly. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: lnet: use struct lnet_ioctl_config_data for NI bring upAmir Shehata3-25/+24
The LNet layer passes around the individual fields of struct lnet_ioctl_config_data for the case of NI bring up. To simplify the code lets just pass struct lnet_ioctl_config directly. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.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>
2016-05-09staging: lustre: o2iblnd: Add Fast Reg memory registration supportDmitry Eremin3-55/+257
FMR is deprecated and it not supported by the mlx5 driver. This patch adds memory management extensions support as backup of FMR. This was combined with the work from Li Dongyang to make it work with the latest kernels. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: add IBLND_WID_MRDmitry Eremin1-1/+2
We need to add a new error field to be passed with wr_id to handle Fast Registration failures. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: handle unmapping of FMR in kiblnd_fmr_pool_unmapDmitry Eremin2-7/+11
Move FMR unmapping from kiblnd_unmap_tx() to the function kiblnd_fmr_pool_unmap() so kiblnd_unmap_tx() can be used with the Fast Registration API as well. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: cache FMR key in kib_fmr_tDmitry Eremin3-10/+14
Move the FMR key handling from kiblnd_fmr_map_tx() to the function kiblnd_fmr_pool_map(). This will allow the function kiblnd_fmr_map_tx() to handle keys for both FMR and Fast Registration. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: break up kiblnd_create_fmr_poolDmitry Eremin1-14/+41
Break the function kiblnd_create_fmr_pool() into two functions, with the new function called kiblnd_alloc_fmr_pool(). The function kiblnd_create_fmr_pool() will be used as the front end to allocate any type of pool. The new function will used to create specifically FMR pools. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: create union to contain FMRDmitry Eremin2-9/+13
Create an union to contain the FMR pool structure. This is for the preparation of adding handling Fast Registeration support. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: Use list_for_each_entry_safe in kiblnd_destroy_fmr_pool_listDmitry Eremin1-3/+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. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: o2iblnd: rename kib_fmr_pool_tDmitry Eremin1-11/+11
Rename kib_fmr_pool_t named pool to fpo. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5783 Reviewed-on: http://review.whamcloud.com/17606 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
2016-05-09staging: lustre: lov: remove unused lov obd functionsJohn L. Hammond5-67/+0
Remove the unused lov functions lov_get_reqset, lov_check_index_in_pool, and lov_find_pool functions. Remove unused data structures. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/5581 Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: fid: init FID client for OSP on MDT.wang di1-2/+5
Initialize FID client for OSP on MDT. Signed-off-by: wang di <di.wang@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3529 Reviewed-on: http://review.whamcloud.com/7158 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@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>
2016-05-09staging: lustre: ptlrpc: fix nrs cleanupNiu Yawei1-1/+5
When service start failed due to short of memory, the cleanup code could operate on uninitialized structure and cause crash at the end. This patch fix the nrs_svcpt_cleanup_locked() to perform cleanup only on the nrs which has been properly initialized. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3772 Reviewed-on: http://review.whamcloud.com/7410 Reviewed-by: Andreas Dilger <andreas.dilger@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>
2016-05-09staging: lustre: debug: clean up console messagesAndreas Dilger2-4/+2
Clean up overly verbose console error messages, improve others. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1095 Reviewed-on: http://review.whamcloud.com/8617 Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Reviewed-by: Bob Glossman <bob.glossman@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>
2016-05-09staging: lustre: fid: packing ost_idx in IDIFFan Yong2-41/+57
For a normal FID, we can know on which target the related object is allocated via querying FLDB; but it is not true for an IDIF. To locate the OST via the given IDIF, when the IDIF is generated, we pack the OST index in it. Then for any given FID, in spite of t is a normal FID or not, we has the method to know which target it belongs to. That is useful for LFSCK. For old IDIF, the OST index is not part of the IDIF, means that ifferent OSTs may have the same IDIFs, that may cause the IFID in LMA does not match the read FID. Under such case, we need to make some compatible check to avoid to trigger unexpected. tgt_validate_obdo() converts the ostid contained in the RPC body to fid and changes the "struct ost_id" union, then the users can access ost_id::oi_fid directly without call ostid_to_fid() again. It also contains some other fixing and cleanup. Signed-off-by: wang di <di.wang@intel.com> Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3569 Reviewed-on: http://review.whamcloud.com/7053 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: mdt: extra checking for getattr RPC.wang di2-3/+2
Check whether getattr RPC can hold layout MD(RMF_MDT_MD), in case the client sends some invalid RPC, which can cause panic on MDT. Client will retrieve cl_max_md_size/cl_default_md_size from MDS during mount process, so it will initialize cl_max_md_size/cl_default_md_size before sending getattr to MDS. Signed-off-by: wang di <di.wang@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4222 Reviewed-on: http://review.whamcloud.com/8599 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: lov: remove lov and lod stuff from obd.hJohn L. Hammond4-80/+18
Remove QOS related data structures from obd.h to the lov_internal.h. Remove the declarations of several functions that no longer exist. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/8687 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: osc: Allow lock to be canceled at ENQ timeAlexander Boyko2-0/+4
A cl_lock can be canceled when it's in CLS_ENQUEUED state. We can't unuse this kind of lock in lov_lock_unuse() because it will bring this lock into CLS_NEW state and then confuse osc_lock_upcall(). Add a regression test case by Alexander Boyko. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3889 Reviewed-on: http://review.whamcloud.com/8405 Reviewed-by: Bobi Jam <bobijam@gmail.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>
2016-05-09staging: lustre: nfs: don't panic NFS server if MDS fails to find FIDBobi Jam1-5/+8
When MDS fails to retrive the parent's fid, we'd handle it without crashing the NFS server. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3952 Reviewed-on: http://review.whamcloud.com/8459 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: wangdi <di.wang@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>
2016-05-09Merge 4.6-rc7 into staging-nextGreg Kroah-Hartman8-108/+128
This fixes some merge issues with some iio drivers that were found in linux-next. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09Merge 4.6-rc7 into tty-nextGreg Kroah-Hartman8-108/+128
We want the pty fixes in here as well so that patches can build on it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-05staging: mt29f_spinand: set ECC algorithm explicitlyRafał Miłecki1-0/+1
This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to enum nand_ecc_algo). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2016-05-05staging: mt29f_spinand: switch to mtd_ooblayout_opsBoris Brezillon1-18/+30
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops definition. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2016-05-05Merge tag 'v4.6-rc6' into x86/asm, to refresh the treeIngo Molnar8-108/+128
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-05-04treewide: replace dev->trans_start update with helperFlorian Westphal4-7/+7
Replace all trans_start updates with netif_trans_update helper. change was done via spatch: struct net_device *d; @@ - d->trans_start = jiffies + netif_trans_update(d) Compile tested only. Cc: user-mode-linux-devel@lists.sourceforge.net Cc: linux-xtensa@linux-xtensa.org Cc: linux1394-devel@lists.sourceforge.net Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Cc: linux-can@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-04drivers: replace dev->trans_start accesses with dev_trans_startFlorian Westphal2-2/+2
a trans_start struct member exists twice: - in struct net_device (legacy) - in struct netdev_queue Instead of open-coding dev->trans_start usage to obtain the current trans_start value, use dev_trans_start() instead. This is not exactly the same, as dev_trans_start also considers the trans_start values of the netdev queues owned by the device and provides the most recent one. For legacy devices this doesn't matter as dev_trans_start can cope with netdev trans_start values of 0 (they are ignored). This is a prerequisite to eventual removal of dev->trans_start. Cc: linux-rdma@vger.kernel.org Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-03staging: dgnc: Fix a NULL pointer dereferenceDaeseok Youn1-5/+5
The error handling for print_drive after calling tty_alloc_driver() was needed. But there was error handling but too late for this. Error handling code moved after tty_alloc_driver() call. Fixes: 60b3109e5e2d ("staging: dgnc: use tty_alloc_driver instead of kcalloc") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03staging: wilc1000: fix infoleak in wilc_wfi_cfgoperationsKangjie Lu1-0/+1
"mac" is an array allocated in stack without being initialized, and will be sent out via "nla_put". The dump_station() is supposed to initialize the mac address; otherwise, sensitive data in kernel stack will be leaked. To fix this, copy the mac address to it. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller8-108/+128
Conflicts: net/ipv4/ip_gre.c Minor conflicts between tunnel bug fixes in net and ipv6 tunnel cleanups in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-03staging: comedi: mite: tidy up module init/exitH Hartley Sweeten1-2/+1
Move the module_init()/module_exit() so they are in the prefered spot on the line after the function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03staging: comedi: mite: document the remaining exported functionsH Hartley Sweeten2-4/+28
For aesthetics, add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>