platform/kernel/linux-rpi3.git
8 years agostaging: r8188eu: remove xmitframe_direct function
Ivan Safonov [Sun, 18 Sep 2016 17:24:01 +0000 (00:24 +0700)]
staging: r8188eu: remove xmitframe_direct function

xmitframe_direct is a simple wrapper around
rtw_xmitframe_coalesce and rtw_dump_xframe functions.
Many wrappers complicates code reading.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: change last argument type of the usb_write_port function
Ivan Safonov [Sun, 18 Sep 2016 17:23:42 +0000 (00:23 +0700)]
staging: r8188eu: change last argument type of the usb_write_port function

usb_write_port writes only xmit_buf object data to device.
In addition, an appropriate name for this argument is used.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Merge assignment with return
Rehas Sachdeva [Tue, 20 Sep 2016 07:48:40 +0000 (13:18 +0530)]
staging: wilc1000: Merge assignment with return

Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move parahotplug_request_list and related lock
David Kershner [Mon, 19 Sep 2016 21:09:37 +0000 (17:09 -0400)]
staging: unisys: visorbus: move parahotplug_request_list and related lock

parahotplug_request_list and parahotplug_request_list_lock should be
defined closer to where we are actually using them.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove fix_vbus_dev_info prototype
David Kershner [Mon, 19 Sep 2016 21:09:36 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove fix_vbus_dev_info prototype

Move the visordriver_probe_device and visorbus_register_visor_driver
functions lower in the file to get rid of the function prototype
fix_vbus_dev_info.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus move visorbus_type to remove prototypes
David Kershner [Mon, 19 Sep 2016 21:09:35 +0000 (17:09 -0400)]
staging: unisys: visorbus move visorbus_type to remove prototypes

Move the struct visorbus_type down in the file to get rid of
the function prototypes visorbus_uevent and visorbus_match.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move deviceenabled/disabled store functions
David Kershner [Mon, 19 Sep 2016 21:09:34 +0000 (17:09 -0400)]
staging: unisys: visorbus: move deviceenabled/disabled store functions

Move the deviceenabled/devicedisabled store functions so that
function prototypes can be removed.

This caused us to move several of the structures farther
down in the file as well.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move the remaining_steps_show/store functions
David Kershner [Mon, 19 Sep 2016 21:09:33 +0000 (17:09 -0400)]
staging: unisys: visorbus: move the remaining_steps_show/store functions

Moving the remaining_steps functions allows us to get rid of an unneeded
prototype.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move textid store and show functions
David Kershner [Mon, 19 Sep 2016 21:09:32 +0000 (17:09 -0400)]
staging: unisys: visorbus: move textid store and show functions

The textid store and show functions were moved to allow us to remove
the function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move error store/show functions
David Kershner [Mon, 19 Sep 2016 21:09:31 +0000 (17:09 -0400)]
staging: unisys: visorbus: move error store/show functions

Move the show and store functions for the error DEV_ATTR_RW so that the
function prototypes can be removed.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove parser_done prototype
David Kershner [Mon, 19 Sep 2016 21:09:28 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove parser_done prototype

Remove the unneeded prototype parser_done.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove controlvm_respond_physdev_changestate
David Kershner [Mon, 19 Sep 2016 21:09:27 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove controlvm_respond_physdev_changestate

Remove the unneeded prototype declaration for function
controlvm_respond_physdev_changestate.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move parser_init_byte_stream
David Kershner [Mon, 19 Sep 2016 21:09:22 +0000 (17:09 -0400)]
staging: unisys: visorbus: move parser_init_byte_stream

The function parser_init_byte_stream needs to be moved lower in the file to
avoid extraneous function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move boottotool
David Kershner [Mon, 19 Sep 2016 21:09:30 +0000 (17:09 -0400)]
staging: unisys: visorbus: move boottotool

Move the boottotool show and store functions so the function
prototypes can be removed.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move toolaction functions to remove prototypes
David Kershner [Mon, 19 Sep 2016 21:09:29 +0000 (17:09 -0400)]
staging: unisys: visorbus: move toolaction functions to remove prototypes

The toolchain functions show and store needed to be moved so the prototypes
were no longer needed.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove controlvm_respond_chipset_init prototype
David Kershner [Mon, 19 Sep 2016 21:09:26 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove controlvm_respond_chipset_init prototype

Remove the unneeded controlvm_respond_chipset_init prototype by
moving the functions controlvm_init_response and
controlvm_respond_chipset_init up in the file.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove prototype controlvm_respond
David Kershner [Mon, 19 Sep 2016 21:09:25 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove prototype controlvm_respond

Remove the unneeded prototype for controlvm_respond.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move parahotplug_process_list
David Kershner [Mon, 19 Sep 2016 21:09:24 +0000 (17:09 -0400)]
staging: unisys: visorbus: move parahotplug_process_list

The function parahotplug_process_list needs to be moved lower in the file
to avoid extraneous function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move read_controlvm_event
David Kershner [Mon, 19 Sep 2016 21:09:23 +0000 (17:09 -0400)]
staging: unisys: visorbus: move read_controlvm_event

The function read_controlvm_event needs to be moved lower in the file
to avoid extraneous function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move handle_command
David Kershner [Mon, 19 Sep 2016 21:09:21 +0000 (17:09 -0400)]
staging: unisys: visorbus: move handle_command

Handle_command gets moved lower in the file to avoid the need for
extraneous function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: reorder controlvm_periodic_work
David Kershner [Mon, 19 Sep 2016 21:09:20 +0000 (17:09 -0400)]
staging: unisys: visorbus: reorder controlvm_periodic_work

Move controlvm_periodic_work lower in the file to avoid having
to create function prototypes.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: move controlvm_payload_bytes_buffered
Jon Frisch [Mon, 19 Sep 2016 21:09:19 +0000 (17:09 -0400)]
staging: unisys: visorbus: move controlvm_payload_bytes_buffered

This patch moves the unsigned long controlvm_payload_bytes_buffered
from the module parameters location to a more appropriate location
below the controlvm_payload_info.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused dump_vhba_bus
Jon Frisch [Mon, 19 Sep 2016 21:09:18 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove unused dump_vhba_bus

This patch removes the unused u32 dump_vhba_bus.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused long long bus_count
Jon Frisch [Mon, 19 Sep 2016 21:09:17 +0000 (17:09 -0400)]
staging: unisys: visorbus: remove unused long long bus_count

This patch removes the unused long long bus_count.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus remove unused module parameter
Jon Frisch [Mon, 19 Sep 2016 21:09:16 +0000 (17:09 -0400)]
staging: unisys: visorbus remove unused module parameter

This patch removes the unused module parameter
visorchipset_visorbusregwait

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: use preferred kernel type u16
Chaehyun Lim [Tue, 20 Sep 2016 00:47:30 +0000 (09:47 +0900)]
staging: greybus: use preferred kernel type u16

As suggested by checkpatch.pl:

CHECK: Prefer kernel type 'u16' over 'uint16_t'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: use preferred kernel type u8
Chaehyun Lim [Tue, 20 Sep 2016 00:47:29 +0000 (09:47 +0900)]
staging: greybus: use preferred kernel type u8

As suggested by checkpatch.pl:

CHECK: Prefer kernel type 'u8' over 'uint8_t'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: klnds: socklnd: Remove unnecessary line continuations
Anchal Jain [Sun, 18 Sep 2016 15:54:12 +0000 (21:24 +0530)]
staging: lustre: lnet: klnds: socklnd: Remove unnecessary line continuations

Fixes checkpatch warning:

WARNING: Avoid unnecessary line continuations

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lustre/ldlm: Fixed sparse warnings
Nayeemahmed Badebade [Sun, 18 Sep 2016 21:18:19 +0000 (02:48 +0530)]
staging: lustre: lustre/ldlm: Fixed sparse warnings

Added __acquires / __releases sparse locking annotations
to lock_res_and_lock() and unlock_res_and_lock() functions
in l_lock.c, to fix below sparse warnings:

l_lock.c:47:22: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit
l_lock.c:61:6: warning: context imbalance in 'unlock_res_and_lock' - unexpected unlock

Signed-off-by: Nayeemahmed Badebade <itachi.opsrc@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: lmv_obd: Remove redundant test.
Sandhya Bankar [Mon, 19 Sep 2016 18:29:36 +0000 (23:59 +0530)]
Staging: lustre: lmv_obd: Remove redundant test.

filp != NULL is already checked, so no need to check it again.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: Convert array index from the loop bound to the loop index.
Sandhya Bankar [Sat, 17 Sep 2016 23:53:49 +0000 (05:23 +0530)]
Staging: lustre: Convert array index from the loop bound to the loop index.

Convert array index from the loop bound to the loop index.

The structure cl_env_percpu[NR_CPUS] has been initializing for each possible
cpu (i.e 0 to i). During initialization if any error will occurred, the error
handling code should uninitialize cl_env_percpu upto i. But currently
unitialization is repeatedly done for the same cl_env_percpu[i] element.
This does not seems to be correct.

Used below semantic patch to identify this issue:

@@
expression e1,e2,ar;
@@
for(e1 = 0; e1 < e2; e1++) { <...
  ar[
- e2
+ e1
  ]
  ...> }

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: MAINTAINERS: add greybus protocol drivers maintainers
Bryan O'Donoghue [Mon, 19 Sep 2016 17:41:46 +0000 (18:41 +0100)]
staging: greybus: MAINTAINERS: add greybus protocol drivers maintainers

Add bod to some Greybus protocol drivers maintainers, loopback and
timesync.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: rename channel related spinlock
Christian Gromm [Mon, 19 Sep 2016 15:40:25 +0000 (17:40 +0200)]
staging: most: hdm-usb: rename channel related spinlock

To increase comprehension this patch renames the channel related
spinlock with a more fitting name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove calls to usb_unachor_urb
Christian Gromm [Mon, 19 Sep 2016 15:40:24 +0000 (17:40 +0200)]
staging: most: hdm-usb: remove calls to usb_unachor_urb

This patch removes the calls to usb_unanchor_urb() from the completion
routines, since disassociation of the URBs is already handles by the
USB subsystem.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove redundant spinlocks
Christian Gromm [Mon, 19 Sep 2016 15:40:23 +0000 (17:40 +0200)]
staging: most: hdm-usb: remove redundant spinlocks

This patch removes the spinlocks when accessing the usb_anchor list,
because the struct usb_anchor is using its own lock.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove proprietary urb anchoring
Christian Gromm [Mon, 19 Sep 2016 15:40:22 +0000 (17:40 +0200)]
staging: most: hdm-usb: remove proprietary urb anchoring

This patch removes the propietary tracking of URBs. Instead the structure
usb_anchor of the USB subsystem is used.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'iio-for-4.9c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Tue, 20 Sep 2016 06:36:04 +0000 (08:36 +0200)]
Merge tag 'iio-for-4.9c' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third set of new device support, functionality and cleanups for IIO in the 4.9 cycle.

Given Linus is hinting (strongly!) at an rc8 this last set is hopefully in
time for the 4.9 merge window.  The zpa2326 and si1145 drivers provide
fine illustrations that devices aren't getting any simpler!

I'm also particularly pleased Linus Walliej did such a thorough job of cleaning
up one of my old drivers.

New device support
* mCube MC3230 accelerometer
  - new fairly minimal driver.
* Murata zpa2326
  - extensive new driver supporting the rather 'novel' buffering of data this
    device provides and handling both it's own data ready trigger and other
    triggers rather elegantly.
* si1141, si1142, si1143, si1145, si1146 and si1147 proximity, UV, visible and
  IR sensors.
  - another extensive new driver supporting all the key bits of what this
    set of devices supplies including dataready triggers, buffers and all the
    various data channels.

Functionality
* kxsd9 - Linus brought this scratch driver I wrote in one afternoon years ago
  up to date adding lots of good stuff along the way.
  - SPI support after extensive rework of the driver.
  - Triggered buffer capture support.
  - Runtime PM.
  - Regulator handling.
  - Mounting matrix support.
* mma7660
  - Add MODULE_DEVICE_TABLE to support autoprobing.

Cleanups
* ad5933
  - Align some function arguements nicely.
* med_z188
  - Constify iio_info structure.
* sca3000
  - Implement IIO_CHAN_INFO_SAMP_FREQ rather than a hand rolled attr.
    There are still quite a few drivers that would benefit from similar updates.
* ssp_sensors
  - Constify iio_info structures in accel and gyro drivers.

8 years agoMerge branch 'greybus' into staging-testing
Greg Kroah-Hartman [Mon, 19 Sep 2016 17:34:33 +0000 (19:34 +0200)]
Merge branch 'greybus' into staging-testing

This merges the greybus branch into staging-testing.  It contains the
drivers/staging/greybus/ subsystem and related drivers and has passed
the 0-day bot tests so no builds should break.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: MAINTAINERS: add greybus protocol drivers maintainers
Rui Miguel Silva [Mon, 19 Sep 2016 16:07:59 +0000 (17:07 +0100)]
staging: greybus: MAINTAINERS: add greybus protocol drivers maintainers

Add me to some Greybus protocol drivers maintainers, spi, sdio, power
supply, light and gpio.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: add some MAINTAINERS
Greg Kroah-Hartman [Mon, 19 Sep 2016 16:23:19 +0000 (18:23 +0200)]
staging: greybus: add some MAINTAINERS

Johan and Alex and I are going to maintain the greybus code, so add it
to MAINTAINERS so we get cc:ed on patches.

Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Alex Elder <elder@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: remove CONFIG_PM_RUNTIME from kernel_ver.h
Greg Kroah-Hartman [Fri, 9 Sep 2016 07:47:01 +0000 (09:47 +0200)]
staging: greybus: remove CONFIG_PM_RUNTIME from kernel_ver.h

The last thing remaining in kernel_ver.h was the setting of
CONFIG_PM_RUNTIME, which isn't needed in a in-tree implementation.  So
remove the setting of this value, and the .h file entirely as that was
the last thing left in it.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: Kconfig: enable possibility to select light driver
Rui Miguel Silva [Thu, 8 Sep 2016 16:17:52 +0000 (17:17 +0100)]
staging: greybus: Kconfig: enable possibility to select light driver

Remove BROKEN keyword to allow the light driver to be select now that
we fixed the kernel version dependencies. Also fix the module name in
the help section.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: makefile: fix dependency of spi to spilib
Rui Miguel Silva [Thu, 8 Sep 2016 16:17:51 +0000 (17:17 +0100)]
staging: greybus: makefile: fix dependency of spi to spilib

Greybus SPI driver depends on gb-spilib and we need to state that at
makefile to make it link correctly.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: power_supply: remove KERNEL_VERSION checks
Rui Miguel Silva [Thu, 8 Sep 2016 16:17:50 +0000 (17:17 +0100)]
staging: greybus: power_supply: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus Power Supply
driver, so remove the checks as needed, we can now rely on all of the
correct Power Supply core apis being present. Also move some properties
definitions to the power supply greybus code.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: sdio: remove KERNEL_VERSION checks
Rui Miguel Silva [Thu, 8 Sep 2016 16:17:49 +0000 (17:17 +0100)]
staging: greybus: sdio: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus SDIO driver, so
remove the checks as needed, we can now rely on all of the correct SDIO
core apis being present.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: light: remove KERNEL_VERSION checks
Rui Miguel Silva [Thu, 8 Sep 2016 16:17:48 +0000 (17:17 +0100)]
staging: greybus: light: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus Light driver, so
remove the checks as needed, we can now rely on all of the correct LED
core apis being present. And compile only if flash and v4l2 flash is
reachable.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: sdio: fix min() type check
Greg Kroah-Hartman [Thu, 8 Sep 2016 14:10:50 +0000 (16:10 +0200)]
staging: greybus: sdio: fix min() type check

The 0-day bot pointed out a type difference in one min() call, so fix it
up by being explicit about the type being compared.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: spi: remove KERNEL_VERSION checks
Greg Kroah-Hartman [Thu, 8 Sep 2016 14:06:27 +0000 (16:06 +0200)]
staging: greybus: spi: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus SPI and spilib
driver, so remove the checks as needed, we can now rely on all of the
correct SPI core apis being present.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: gpio: it's CONFIG_GPIOLIB, not CONFIG_GPIO
Greg Kroah-Hartman [Mon, 19 Sep 2016 14:41:54 +0000 (16:41 +0200)]
staging: greybus: gpio: it's CONFIG_GPIOLIB, not CONFIG_GPIO

The GPIO dependancy is CONFIG_GPIOLIB, not CONFIG_GPIO, no wonder it
wasn't building properly...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: gpio: remove KERNEL_VERSION checks
Greg Kroah-Hartman [Thu, 8 Sep 2016 13:52:06 +0000 (15:52 +0200)]
staging: greybus: gpio: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus GPIO driver, so
remove the checks as needed, we can now rely on all of the correct
GPIO core apis being present.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: vibrator: remove KERNEL_VERSION checks
Greg Kroah-Hartman [Thu, 8 Sep 2016 13:47:30 +0000 (15:47 +0200)]
staging: greybus: vibrator: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus Vibrator driver,
so remove the checks as needed, we can now rely on all of the correct
driver core apis being present.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: hid: remove KERNEL_VERSION checks
Greg Kroah-Hartman [Thu, 8 Sep 2016 13:46:38 +0000 (15:46 +0200)]
staging: greybus: hid: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus HID driver, so
remove the checks as needed, we can now rely on all of the "new" apis
being present.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: kernel_ver.h: remove lots of stuff
Greg Kroah-Hartman [Thu, 8 Sep 2016 09:51:33 +0000 (11:51 +0200)]
staging: greybus: kernel_ver.h: remove lots of stuff

Now that we do not care about the kernel version we are building
against, we can strip out lots of backward compatibilty that was added
to kernel_ver.h in order to write semi-portable driver code.

To start with, remove the functions and #defines that are now in the
kernel tree, no need to have duplicate copies of them all.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: Add drivers/staging/greybus to the build
Greg Kroah-Hartman [Mon, 19 Sep 2016 13:46:40 +0000 (15:46 +0200)]
staging: greybus: Add drivers/staging/greybus to the build

This adds a proper Kconfig file for drivers/staging/greybus and fixes up
the Makefile to work correctly within the kernel build system (modules
depend on the .config options, etc.)

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: remove old es1 endpoint description
Greg Kroah-Hartman [Mon, 19 Sep 2016 10:40:33 +0000 (12:40 +0200)]
staging: greybus: remove old es1 endpoint description

The Toshiba ES1 chip is no longer around, so remove the USB descriptor
documentation for it as no one cares anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: remove .gitignore file
Greg Kroah-Hartman [Thu, 8 Sep 2016 13:01:23 +0000 (15:01 +0200)]
staging: greybus: remove .gitignore file

Only the tools subdirectory needs a .gitignore entry, so move it there
and fix it up to only list the needed file.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: remove README and LICENSE
Greg Kroah-Hartman [Thu, 8 Sep 2016 09:58:46 +0000 (11:58 +0200)]
staging: greybus: remove README and LICENSE

We don't need yet-another-copy of the GPLv2 in the tree, and the README
is now pointless, so remove both of these files.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agostaging: greybus: Documentation: remove sysfs tree
Greg Kroah-Hartman [Mon, 19 Sep 2016 10:35:16 +0000 (12:35 +0200)]
staging: greybus: Documentation: remove sysfs tree

We do not need an example of the sysfs tree in the kernel code itself,
so remove these files, as they are now pointless.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agogreybus: remove local checkpatch.pl copy
Greg Kroah-Hartman [Thu, 8 Sep 2016 09:44:34 +0000 (11:44 +0200)]
greybus: remove local checkpatch.pl copy

When the greybus tree was external, it contained a copy of checkpatch.pl
to keep everyone "in line".  This is no longer needed and can now be
removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
8 years agoMerge greybus driver tree into 4.8-rc6
Greg Kroah-Hartman [Mon, 19 Sep 2016 10:29:33 +0000 (12:29 +0200)]
Merge greybus driver tree into 4.8-rc6

This pulls the external greybus driver tree into 4.8-rc6 as it should be
part of the main kernel tree and not live outside in some lonely github
repo, never to be reunited with it's true love...

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: update version to 2.6.99
James Simmons [Sun, 18 Sep 2016 20:39:03 +0000 (16:39 -0400)]
staging: lustre: update version to 2.6.99

With all of the the missing patches from the
lustre 2.7 version merged upstream its time to update
the upstream clients version.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: o2iblnd: Put back work queue check previously removed
Doug Oucharek [Sun, 18 Sep 2016 20:39:02 +0000 (16:39 -0400)]
staging: lustre: o2iblnd: Put back work queue check previously removed

The previous patch, http://review.whamcloud.com/21304/, removed
a check needed until LU-5718 is properly addressed.  With
the check, LU-5718 results in an error message and a lost
RDMA operation.  Without it, we have memory corruption and
a crash (much harder to debug).

Putting the check back in case LU-5718 is not fixed soon.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7650
Reviewed-on: http://review.whamcloud.com/22281
Reviewed-by: James Simmons <uja.ornl@yahoo.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>
8 years agostaging: lustre: lnet: Enable setting per NI peer_credits
Doug Oucharek [Sun, 18 Sep 2016 20:39:01 +0000 (16:39 -0400)]
staging: lustre: lnet: Enable setting per NI peer_credits

The code to allow peer_credits to be set per NI was originally
"left inactive" because there were concerns about peer_credits
interfering with the ability for IB nodes to connect to each
other when peer_credits are not the same (peer_credits controls
the queue depth for IB). With LU-3322, the values do not have
to match so it is now safe to enable this code so peer_credits
can be set per NI.

This patch enables existing code for setting per NI peer_credits.

Second this patch fixes a long standing bug in that the conf data
was not being used to set variables in the lnet_ni structure until
after lnd_startup() was called which meant LND drivers were
ignoring struct lnet_ni tunable values being set. Now we change
struct lnet_ni data fields based on conf data before calling
lnd_startup().

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8507
Reviewed-on: http://review.whamcloud.com/21948
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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: lnet: Ensure routing is turned on first time
Doug Oucharek [Sun, 18 Sep 2016 20:39:00 +0000 (16:39 -0400)]
staging: lustre: lnet: Ensure routing is turned on first time

In lnet_rtrpools_enable(), a mistake was made and routing
was not being turned on when the rtrpools are being allocated
for the first time.

This patch fixes that routine so we remember to turn on
routing after allocating the rtrpools.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8501
Reviewed-on: http://review.whamcloud.com/21934
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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: lnet: check if ni is in current net namespace
Sebastien Buisson [Sun, 18 Sep 2016 20:38:59 +0000 (16:38 -0400)]
staging: lustre: lnet: check if ni is in current net namespace

Add new 'ni_net_ns' field to struct lnet_ni to hold a reference
to original net namespace in which ni is created.
In LNetDist(), check if ni was created in same net namespace as
current's one. If not, assign order above 0xffff0000, to make
this ni not a priority.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7845
Reviewed-on: http://review.whamcloud.com/21884
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: potential deadlock in lnet
Quentin Bouget [Sun, 18 Sep 2016 20:38:58 +0000 (16:38 -0400)]
staging: lustre: lnet: potential deadlock in lnet

Fixes potential deadlock in LNetMDAttach

Signed-off-by: Quentin Bouget <quentin.bouget.ocre@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8249
Reviewed-on: http://review.whamcloud.com/20676
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Henri Doreau <henri.doreau@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: lmv: fix parent FID for migration
wang di [Sun, 18 Sep 2016 20:38:57 +0000 (16:38 -0400)]
staging: lustre: lmv: fix parent FID for migration

If the migrating directory is under striped directory, it needs
to set right stripe FID for its parent.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6263
Reviewed-on: http://review.whamcloud.com/13817
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: mdc: cl_default_mds_easize not refreshed
Ned Bass [Sun, 18 Sep 2016 20:38:56 +0000 (16:38 -0400)]
staging: lustre: mdc: cl_default_mds_easize not refreshed

The client_obd::cl_default_mds_easize field should track the largest
observed EA size advertised by the MDT, subject to a reasonable upper
bound. The MDC uses cl_default_mds_easize to calculate the initial
size of request buffers.  The default value should be small enough to
avoid wasted memory and excessive use of vmalloc(), yet large enough
to accommodate the common use case.

In the current code, the default value is only updated if
client_obd::cl_max_mds_easize is strictly less than
mdt_body::mbo_max_mdsize. This condition is almost never met, because
client_obd::cl_max_mds_easize is computed at client mount-time based
on the number of OSTs in the filesystem, so the MDT won't ever observe
and advertise an EA size larger than that.

As a result, client_obd::cl_default_mds_easize indefinitely retains
its initial value, which is computed at client mount-time based on
the filesystem's default stripe width. Any getattr() requests for
widely striped files will consequently allocate a request buffer
that is too small, forcing reallocations on both the client and
server side. To avoid this, update client_obd::cl_default_mds_easize
independently of the value of client_obd::cl_max_mds_easize.

In addition, this patch includes these changes:

 - Add comments to the client_obd structure to clarify what the
   cl_{default,max}_mds_{cookie,ea}size values mean.

 - Prevent mdc_get_info() from storing uninitialized data in
   client_obd::cl_max_mds_cookiesize.

 - Use 4096 as an upper bound for the default values.  The former
   bound of PAGE_CACHE_SIZE is too large on 64k-page platforms
   (i.e. PPC), so it fails to prevent the vmalloc() spinlock
   contention described in LU-3338. The new value was chosen to
   be large enough to accommodate common use cases while staying
   well below the 16k threshold at which allocations start using
   vmalloc().

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Kyle Blatter <kyleblatter@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5549
Reviewed-on: http://review.whamcloud.com/11614
Reviewed-by: Lai Siyao <lai.siyao@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: make default_easize writeable in /sysfs
Ned Bass [Sun, 18 Sep 2016 20:38:55 +0000 (16:38 -0400)]
staging: lustre: llite: make default_easize writeable in /sysfs

Allow default_easize to be tuned via /sysfs. A system administrator
might want this if a rare access to widely striped files drives up the
value on a filesystem where narrowly striped files are the more common
case. In practice, however, this is wanted primarily to facilitate
a test case for LU-5549.

 - Plumb the necessary interfaces through the LMV and MDC layers
   to expose write access to this value by higher layers.

 - Add block comments to modified functions.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5549
Reviewed-on: http://review.whamcloud.com/13112
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: mdt: add indexing option to default dir stripe
wang di [Sun, 18 Sep 2016 20:38:54 +0000 (16:38 -0400)]
staging: lustre: mdt: add indexing option to default dir stripe

Add indexing option to default dirstripe EA. If MDT find
out the client send the create req to the wrong MDT because
of default stripeEA, it will return -EREMOTE, then client
will retrieve default stripeEA through xattr cache, and
re-create the object.

Also merged patch for LU-6341 to resolve the following problem.
Use ll_dir_getstripe to get default stripeEA in ll_new_node(),
Because ll_getxattr_common requires admin rights for retrieving
default LMVEA (because of trusted- prefix), which might cause
mkdir (from normal user) failure.

If parent does not have default stripeEA, then child should always
be in the same MDT for mkdir. Otherwise MDT should return -EREMOTE,
then client will refresh the default stripe index, and recreate
the object.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5523
Reviewed-on: http://review.whamcloud.com/13360
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6341
Reviewed-on: http://review.whamcloud.com/13990
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.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: prevent request timeout grow due to recovery
Mikhail Pershin [Sun, 18 Sep 2016 20:38:53 +0000 (16:38 -0400)]
staging: lustre: ptlrpc: prevent request timeout grow due to recovery

Patch fixes the issue seen on the client with growing request
timeout which occurred after the server side patch landed for
LU-5079. While commit itself is correct, it reveals another
issue. If request is being processed for a long time on server
then client adaptive timeouts will adapt to that after receiving
reply and new requests will have bigger timeout. Another problem
is that server AT history is corrupted by recovery request
processing time which not pure service time but includes
also waiting time for clients to recover.

Patch prevents the AT stats update from early replies on client and
from recovering requests processing time on server.
The ptlrpc_at_recv_early_reply() still updates the current request
timeout as asked by server, but don't include this into AT stats.
The real reply will bring that data from server after all.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6084
Reviewed-on: http://review.whamcloud.com/13520
Reviewed-by: Andreas Dilger <andreas.dilger@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: obd: use proper flags for call_usermodehelper
James Simmons [Sun, 18 Sep 2016 20:38:52 +0000 (16:38 -0400)]
staging: lustre: obd: use proper flags for call_usermodehelper

When a parameter is permanently changed on the MGS the
MGS send a changelog packet to the proper nodes that
are affected by the change. Once the nodes receive the
change they then call the userland utility lctl to
change its local value. When calling a userland
application from the kernel you specify a flag to
control the interaction with the application. Originally
by default the flag was set to 0 which is UMH_NO_WAIT
which meant lctl was being called asynchronously. In
older kernels this was fine since UHM_NO_WAIT and
UHM_WAIT_PROC had nearly the same logic. This changed
with newer kernels which broke updating our parameters.
Plus doing a UHM_NO_WAIT doesn't report back a error
if something goes wrong with lctl. The fix is to set
the flag to UHM_WAIT_PROC so kernel space waits until
lctl has finished and we get a proper error code if
something does go wrong with lctl.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6063
Reviewed-on: http://review.whamcloud.com/13677
Reviewed-by: Bob Glossman <bob.glossman@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: remove unnecessary EXPORT_SYMBOL
frank zago [Sun, 18 Sep 2016 20:38:51 +0000 (16:38 -0400)]
staging: lustre: ptlrpc: remove unnecessary EXPORT_SYMBOL

A lot of symbols don't need to be exported at all because they are
only used in the module they belong to.

Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829
Reviewed-on: http://review.whamcloud.com/12510
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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: llite: lock the inode to be migrated
wang di [Sun, 18 Sep 2016 20:38:50 +0000 (16:38 -0400)]
staging: lustre: llite: lock the inode to be migrated

Because the inode and its connected dentries will be cleared
out of the cache after migration, the inode needs to be locked
during the migration.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4712
Reviewed-on: http://review.whamcloud.com/9689
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@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: remove unnecessary EXPORT_SYMBOL
frank zago [Sun, 18 Sep 2016 20:38:49 +0000 (16:38 -0400)]
staging: lustre: obdclass: remove unnecessary EXPORT_SYMBOL

A lot of symbols don't need to be exported at all because they are
only used in the module they belong to.

Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829
Reviewed-on: http://review.whamcloud.com/13323
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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: misc: remove unnecessary EXPORT_SYMBOL
frank zago [Sun, 18 Sep 2016 20:38:48 +0000 (16:38 -0400)]
staging: lustre: misc: remove unnecessary EXPORT_SYMBOL

A lot of symbols don't need to be exported at all because they are
only used in the module they belong to.

Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829
Reviewed-on: http://review.whamcloud.com/13321
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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: grant: quiet message on grant waiting timeout
Johann Lombardi [Sun, 18 Sep 2016 20:38:47 +0000 (16:38 -0400)]
staging: lustre: grant: quiet message on grant waiting timeout

Use at_max in osc_enter_cache() to bound how long we wait for grant
space before switching to synchronous I/Os. Do not print a message
on the console when the timeout is hit since such long wait can
be legitimate with flaky network (i.e. BRW is resent multiple times).

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5521
Reviewed-on: http://review.whamcloud.com/12146
Reviewed-by: Niu Yawei <yawei.niu@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: lmv: Do not revalidate stripes with master lock
wang di [Sun, 18 Sep 2016 20:38:46 +0000 (16:38 -0400)]
staging: lustre: lmv: Do not revalidate stripes with master lock

Do not revalidate slave stripes while holding master lock.
Otherwise if the revalidating slaves are blocked, then the
master lock can not be released in time.

Remove some unnecesary merging in ll_revalidate_slave(), and
the attributes will be stored in each stripe, only
merging them if required.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6088
Reviewed-on: http://review.whamcloud.com/13432
Reviewed-by: Andreas Dilger <andreas.dilger@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: client: Fix mkdir -i 1 from DNE2 client to DNE1 server
Artem Blagodarenko [Sun, 18 Sep 2016 20:38:45 +0000 (16:38 -0400)]
staging: lustre: client: Fix mkdir -i 1 from DNE2 client to DNE1 server

After DNE phase 2 has been added to client it sends
create request to slave MDT.  DNT1-only server doesn't
expect request to slave MDT from client. It expects
only cross-mdt request from master MDT. Thus if DNE2
client tries to "mkdir -i 1" on DNE1 server, then
LBUG happened.

This patch adds OBD_CONNECT_DIR_STRIPE connection
flag check on client side. If striped directories are not
supported by server, then create requrest is sent to
master MDT.

Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6071
Xyratex-bug-id: MRP-2319
Reviewed-on: http://review.whamcloud.com/13189
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wang di <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>
8 years agostaging: lustre: clio: pass fid for OST setattr
Bobi Jam [Sun, 18 Sep 2016 20:38:44 +0000 (16:38 -0400)]
staging: lustre: clio: pass fid for OST setattr

Store inode's fid in cl_setattr_ost() and OSC packs this info on the
wire (via lustre_set_wire_obdo) so that OST can use.

NOTE: currently lu_fid::f_ver and obdo::o_parent_ver are not used on
OFD device, and we use obdo::o_stripe_idx as
filter_fid::ff_parent::f_ver and save it to the device.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1154
Reviewed-on: http://review.whamcloud.com/12902
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
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: clio: rename coo_attr_set to coo_attr_update
Bobi Jam [Sun, 18 Sep 2016 20:38:43 +0000 (16:38 -0400)]
staging: lustre: clio: rename coo_attr_set to coo_attr_update

coo_attr_set() is used to update object's attribute but its name
makes confusion that people intuitively think that it is used to
pass object's attribute down to server sides.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1154
Reviewed-on: http://review.whamcloud.com/12888
Reviewed-by: Jinshan Xiong <jinshan.xiong@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: pack suppgid to MDS correctly
Fan Yong [Sun, 18 Sep 2016 20:38:42 +0000 (16:38 -0400)]
staging: lustre: llite: pack suppgid to MDS correctly

The ll_lookup_it() may trigger IT_OPEN RPC to open a file by name.
But at that time, the client does not know the target file's GID,
so it cannot pack the necessary supplementary group ID in the RPC.
Because of missing the supplementary group ID, the RPC maybe fail
for open permission check on the MDS. Under such case, MDS should
return the target file's GID, if the current thread on the client
in the right group (according to the file's GID), the client will
try the IT_OPEN RPC again with the right supplementary group ID.

This patch is also helpful if some other(s) changed the file's GID
after current RPC sent to the MDS with the suppgid as the original
GID by race.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5423
Reviewed-on: http://review.whamcloud.com/12476
Reviewed-by: Lai Siyao <lai.siyao@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: remove lustre/include/linux/
John L. Hammond [Sun, 18 Sep 2016 20:38:41 +0000 (16:38 -0400)]
staging: lustre: remove lustre/include/linux/

Merge the contents of lustre/include/linux/lvfs.h into
lustre/include/lvfs.h. Merge lustre/include/linux/lustre_user.h into
lustre/include/lustre/lustre_user.h. Move lustre_compat25.h and
lustre_patchless_compat.h from lustre/include/linux/ to
lustre/include/ and rename lustre_compat25.h to lustre_compat.h.

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/13271
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@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: check mask returned by cpumask_of_node
Liang Zhen [Sun, 18 Sep 2016 20:38:40 +0000 (16:38 -0400)]
staging: lustre: libcfs: check mask returned by cpumask_of_node

cpumask_of_node can return NULL if NUMA node is unavailable,
in this case cfs_node_to_cpumask will try to copy from NULL
and cause kernel panic.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5751
Reviewed-on: http://review.whamcloud.com/13207
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.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: obd: change type of cl_conn_count to size_t
Dmitry Eremin [Sun, 18 Sep 2016 20:38:39 +0000 (16:38 -0400)]
staging: lustre: obd: change type of cl_conn_count to size_t

Change type of cl_conn_count to size_t.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/13125
Reviewed-by: James Simmons <uja.ornl@gmail.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: unlock inode size in ll_lov_setstripe_ea_info()
John L. Hammond [Sun, 18 Sep 2016 20:38:38 +0000 (16:38 -0400)]
staging: lustre: llite: unlock inode size in ll_lov_setstripe_ea_info()

In ll_lov_setstripe_ea_info() release the inode size lock on all
appropriate exit paths.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6059
Reviewed-on: http://review.whamcloud.com/13167
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lprocfs: cleanup stats locking code
Andreas Dilger [Sun, 18 Sep 2016 20:38:37 +0000 (16:38 -0400)]
staging: lustre: lprocfs: cleanup stats locking code

Add comment blocks on lprocfs_stats_lock() and lprocfs_stats_unlock().
Move common NOPERCPU code out of the switch() statements to reduce
code size and complexity, since it doesn't depend on the opc at all.

Replace switch() in lprocfs_stats_unlock() with a simple if/else,
since the lock opc was already checked in lprocfs_stats_lock().

Add an enum for the lprocfs_stats_lock() operations to make it clear
what the valid values are and allow compiler checking.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5946
Reviewed-on: http://review.whamcloud.com/12872
Reviewed-by: Bobi Jam <bobijam@hotmail.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: osc: change cl_extent_tax and *grants to unsigned
Dmitry Eremin [Sun, 18 Sep 2016 20:38:36 +0000 (16:38 -0400)]
staging: lustre: osc: change cl_extent_tax and *grants to unsigned

Change the type accordant usage and remove warnings.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12386
Reviewed-by: James Simmons <uja.ornl@gmail.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: osc: osc_object_ast_clear() LBUG
Bobi Jam [Sun, 18 Sep 2016 20:38:35 +0000 (16:38 -0400)]
staging: lustre: osc: osc_object_ast_clear() LBUG

An OSC object could be destroyed with AGL locks waiting for granted,
so we'd get rid of the osc_object_ast_clear() assertion that its
dlm locks all getting granted.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6042
Reviewed-on: http://review.whamcloud.com/13163
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.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: mgc: add nid iteration
Alexander Boyko [Sun, 18 Sep 2016 20:38:18 +0000 (16:38 -0400)]
staging: lustre: mgc: add nid iteration

mgc_apply_recover_logs use only first nid from entry,
this could be the problem for a cluster with several network
address for a one node.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5950
Xyratex-bug-id: MRP-2255
Reviewed-on: http://review.whamcloud.com/12829
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Ann Koehler <amk@cray.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ptlrpc: fix race between connect vs resend
Alexander Boyko [Sun, 18 Sep 2016 20:38:34 +0000 (16:38 -0400)]
staging: lustre: ptlrpc: fix race between connect vs resend

Buggy code at ptlrpc_connect_interpret()
finish:
    rc = ptlrpc_import_recovery_state_machine(imp);
    ...
    Set import connection flags
When import has FULL state ptlrpc_import_recovery_state_machine()
wakeup all waiters on import and all delayed request, which was
resented. And it could happened that request was send without
updated flags and AT is disabled. If such request is in progress
on the server, server drop the new instance, and could do early reply
for it. But this early reply confuse client, cause it wait real
reply(no AT for this request). Client try to touch buffer outside
reply and got EPROTO error.
The same bug existed for initital connect too. Import became FULL
before import connection flags was set.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5528
Xyratex-bug-id: MRP-2034
Reviewed-on: http://review.whamcloud.com/11723
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com>
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: lov: flatten struct lov_stripe_md
John L. Hammond [Sun, 18 Sep 2016 20:38:33 +0000 (16:38 -0400)]
staging: lustre: lov: flatten struct lov_stripe_md

Flatten out the lsm_wire struct from the middle of struct
lov_stripe_md and remove the member name macros.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/12581
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: ldlm: move LDLM_GID_ANY to lustre_dlm.h
Jinshan Xiong [Sun, 18 Sep 2016 20:38:32 +0000 (16:38 -0400)]
staging: lustre: ldlm: move LDLM_GID_ANY to lustre_dlm.h

lustre_idl.h only includes wire data; lustre_dlm.h is the
right place for LDLM_GID_ANY.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6028
Reviewed-on: http://review.whamcloud.com/13074
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.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: ptlrpc: fix comparison between signed and unsigned
Dmitry Eremin [Sun, 18 Sep 2016 20:38:31 +0000 (16:38 -0400)]
staging: lustre: ptlrpc: fix comparison between signed and unsigned

Change return type and size argiments of lustre_msg_hdr_size(),
lustre_msg_buf{len,count}() and req_capsule_*_size() to __u32.
Change type of req_format->rf_idx and req_format->rf_fields.nr
to size_t. Also return zero for incorrect message magic instead
of -EINVAL. This will be more robust because of few of them after
LASSERTF(0, "...") and will not be returned. In the rest places
it return zero size instead of huge number after implicit
unsigned conversion.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12475
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@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: clio: add coo_getstripe interface
Bobi Jam [Sun, 18 Sep 2016 20:38:30 +0000 (16:38 -0400)]
staging: lustre: clio: add coo_getstripe interface

Use cl_object_operations::coo_getstripe() to handle
LL_IOC_LOV_GETSTRIPE ops.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/12452
Reviewed-by: John L. Hammond <john.hammond@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: obdclass: change cl_fault_io->ft_nob to size_t
Dmitry Eremin [Sun, 18 Sep 2016 20:38:29 +0000 (16:38 -0400)]
staging: lustre: obdclass: change cl_fault_io->ft_nob to size_t

Change the type accordant usage.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12380
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: obd: change brw_page->count to unsigned
Dmitry Eremin [Sun, 18 Sep 2016 20:38:28 +0000 (16:38 -0400)]
staging: lustre: obd: change brw_page->count to unsigned

Pages count is unsigned. So, change the type accordant usage.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12378
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: ldlm: Recalculate interval in ldlm_pool_recalc()
Nathaniel Clark [Sun, 18 Sep 2016 20:38:27 +0000 (16:38 -0400)]
staging: lustre: ldlm: Recalculate interval in ldlm_pool_recalc()

Instead of rechecking a static value, recalculate to see if pool stats
need to be updated.
Add newline so message will print instead of warning about missing
newline.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4536
Reviewed-on: http://review.whamcloud.com/12547
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ptlrpc: Suppress error message when imp_sec is freed
Amir Shehata [Sun, 18 Sep 2016 20:38:26 +0000 (16:38 -0400)]
staging: lustre: ptlrpc: Suppress error message when imp_sec is freed

There is a race condition on client reconnect when the import
is being destroyed.  Some outstanding client bound requests
are being processed when the imp_sec has alread been freed.
Ensure to suppress the error message in import_sec_validate_get()
in that case

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3353
Reviewed-on: http://review.whamcloud.com/10200
Reviewed-by: Andreas Dilger <andreas.dilger@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: obdclass: eliminate NULL error return
Bob Glossman [Sun, 18 Sep 2016 20:38:25 +0000 (16:38 -0400)]
staging: lustre: obdclass: eliminate NULL error return

Always return an ERR_PTR() on errors, never return a NULL,
in lu_object_find_slice().  Also clean up callers who
no longer need special case handling of NULL returns.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5858
Reviewed-on: http://review.whamcloud.com/12554
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@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>