]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agostaging: unisys: include: Added kernel-doc for struct visor_driver
Alexander Curtin [Tue, 19 Apr 2016 03:22:01 +0000 (23:22 -0400)]
staging: unisys: include: Added kernel-doc for struct visor_driver

This adds kerneldoc style comments to the visor_driver struct since
it's shared between multiple modules.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
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>
8 years agostaging: unisys: include: remove unused fields from struct visor_driver
Tim Sell [Tue, 19 Apr 2016 03:22:00 +0000 (23:22 -0400)]
staging: unisys: include: remove unused fields from struct visor_driver

The build_date and build_time fields are not used, and have been 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>
8 years agostaging: unisys: Documentation: Remove proc-entries.txt
David Binder [Wed, 13 Apr 2016 20:08:41 +0000 (16:08 -0400)]
staging: unisys: Documentation: Remove proc-entries.txt

Unisys drivers no longer utilize procfs. Therefore, the documentation
for our procfs entries is no longer needed.

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>
8 years agostaging: unisys: added display string size define
Erik Arfvidson [Wed, 13 Apr 2016 16:07:07 +0000 (12:07 -0400)]
staging: unisys: added display string size define

Display string size that is guaranteed to be no longer the 99 characters.

Don't use a magic number throughout the code, define it once and use it
throughout.

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>
8 years agostaging: unisys: visornic: convert BUG_ON to dev_err() message
Tim Sell [Wed, 13 Apr 2016 15:56:36 +0000 (11:56 -0400)]
staging: unisys: visornic: convert BUG_ON to dev_err() message

The caller of visor_copy_fragsinfo_from_skb() is prepared to log a
dev_err() message if it fails (by returning a negative value), so we now
just fail in the one occasion where visor_copy_fragsinfo_from_skb() was
doing a BUG_ON.

There was also a problem before where visor_copy_fragsinfo_from_skb() was
returning a negative to indicate error, yet it was declared to return an
unsigned value!  So obviously that needed correcting too.

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>
8 years agostaging: wilc1000: remove unused variables
Sudip Mukherjee [Thu, 14 Apr 2016 15:18:49 +0000 (20:48 +0530)]
staging: wilc1000: remove unused variables

These variables were havnig the pointer returned by wiphy_priv() but
they were never used.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: Freed memory in case of error
Claudiu Beznea [Sun, 24 Apr 2016 23:07:18 +0000 (02:07 +0300)]
Staging: wilc1000: Freed memory in case of error

This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt()
in case wilc_wlan_txq_add_to_head() fails.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_ip_address
Chaehyun Lim [Tue, 19 Apr 2016 00:35:31 +0000 (09:35 +0900)]
staging: wilc1000: rename result in handle_set_ip_address

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_ip_address
Chaehyun Lim [Tue, 19 Apr 2016 00:35:30 +0000 (09:35 +0900)]
staging: wilc1000: change data type of result in handle_set_ip_address

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_ip_address's return type to void
Chaehyun Lim [Tue, 19 Apr 2016 00:35:29 +0000 (09:35 +0900)]
staging: wilc1000: change handle_set_ip_address's return type to void

When handle_set_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_operation_mode
Chaehyun Lim [Wed, 6 Apr 2016 23:10:43 +0000 (08:10 +0900)]
staging: wilc1000: rename result in handle_set_operation_mode

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_operation_mode
Chaehyun Lim [Wed, 6 Apr 2016 23:10:42 +0000 (08:10 +0900)]
staging: wilc1000: change data type of result in handle_set_operation_mode

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_operation_mode's return type to void
Chaehyun Lim [Wed, 6 Apr 2016 23:10:41 +0000 (08:10 +0900)]
staging: wilc1000: change handle_set_operation_mode's return type to void

When handle_set_operation_mode is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_wfi_drv_handler
Chaehyun Lim [Wed, 6 Apr 2016 23:10:40 +0000 (08:10 +0900)]
staging: wilc1000: rename result in handle_set_wfi_drv_handler

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() function are used as result,
others are used as ret. It will be changed as ret in all handle_*()
function to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_wfi_drv_handler
Chaehyun Lim [Wed, 6 Apr 2016 23:10:39 +0000 (08:10 +0900)]
staging: wilc1000: change data type of result in handle_set_wfi_drv_handler

This patch changes data type of result variable from s32 to int.
result is used to get return value from wilc_send_config_pkt that has
return type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_wfi_drv_handler's return type to void
Chaehyun Lim [Wed, 6 Apr 2016 23:10:38 +0000 (08:10 +0900)]
staging: wilc1000: change handle_set_wfi_drv_handler's return type to void

When handle_set_wfi_drv_handler is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change return type of ret variable in handle_get_tx_pwr
Chaehyun Lim [Wed, 6 Apr 2016 23:10:37 +0000 (08:10 +0900)]
staging: wilc1000: change return type of ret variable in handle_get_tx_pwr

This patch changes return type of ret variable from s32 to int.
ret has return value from wilc_send_config_pkt that has return type of
int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_add_beacon
Chaehyun Lim [Tue, 5 Apr 2016 06:38:32 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_add_beacon

This patch removes unused hif_drv in wilc_add_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_beacon
Chaehyun Lim [Tue, 5 Apr 2016 06:38:31 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_beacon

This patch removes unused hif_drv in wilc_del_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_pmkid_info
Chaehyun Lim [Tue, 5 Apr 2016 06:38:30 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_pmkid_info

This patch removes unused hif_drv in wilc_set_pmkid_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in host_int_get_assoc_res_info
Chaehyun Lim [Tue, 5 Apr 2016 06:38:29 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in host_int_get_assoc_res_info

This patch removes unused hif_drv in host_int_get_assoc_res_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_mac_chnl_num
Chaehyun Lim [Tue, 5 Apr 2016 06:38:28 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_mac_chnl_num

This patch removes unused hif_drv in wilc_set_mac_chnl_num.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_remain_on_channel
Chaehyun Lim [Tue, 5 Apr 2016 06:38:27 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_remain_on_channel

This patch removes unused hif_drv in wilc_remain_on_channel.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_add_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:26 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_add_station

This patch removes unused hif_drv in wilc_add_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:25 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_station

This patch removes unused hif_drv in wilc_del_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_allstation
Chaehyun Lim [Tue, 5 Apr 2016 06:38:24 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_allstation

This patch removes unused hif_drv in wilc_del_allstation.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_edit_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:23 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_edit_station

This patch removes unused hif_drv in wilc_edit_station.
There is no need to checku null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_power_mgmt
Chaehyun Lim [Tue, 5 Apr 2016 06:38:22 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_power_mgmt

This patch removes unused hif_drv in wilc_set_power_mgmt.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_setup_multicast_filter
Chaehyun Lim [Tue, 5 Apr 2016 06:38:21 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_setup_multicast_filter

This patch removes unused hif_drv in wilc_setup_multicast_filter.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_setup_ipaddress
Chaehyun Lim [Tue, 5 Apr 2016 06:38:20 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_setup_ipaddress

This patch removes unused hif_drv in wilc_setup_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in host_int_get_ipaddress
Chaehyun Lim [Tue, 5 Apr 2016 06:38:19 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in host_int_get_ipaddress

This patch removes unused hif_drv in host_int_get_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8Buffer in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:50 +0000 (20:04 +0900)]
staging: wilc1000: rename pu8Buffer in handle_scan

This patch renames pu8Buffer to buffer to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32WidsCount in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:49 +0000 (20:04 +0900)]
staging: wilc1000: rename u32WidsCount in handle_scan

This patch renames u32WidsCount to index to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strWIDList in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:48 +0000 (20:04 +0900)]
staging: wilc1000: rename strWIDList in handle_scan

This patch renames strWIDList to wid_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrHostIFscanAttr in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:47 +0000 (20:04 +0900)]
staging: wilc1000: rename pstrHostIFscanAttr in handle_scan

This patch renames pstrHostIFscanAttr to scan_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename Handle_Scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:46 +0000 (20:04 +0900)]
staging: wilc1000: rename Handle_Scan

This patch renames Handle_Scan to handle_scan to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove block scope braces and fix indentation
Chaehyun Lim [Mon, 4 Apr 2016 11:04:45 +0000 (20:04 +0900)]
staging: wilc1000: remove block scope braces and fix indentation

This patch removes unnecessary block scope braces and fix indentation of
the codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: move Handle_ScanDone function declaration
Chaehyun Lim [Mon, 4 Apr 2016 11:04:44 +0000 (20:04 +0900)]
staging: wilc1000: move Handle_ScanDone function declaration

Handle_ScanDone function declaration is moved to front of
host_interface.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename goto label in handle_cfg_param
Chaehyun Lim [Mon, 4 Apr 2016 11:04:43 +0000 (20:04 +0900)]
staging: wilc1000: rename goto label in handle_cfg_param

This patch changes goto label from ERRORHANDLER to unlock.
unlock is a more meaningful name than ERRORHANDLER.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: adds a check routine when performed del_key()
Leo Kim [Fri, 1 Apr 2016 08:44:19 +0000 (17:44 +0900)]
staging: wilc1000: adds a check routine when performed del_key()

This patch is adds a check routine when performed del_key().
We was find this situation while test the 'rmmod sdio'.
That is received inform a .del_key cmd from cfg80211.
If is not exist wep keys, must be ignore a wilc_remove_wep_key() function.
Thus, adds a check routine that key length of wep.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: adds a cfg80211_disconnected() function
Leo Kim [Fri, 1 Apr 2016 08:44:18 +0000 (17:44 +0900)]
staging: wilc1000: adds a cfg80211_disconnected() function

This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: add set to null after release firmware
Leo Kim [Fri, 1 Apr 2016 08:44:17 +0000 (17:44 +0900)]
staging: wilc1000: add set to null after release firmware

This patch add set to null after release firmware.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: removes unnecessary test code
Leo Kim [Fri, 1 Apr 2016 08:44:16 +0000 (17:44 +0900)]
staging: wilc1000: removes unnecessary test code

This patch removes unnecessary test code that mac address hardcoding setting.
This test code is support to old firmware.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: txq_thread_started: replaces a semaphore with a completion
Leo Kim [Fri, 1 Apr 2016 08:44:15 +0000 (17:44 +0900)]
staging: wilc1000: txq_thread_started: replaces a semaphore with a completion

This patch replaces a semaphore(txq_thread_started) with a completion.
Struct semaphore txq_thread_started is used to signal completion of txq thread.
It is better to use completion than semaphore for this case.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: removes duplicate del_timer_sync
Leo Kim [Fri, 1 Apr 2016 08:44:14 +0000 (17:44 +0900)]
staging: wilc1000: removes duplicate del_timer_sync

This patch removes del_timer_sync(&periodic_rssi) which was
already performed this action.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: changes logic when happened mq_send fail
Leo Kim [Fri, 1 Apr 2016 08:44:13 +0000 (17:44 +0900)]
staging: wilc1000: changes logic when happened mq_send fail

This patch changes logic when happened mq_send fail.
The check as a result value that mq_send fail.
But, regardless of the result value then perform a semaphore up.
That is an occur that semaphore locking.
Add to 'else' routine and move to 'else' position a semaphore up.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: quiet overly verbose info message
Andreas Dilger [Thu, 28 Apr 2016 16:07:38 +0000 (12:07 -0400)]
staging: lustre: llite: quiet overly verbose info message

The client doesn't need to print a message for every client mount that
the layout lock feature is enabled.  This can be found at runtime via
the "import" proc file.

I also noticed that deleting OST objects logs into the debug log with
D_HA status, which is enabled by default.  Move this over to D_INODE
so it doesn't fill the OST debug logs.

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/7918
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@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>
8 years agostaging: lustre: debugfs: improve osc/mdc "imports" connect data
Emoly Liu [Thu, 28 Apr 2016 16:07:37 +0000 (12:07 -0400)]
staging: lustre: debugfs: improve osc/mdc "imports" connect data

Improve /sys/debug/fs/lustre/{osc,mdc}/*/import files to print
the struct obd_connect_data data fields as "connect_data:"
in addition to the "connect_flags:" field.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3386
Reviewed-on: http://review.whamcloud.com/6588
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: add case LCFG_PARAM to osd_process_config
Emoly Liu [Thu, 28 Apr 2016 16:07:36 +0000 (12:07 -0400)]
staging: lustre: obd: add case LCFG_PARAM to osd_process_config

Some proc parameters were moved from ofd to osd module and only
their symlinks were kept in ofd for interoperability/compatibility.
To process this kind of config params passed by ofd, this patch is
to do the following fixes:

 - since these parameters are not included by the static lprocfs var
   list, a pre-check is added for them to avoid "unknown param" error
   message confuses the uses. If they are matched in this check, they
   will be passed to the osd directly.
 - improve the error messages in class_process_proc_param() and
   class_process_proc_seq_param() a little.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4221
Reviewed-on: http://review.whamcloud.com/8238
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>
8 years agostaging: lustre: ldlm: dont always check max_pages_per_rpc alignement
Sebastien Buisson [Thu, 28 Apr 2016 16:07:35 +0000 (12:07 -0400)]
staging: lustre: ldlm: dont always check max_pages_per_rpc alignement

If connection is not established yet, cli->cl_chunkbits is
uninitilized so we cannot use it to check max_pages_per_rpc
alignment.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4379
Reviewed-on: http://review.whamcloud.com/8558
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fld: add local fldb to each target
wang di [Thu, 28 Apr 2016 16:07:34 +0000 (12:07 -0400)]
staging: lustre: fld: add local fldb to each target

Add local FLDB to each MDT, so OSD/OUT can check whether
FID is remote by looking up local FLDB, i.e. no need send RPC
to MDT0. This is just the client part of the work.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4076
Reviewed-on: http://review.whamcloud.com/7884
Reviewed-by: John L. Hammond <john.hammond@intel.com>
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>
8 years agostaging: lustre: brw: added OBDO short io flag
Alexander Boyko [Thu, 28 Apr 2016 16:07:33 +0000 (12:07 -0400)]
staging: lustre: brw: added OBDO short io flag

To prevent collisions with any future flags needed in features written
against this branch.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1757
Xyratex-bug-id: MRP-1460
Reviewed-on: http://review.whamcloud.com/8182
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: echo: remove echo_env_info() regions from echo_client.c
John L. Hammond [Thu, 28 Apr 2016 16:07:32 +0000 (12:07 -0400)]
staging: lustre: echo: remove echo_env_info() regions from echo_client.c

This function declartion is not needed so remove it.

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/5580
Reviewed-by: James Simmons <uja.ornl@gmail.com>
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>
8 years agostaging: lustre: debug: initialize debug_msg_data if needed
Oleg Drokin [Thu, 28 Apr 2016 16:07:31 +0000 (12:07 -0400)]
staging: lustre: debug: initialize debug_msg_data if needed

initialize the libcfs_debug_msg_data only if needed

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1408
Reviewed-on: http://review.whamcloud.com/8338
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: llite: fixup return value ll_direct_IO_26
Dmitry Eremin [Thu, 28 Apr 2016 01:37:21 +0000 (21:37 -0400)]
staging: lustre: llite: fixup return value ll_direct_IO_26

Return the correct values from ll_direct_IO_26.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4069
Reviewed-on: http://review.whamcloud.com/8080
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@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>
8 years agostaging: lustre: ptlrpc: initialize request session early
Mikhail Pershin [Thu, 28 Apr 2016 01:37:20 +0000 (21:37 -0400)]
staging: lustre: ptlrpc: initialize request session early

Initialize request session early to make it available in
high-priority handlers

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-on: http://review.whamcloud.com/7350
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
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>
8 years agostaging: lustre: llog: we don't need vfsmount
Lai Siyao [Thu, 28 Apr 2016 01:37:19 +0000 (21:37 -0400)]
staging: lustre: llog: we don't need vfsmount

The patch for LU-3286 removed vfsmount instances used
on the server side. Since this is server side only we
can remove it from the upstream client.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3286
Reviewed-on: http://review.whamcloud.com/8286
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jian Yu <jian.yu@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>
8 years agostaging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler
Swapnil Pimpale [Thu, 28 Apr 2016 01:37:18 +0000 (21:37 -0400)]
staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler

ll_dir_filler() now checks the returned pointer from
ll_prep_md_op_data() using IS_ERR()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4082
Reviewed-on: http://review.whamcloud.com/8073
Reviewed-by: Dmitry Eremin <dmitry.eremin@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>
8 years agostaging: lustre: llite: debugging for ll_file_open LASSERT
Andreas Dilger [Thu, 28 Apr 2016 01:37:17 +0000 (21:37 -0400)]
staging: lustre: llite: debugging for ll_file_open LASSERT

Add debugging for LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF)
in ll_file_open(), since this is a rarely hit failure under racer,
and it would be useful to get more information if this is hit
again.  Print the full intent disposition, as well as the status,
in case Oleg's earlier comment about bailing out on any error is
actually the case here.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1993
Reviewed-on: http://review.whamcloud.com/6250
Reviewed-by: Bob Glossman <bob.glossman@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>
8 years agostaging: lustre: libcfs: Fix NUMA emulated mode
Andriy Skulysh [Thu, 28 Apr 2016 01:37:16 +0000 (21:37 -0400)]
staging: lustre: libcfs: Fix NUMA emulated mode

Kernel commit c1c3443c9c5e9be92641029ed229a41563e44506
assigns all allowed cpus to emulated node.

End cpt initialization loop when all CPUs are assigned.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3992
Reviewed-on: http://review.whamcloud.com/7724
Reviewed-by: Liang Zhen <liang.zhen@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>
8 years agostaging: lustre: fid: add a connect flag for open by FID
Lai Siyao [Thu, 28 Apr 2016 01:37:15 +0000 (21:37 -0400)]
staging: lustre: fid: add a connect flag for open by FID

Add OBD_CONNECT_OPEN_BY_FID for open by FID, if MDS supports this,
for open by FID, it won't retry with name if object with the FID
doesn't exist; while if client supports this, client won't pack
name in open request if FID is known.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond <john.hammond@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>
8 years agostaging: lustre: obd: cleanup client import if client_obd_setup fails
Swapnil Pimpale [Thu, 28 Apr 2016 01:37:14 +0000 (21:37 -0400)]
staging: lustre: obd: cleanup client import if client_obd_setup fails

client_obd_setup() allocates an obd_import which should be cleaned up
if there is any failure afterwards in callers of client_obd_setup().
This patch fixes the bug in osc_setup(), mgc_setup(), mdc_setup() and
lwp_setup(). The fix is to call obd_cleanup_client_import() before
calling client_obd_cleanup() in case of an error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3810
Reviewed-on: http://review.whamcloud.com/7561
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@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>
8 years agostaging: lustre: ldlm: check all errors during ldlm_debugfs_setup()
Dmitry Eremin [Thu, 28 Apr 2016 01:37:13 +0000 (21:37 -0400)]
staging: lustre: ldlm: check all errors during ldlm_debugfs_setup()

Fix ignoring errors from ldebugfs_add_vars() function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3885
Reviewed-on: http://review.whamcloud.com/8115
Reviewed-by: John L. Hammond <john.hammond@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>
8 years agostaging: lustre: ptlrpc: use unified handler for OST requests
Mikhail Pershin [Thu, 28 Apr 2016 01:37:12 +0000 (21:37 -0400)]
staging: lustre: ptlrpc: use unified handler for OST requests

Switch OST/OFD request processing to the unified request
handle.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-on: http://review.whamcloud.com/7130
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>
8 years agostaging: lustre: obd: add newline for dumped config record
Amir Shehata [Thu, 28 Apr 2016 01:37:11 +0000 (21:37 -0400)]
staging: lustre: obd: add newline for dumped config record

The function class_config_parse_rec() parses the llog record
and places it into a buffer to be returned. That buffer needs
to end with a newline which is currently missing.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2149
Reviewed-on: http://review.whamcloud.com/4254
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@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>
8 years agostaging: lustre: obd: remove newline from LCONSOLE string
Amir Shehata [Thu, 28 Apr 2016 01:37:10 +0000 (21:37 -0400)]
staging: lustre: obd: remove newline from LCONSOLE string

Remove the newline from the LCONSOLE debug macro in the
function class_config_dump_handler().

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2149
Reviewed-on: http://review.whamcloud.com/4254
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@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>
8 years agostaging: lustre: ptlrpc: quiet warning for 2.1/2.5 connections
Andreas Dilger [Wed, 27 Apr 2016 22:21:07 +0000 (18:21 -0400)]
staging: lustre: ptlrpc: quiet warning for 2.1/2.5 connections

The Lustre 2.5.4 client will print a warning about connections with
2.1.3 servers, yet they are still supposed to be interoperable.
Increase the window of warning to be up to Lustre 2.5.50, since we
do not intend to allow interoperability between 2.1 and 2.6 systems.
This was from the time when major releases like Lustre 1.4 and 1.8
were many years apart would have no chance for interoperation.

Only print this message once per client, to avoid flooding the console
for connections to many servers or frequent network reconnections.
Server versions should all be nearly the same in any case.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2528
Reviewed-on: http://review.whamcloud.com/7916
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@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>
8 years agostaging: lustre: osc: Use SOFT_SYNC to urge server commit
Prakash Surya [Wed, 27 Apr 2016 22:21:06 +0000 (18:21 -0400)]
staging: lustre: osc: Use SOFT_SYNC to urge server commit

This change adds a BRW page flag, OBD_BRW_SOFT_SYNC. This flag is
intended to urge a server to commit a client's unstable pages to
stable storage. A client will add this flag to any BRW requests while
it is in a state where it has "many" unstable pages pinned in its cache.

The server, upon receiving a page with this flag set, *should* begin
an async commit. The idea being that, with the proactive async commit,
the client's pinned unstable pages will transition into a stable state
faster than they would have otherwise. Although, the server side portion
of this agreement is still unimplemented, so the OBD_BRW_SOFT_SYNC flag
will currently fall on deaf ears.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2139
Reviewed-on: http://review.whamcloud.com/4375
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: osc: Track number of "unstable" pages per osc
Prakash Surya [Wed, 27 Apr 2016 22:21:05 +0000 (18:21 -0400)]
staging: lustre: osc: Track number of "unstable" pages per osc

This change adds simple accounting hooks for "unstable" pages on a per
OSC basis. Now, in addition to the per filesystem tracking, each OSC
will maintain a running total of its unstable pages. These counters are
exported through the proc interface, and can be read using the lctl
command.

For example:

# Read number of unstable pages contained by each OSC
lctl get_param osc.*.unstable_stats

The motivation for this change is in anticipation of implementing a
"soft sync" functionality, urging servers to commit these unstable
pages to stable storage. The per OSC accounting allows a client to
limit the soft sync request to only the OSCs which have outstanding
unstable pages.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2139
Reviewed-on: http://review.whamcloud.com/4374
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
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>
8 years agostaging: lustre: osc: Track and limit "unstable" pages
Prakash Surya [Wed, 27 Apr 2016 22:21:04 +0000 (18:21 -0400)]
staging: lustre: osc: Track and limit "unstable" pages

This change adds a global counter to track the number of "unstable"
pages held by a given client, along with per file system counters. An
"unstable" page is defined as a page which has been sent to the server
as part of a bulk request, but is uncommitted to stable storage.

In addition to simply tracking the unstable pages, they now also count
towards the maximum number of "pinned" pages on the system at any given
time. Thus, a client will now be bound on the number of dirty and
unstable pages it can pin in memory. Previously only dirty pages were
accounted for in this limit.

In addition to tracking the number of unstable pages in Lustre, the
NR_UNSTABLE_NFS memory zone is also incremented and decremented for
easy monitoring using the "NFS_Unstable:" field in /proc/meminfo.
This field is also used internally by the kernel to limit the total
amount of unstable pages on the system.

The motivation for this change is twofold. First, the client must not
allow itself to disconnect from an OST while still holding unstable
pages. Otherwise, these unstable pages can get lost due to an OST
failure, and replay is not possible due to the disconnect via unmount.

Secondly, the client needs a mechanism to prevent it from allocating too
much of its available RAM to unreclaimable pages pinned by the ptlrpc
layer. If this case occurs, out of memory events can trigger as a side
effect, which we need to avoid.

The current number of unstable pages accounted for on a per file system
granularity is exported by the unstable_stats proc file, contained under
each file system's llite namespace. An example of retrieving this
information is below:

$ lctl get_param llite.*.unstable_stats

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2139
Reviewed-on: http://review.whamcloud.com/6284
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
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>
8 years agostaging: lustre: mgc: fix 'error handling' issues
Sebastien Buisson [Wed, 27 Apr 2016 22:21:03 +0000 (18:21 -0400)]
staging: lustre: mgc: fix 'error handling' issues

Fix 'error handling' issues found by Coverity version 6.6.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.
Argument cannot be negative (NEGATIVE_RETURNS)
Negative value used as argument to a function expecting a
positive value.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4055
Reviewed-on: http://review.whamcloud.com/7842
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Nunez <james.a.nunez@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>
8 years agostaging: lustre: clio: add debug message in osc_completion()
Niu Yawei [Wed, 27 Apr 2016 22:21:02 +0000 (18:21 -0400)]
staging: lustre: clio: add debug message in osc_completion()

Replace LASSERT with LASSERTF in osc_completion, thus we can get
more info when the LASSERT is triggered.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3843
Reviewed-on: http://review.whamcloud.com/7494
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: llite: Replace printing of i_ino with ll_inode2fid()
James Nunez [Wed, 27 Apr 2016 22:21:01 +0000 (18:21 -0400)]
staging: lustre: llite: Replace printing of i_ino with ll_inode2fid()

The printing of i_ino/i_generation in llite messages is not nearly so
useful as printing the full inode FID, since i_ino is a "compressed"
version of the FID and there may be duplicate values for i_ino in some
cases (especially if running on a 32-bit client).

All instances of printing i_ino/i_generation are replaced with
the FID using ll_inode2fid(). All instances, except for one, of
printing just i_ino was replaced by printing the FID. In all
CERROR lines touched by the i_ino replacements, the device name
or fsname was added at the beginning of the message if it did not
already exist.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3491
Reviewed-on: http://review.whamcloud.com/6848
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ldlm: update comments about ldlm l_flags
Bruce Korb [Wed, 27 Apr 2016 22:21:00 +0000 (18:21 -0400)]
staging: lustre: ldlm: update comments about ldlm l_flags

Add and update documentation about some of the ldlm l_flags.

Signed-off-by: Bruce Korb <bruce.korb@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Reviewed-on: http://review.whamcloud.com/7963
Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
8 years agostaging: lustre: ldlm: remove code wireshark handling
Bruce Korb [Wed, 27 Apr 2016 22:20:59 +0000 (18:20 -0400)]
staging: lustre: ldlm: remove code wireshark handling

Wireshark output moved to userland file "lustre_dlm_flags_wshark.c"
and only bits that can actually appear "on the wire" are emitted.
The user land "packet-lustre.c" code that references these bits
now gets emitted into that file. e.g. the "local_only" bit is
never put on the wire, so references to it in wireshark are gone.

Signed-off-by: Bruce Korb <bruce.korb@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Reviewed-on: http://review.whamcloud.com/7963
Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
8 years agostaging: lustre: ldlm: clean up l_flags
Bruce Korb [Wed, 27 Apr 2016 22:20:58 +0000 (18:20 -0400)]
staging: lustre: ldlm: clean up l_flags

Remove the now obsolete LDLM_AST_FLAGS and LDLM_INHERIT_FLAGS defines.
Remove the obsolete LDLM_FL_HIDE_LOCK_MASK define.
Rename "local_only" mask to "off_wire" since it is confusingly similar
to a flag that (I think) means, "do not copy this lock over the wire."

Signed-off-by: Bruce Korb <bruce.korb@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Reviewed-on: http://review.whamcloud.com/7963
Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
8 years agostaging: lustre: ldlm: use accessor macros for l_flags
Bruce Korb [Wed, 27 Apr 2016 22:20:57 +0000 (18:20 -0400)]
staging: lustre: ldlm: use accessor macros for l_flags

Convert most of the ldlm lock's l_flags references from direct
bit twiddling to using bit specific macros.  A few multi-bit
operations are left as an exercise for the reader.

The changes are mostly in ldlm, but also in llite, osc and quota.
Also add a multi-bit (mask) test.

Signed-off-by: Bruce Korb <bruce.korb@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Reviewed-on: http://review.whamcloud.com/7963
Reviewed-by: Doug Oucharek <doug.s.oucharek@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>
8 years agostaging: lustre: lmv: kernel crash due to misconfigured MDT
Dmitry Eremin [Wed, 27 Apr 2016 22:20:56 +0000 (18:20 -0400)]
staging: lustre: lmv: kernel crash due to misconfigured MDT

There are few places with access to lmv->tgts[] without check for NULL.
Usually it may happens when MDT configured starting from index 1
instead of 0. For example:
mkfs.lustre --reformat --mgs --mdt --index=1 /dev/sdd1

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4098
Reviewed-on: http://review.whamcloud.com/7941
Reviewed-by: Andreas Dilger <andreas.dilger@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>
8 years agostaging: lustre: obdclass: add LCT_SERVER_SESSION for server session
Wang Di [Wed, 27 Apr 2016 22:20:55 +0000 (18:20 -0400)]
staging: lustre: obdclass: add LCT_SERVER_SESSION for server session

Add LCT_SERVER_SESSION for server session, and separate the
server session flag from LCT_SESSION, so to avoid allocating
session info for client stack for each server request, if
client and server are on the same node.

Signed-off-by: Wang Di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3806
Reviewed-on: http://review.whamcloud.com/7412
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@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>
8 years agostaging: lustre: llite: NFS reexport issue
Dmitry Eremin [Wed, 27 Apr 2016 22:20:54 +0000 (18:20 -0400)]
staging: lustre: llite: NFS reexport issue

Suppress erroneous/confusing messages when NFS
is out of sync and requests old data.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4050
Reviewed-on: http://review.whamcloud.com/7850
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: reset writeback index in ll_writepages
Jinshan Xiong [Wed, 27 Apr 2016 22:20:53 +0000 (18:20 -0400)]
staging: lustre: llite: reset writeback index in ll_writepages

Otherwise after one round the writeback index will become beyond
the file size and ->writepages() turns into an empty operation.

Also, a safety guard is added to limit the wait time for grant to
10 minutes(take recovery into consideration) at maximum in the
osc_enter_cache() function. Otherwise, EDQUOT will be returned to
the applications to start sync write.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3416
Reviewed-on: http://review.whamcloud.com/6554
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@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>
8 years agoStaging: lustre: Make lustre_profile_list static
Iban Rodriguez [Tue, 12 Apr 2016 21:08:34 +0000 (23:08 +0200)]
Staging: lustre: Make lustre_profile_list static

Variable lustre_profile_list is only used inside obd_config.c,
better make it static

Signed-off-by: Iban Rodriguez <iban.rodriguez@ono.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: hsm: don't use real suppgid
John L. Hammond [Tue, 12 Apr 2016 20:14:16 +0000 (16:14 -0400)]
staging: lustre: hsm: don't use real suppgid

In the MDC HSM handlers that do not pack a real suppgid, use -1 rather
than 0 for the suppgid in mdt_body.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3866
Reviewed-on: http://review.whamcloud.com/7565
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: hsm: permission checks for HSM ioctl operations
John L. Hammond [Tue, 12 Apr 2016 20:14:15 +0000 (16:14 -0400)]
staging: lustre: hsm: permission checks for HSM ioctl operations

In the LL_IOC_HSM_CT_START case of ll_dir_ioctl() require
CAP_SYS_ADMIN, since the local handler for this ioctl may modify the
global KUC table.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3866
Reviewed-on: http://review.whamcloud.com/7565
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY
Andriy Skulysh [Tue, 12 Apr 2016 20:14:14 +0000 (16:14 -0400)]
staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY

Patch for LU-631 which was landed before the upstream merge broke
OBD_STATFS_NODELAY behaviour. It adds unnecessary delay while
running df command with inactive OSTs. We shouldn't try to recover
connection to OST in this case.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4010
Reviewed-on: http://review.whamcloud.com/7762
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>
8 years agostaging: lustre: lov: return minimal FIEMAP for released files
Bruno Faccini [Tue, 12 Apr 2016 20:14:13 +0000 (16:14 -0400)]
staging: lustre: lov: return minimal FIEMAP for released files

Since st_blocks = NULL is returned for released files, FIEMAP
should at least return a minimal mapping to make users aware
that file contains data but it is not immediately available.
This will make coreutils and tools such tar happy and have
them presume file is sparse.

Also, add a new test_228 in sanity-hsm to verify it works
for "[cp,tar] --sparse" commands.

Also fix a LBUG ("lov_fiemap()) ASSERTION( fm_local ) failed")
likely to occur when no-object/ENOMEM conditions and also now
when released.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3864
Reviewed-on: http://review.whamcloud.com/7584
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lprocfs: implement log2 using bitops
Andrew Perepechko [Tue, 12 Apr 2016 20:14:12 +0000 (16:14 -0400)]
staging: lustre: lprocfs: implement log2 using bitops

This patch implements log2 using fls.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: alexander_zarochentsev@xyratex.com
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3496
Xyratex-bug-id: MRP-999
Reviewed-on: http://review.whamcloud.com/6757
Reviewed-by: John L. Hammond <john.hammond@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>
8 years agostaging: lustre: osc: osc_extent_wait() shouldn't be interruptible
Jinshan Xiong [Tue, 12 Apr 2016 20:14:11 +0000 (16:14 -0400)]
staging: lustre: osc: osc_extent_wait() shouldn't be interruptible

Otherwise it will hit the assertion at cl_lock.c:

 cl_lock.c:1967:discard_cb())
  ASSERTION( (!(page->cp_type == CPT_CACHEABLE) ||
  (!PageWriteback(cl_page_vmpage(env, page)))) ) failed:

This is because in osc_lock_flush() we have to make sure the IO
is finished before discarding the pages.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2779
Reviewed-on: http://review.whamcloud.com/5419
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>
8 years agostaging: lustre: llite: Truncate to restore file
Jinshan Xiong [Tue, 12 Apr 2016 20:14:10 +0000 (16:14 -0400)]
staging: lustre: llite: Truncate to restore file

Truncate up is safe so it won't trigger restore.

Copy optimization for truncate down - only copy the part under
truncate length. If a file is truncated to zero usually it'll be
followed by write so I choose to restore the file and set correct
stripe information.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3817
Reviewed-on: http://review.whamcloud.com/7505
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
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>
8 years agostaging: lustre: ptlrpc: return a meaningful status from ptlrpcd_init()
Swapnil Pimpale [Tue, 12 Apr 2016 20:14:09 +0000 (16:14 -0400)]
staging: lustre: ptlrpc: return a meaningful status from ptlrpcd_init()

This patch has the following:
1) Fix for the return value from ptlrpcd_init(). It will now return a
   correct status instead of returning zero always.
2) ptlrpcd_addref() should not increment ptlrpcd_users on error.
3) Added code in a mdc_setup() and mgc_setup() to test the return
   value of ptlrpcd_addref() and return on error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3808
Reviewed-on: http://review.whamcloud.com/7522
Reviewed-by: John L. Hammond <john.hammond@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>
8 years agostaging: lustre: obd: MDT mount fails on MDS w/o MGS on it
Bobi Jam [Tue, 12 Apr 2016 20:14:08 +0000 (16:14 -0400)]
staging: lustre: obd: MDT mount fails on MDS w/o MGS on it

If we specify multiple --mgsnode for a MDT, when we start MDS upon
it while MGS is no the other node, the MGC import connection will
always select the local nid (which is one of the candidate mgsnode)
since it think its the closest connection.

This patch treats further --mgsnode nids as failover nids, so that
multiple import connections are added for the MGC import.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3829
Reviewed-on: http://review.whamcloud.com/7509
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@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>
8 years agostaging: lustre: llite: error setting max_cache_mb at mount time
Jinshan Xiong [Tue, 12 Apr 2016 20:14:07 +0000 (16:14 -0400)]
staging: lustre: llite: error setting max_cache_mb at mount time

The root cause is that when max_cache_mb conf parameter is applied,
the client isn't connected to the OST yet so that sbi->ll_dt_exp is
NULL. However, it's not necessary to shrink the cache memory in this
case so success should be returned.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3676
Reviewed-on: http://review.whamcloud.com/7194
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: speedup in unlink/rmdir
Andrew Perepechko [Tue, 12 Apr 2016 20:14:06 +0000 (16:14 -0400)]
staging: lustre: llite: speedup in unlink/rmdir

Assume dchild argument is fully initialized in ->unlink and
->rmdir callbacks, so additional lookup for ELC is not needed.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3473
Xyratex-bug-id: MRP-1027
Reviewed-on: http://review.whamcloud.com/6648
Reviewed-by: Fan Yong <fan.yong@intel.com>
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>
8 years agostaging: lustre: llite: variable rename in namei.c
Andrew Perepechko [Tue, 12 Apr 2016 20:14:05 +0000 (16:14 -0400)]
staging: lustre: llite: variable rename in namei.c

With the patch 6648 a fee variables were renamed. We do these
renames in broken out patch to the fix obvious.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3473
Xyratex-bug-id: MRP-1027
Reviewed-on: http://review.whamcloud.com/6648
Reviewed-by: Fan Yong <fan.yong@intel.com>
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>
8 years agostaging: lustre: ldlm: refine LU-2665 patch for POSIX compliance
Bruno Faccini [Tue, 12 Apr 2016 20:14:04 +0000 (16:14 -0400)]
staging: lustre: ldlm: refine LU-2665 patch for POSIX compliance

Follow-on to patch introduced to fix LU-2665 ticket (Gerrit
Change at http://review.whamcloud.com/6415 with Change-Id:
I8faa331712abeadee46eabe111ee1c23a05840d5).
Original patch introduced regressions against POSIX test suite
(fcntl.18/fcntl.35 tests in LSB-VSX POSIX test suite at
http://www.opengroup.org/testing/linux-test/lsb-vsx.html),
so the idea is to only resend F_UNLCKs to have both LU-2665 bug
and POSIX test suite happy.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3701
Reviewed-on: http://review.whamcloud.com/7453
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>
8 years agostaging: lustre: ldlm: Fix a race during FLock handling
Bruno Faccini [Tue, 12 Apr 2016 20:14:03 +0000 (16:14 -0400)]
staging: lustre: ldlm: Fix a race during FLock handling

Protect against race where lock could have been just destroyed
due to overlap, in ldlm_process_flock_lock().
Easy reproducer is BULL's NFS Locktests in pthread mode.
(http://nfsv4.bullopensource.org/tools/tests/locktest.php)

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1126
Reviewed-on: http://review.whamcloud.com/7134
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: clio: incorrect assertions in 'enable-invariants'
Niu Yawei [Tue, 12 Apr 2016 20:14:02 +0000 (16:14 -0400)]
staging: lustre: clio: incorrect assertions in 'enable-invariants'

Fixed several incorrect assumptions in 'enable-invariants'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3521
Reviewed-on: http://review.whamcloud.com/6832
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agostaging: lustre: osc: fix race issues thanks to oap_lock
Sebastien Buisson [Tue, 12 Apr 2016 20:14:01 +0000 (16:14 -0400)]
staging: lustre: osc: fix race issues thanks to oap_lock

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.

This patch is dedicated to code fragments involving oap_lock.

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/6572
Reviewed-by: Oleg Drokin <oleg.drokin@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>
8 years agostaging/lustre/llite: suppress non active IO error message
Bobi Jam [Wed, 13 Apr 2016 01:11:09 +0000 (21:11 -0400)]
staging/lustre/llite: suppress non active IO error message

Current CLIO does not support fadvise, suppress the error message.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/9658
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4717
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Fix blank line after/before {/} style
Oleg Drokin [Wed, 13 Apr 2016 01:11:08 +0000 (21:11 -0400)]
staging/lustre: Fix blank line after/before {/} style

This patch fixes all checkpatch occurences of
CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: Blank lines aren't necessary before a close brace '}'
in Lustre code.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>