summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iio: maxim_thermocouple: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pulsedlight-lidar-lite-v2: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: lmp91000: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: max30102: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: max30100: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: cio-dac: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: quad-8: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: stx104: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: impedance-analyzer: ad5933.c - style fixDerek Robson2017-02-191-8/+8
| | | | | | | | Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: compress return logicGargi Sharma2017-02-181-3/+1
| | | | | | | | | | | | | | | | | | | | Simplify function returns by merging assignment and return. Found with Coccinelle. Semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240_core: Replace symbolic permission with octal permissionsayli karnik2017-02-181-1/+1
| | | | | | | | | The patch resolves following checkpatch issue: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx Move out of staging.Jonathan Cameron2017-02-115-13/+13
| | | | | | | | | | | | | There are a few more little cleanups that could be done on this driver, but I don't think any are sufficient to justify not moving it out of staging. It's a very simple driver (presumably for a simple part) so not much that can go wrong. I think it was only ever in staging because that's where IIO was as a whole at the time and then we forgot about it! Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx rename local state structure to _stateJonathan Cameron2017-02-111-23/+23
| | | | | | | | | | Previously it was called _info with instances as info. This caused some confusion against the info structure that are used in the core of IIO. Since this driver was written it's become a fairly strong convention to use _state and st for instances so change to that. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx Apply consistent prefix to local definesJonathan Cameron2017-02-111-25/+29
| | | | | | | There was a bit of a random mixture going on here so change all prefixes to LPC32XXAD_ Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:spear Move out of staging.Jonathan Cameron2017-02-115-11/+12
| | | | | | | | | | | | There are some unanswered questions due to disagreements between the code and various datasheets (including between different datasheets for the same part). I don't think that is necessarily a reason to keep it in staging however. I'm partly posting this patch inorder to reignite debate and with a bit of luck find someone who has one of these to test! Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: iio: 104-quad-8: Fix KernelVersion in sysfs ABI documentationWilliam Breathitt Gray2017-02-111-9/+9
| | | | | | | | | | The ACCES 104-QUAD-8 IIO driver did not appear in the 4.9 version of the Linux kernel. This patch fixes the KernelVersion lines of the 104-QUAD-8 sysfs ABI documentation. Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8") Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: iio: Fix KernelVersion in counter sysfs ABI documentationWilliam Breathitt Gray2017-02-111-2/+2
| | | | | | | | | | The IIO counter driver support did not appear in the 4.9 version of the Linux kernel. This patch fixes the KernelVersion lines of the relevant IIO counter sysfs ABI documentation. Fixes: 1a8f324aa1f2 ("iio: Implement counter channel type and info constants") Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Documentation: add ABI documentation for ↵Brian Masney2017-02-111-0/+1
| | | | | | | | | | in_proximity_sampling_frequency_available Add entry for the in_proximity_sampling_frequency_available sysfs entry to the existing sampling_frequency_available ABI documentation. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: add copyrightBrian Masney2017-02-111-0/+1
| | | | | | | | Add Brian Masney's copyright to the header for the several rounds of staging cleanups that has been done to this driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: use the runtime power management for system sleepBrian Masney2017-02-111-1/+2
| | | | | | | | | | | With the introduction of runtime power management in commit 2db5054ac28d ("staging: iio: isl29028: add runtime power management support"), the system could go to sleep and turn off the device without notifying the runtime power management code. This patch changes the system suspend and resume to go through the runtime power management. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: fix incorrect sleep time when taking initial ↵Brian Masney2017-02-111-10/+21
| | | | | | | | | | | | proximity reading When proximity is enabled in isl29028_enable_proximity(), the function msleep() is called with the sampling frequency, which is not correct. This patch changes the code to sleep the specified amount of time listed in the datasheet instead. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: change mdelay() to msleep()Brian Masney2017-02-111-2/+2
| | | | | | | | | | This driver in some cases can busy wait for upwards of 100 ms. Since the kernel at this point is not running in atomic context, and is running in process context, we can safely use msleep() instead. This patch changes the two occurrences of mdelay() to msleep(). Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: meter: meter.h - style fixDerek Robson2017-02-111-30/+30
| | | | | | | | Changed file permissions to octal. Found with checkpatch. Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:temperature:tmp007: Add irq and threshold events supportManivannan Sadhasivam2017-02-051-12/+265
| | | | | | | | | | | | | | This patch adds ALERT irq and limit threshold events support for TI TMP007 - 16 bit IR thermopile sensor with integrated math engine. Following threshold events are supported: 1. TObj high limit 2. TObj low limit 3. TDie high limit 4. TDie low limit Signed-off-by: Manivannan Sadhasivam <manivannanece23@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health: add MAX30102 oximeter driver supportMatt Ranostay2017-02-053-0/+499
| | | | | | | | | | | | | | MAX30102 is an heart rate and pulse oximeter sensor that works using two LEDS of different wavelengths, and detecting the light reflected back. This patchset adds support for both IR and RED LED channels which can be processed in userspace to determine heart rate and blood oxygen levels. The MAX30102 part isn't completely register and functional compatible with the existing MAX30100 driver. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* devicetree: add documentation for MAX30102 oximeterMatt Ranostay2017-02-051-0/+30
| | | | | | Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: ad7192: fixed symbolic permission references 'S_IRUGO | S_IWUSR'Artur Lorincz2017-02-051-4/+4
| | | | | | | | Replaced the symbolic permission references S_IRUGO and S_IWUSR with their octal counterparts. Signed-off-by: Artur Lorincz <larturus@yahoo.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: addac: adt7136: Fix style to use octal file permissions.Michael S. Hansen2017-02-051-54/+54
| | | | | Signed-off-by: Michael S. Hansen <michael.schacht.hansen@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: Add driver for the Analog Devices ADXL345 3-axis accelerometerEva Rachel Retuya2017-02-053-0/+206
| | | | | | | | | | | | Add basic IIO support for the Analog Devices ADXL345 3-axis accelerometer. The datasheet can be found here: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: cros_ec_light_prox: add ChromeOS EC Light and Proximity SensorsGwendal Grignou2017-02-043-0/+300
| | | | | | | | | | Handle Light and Proximity sensors presented by the ChromeOS EC Sensor hub. Creates an IIO device for each functions. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: dt: iio: imu: st_lsm6dsx: add lsm6ds3h sensor device bindingLorenzo Bianconi2017-02-041-0/+1
| | | | | | Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: imu: st_lsm6dsx: add support to lsm6ds3hLorenzo Bianconi2017-02-046-6/+26
| | | | | | | | Add support to STM LSM6DS3H 6-axis (acc + gyro) Mems sensor http://www.st.com/resource/en/datasheet/lsm6ds3h.pdf Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: dt: iio: imu: st_lsm6dsx: add lsm6dsl sensor device bindingLorenzo Bianconi2017-02-041-0/+1
| | | | | | Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: imu: st_lsm6dsx: add support to lsm6dslLorenzo Bianconi2017-02-046-5/+18
| | | | | | | | Add support to STM LSM6DSL 6-axis (acc + gyro) Mems sensor http://www.st.com/resource/en/datasheet/lsm6dsl.pdf Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: imu: st_lsm6dsx: add support to multiple devices with the same settingsLorenzo Bianconi2017-02-042-15/+18
| | | | | | | | Add capability to support multiple devices with the same st_lsm6dsx_settings like LSM6DSM/LSM6DSL Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: distance: add devantech us ranger srf04Andreas Klinger2017-02-044-0/+322
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for the ultrasonic ranger srf04 of devantech. This device is measuring the distance of objects in a range between 1 cm and 3 meters and a theoretical resolution of 3 mm. There are two GPIOs used: - trigger: set as output to the device when the measurement should start - echo: set by the device when the ultrasonic wave is sent out and reset when the echo is recognized; this needs to be an interrupt input The time between setting and resetting the echo pin is the time the waveform needed for one round trip. This time is recorded in the interrupt handler. The distance is calculated in the read function by using the ultrasonic speed at 20 degrees celsius which is about 343 m/s. Signed-off-by: Andreas Klinger <ak@it-klinger.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: distance: add dt binding for devantech-srf04Andreas Klinger2017-02-041-0/+28
| | | | | | | | | | | This patch adds dt binding for devantech ultrasonic ranger srf04. The vendor "devantech" was already added to the vendor list with "[PATCH v4 1/3] iio: distance: srf08: add trivial DT binding" Signed-off-by: Andreas Klinger <ak@it-klinger.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: resolver: ad2s1210.c - style fixDerek Robson2017-02-041-12/+12
| | | | | | | | Changed symbolic permissions to octal permissions. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* mailmap: Change email to new Konsulko emailMatt Ranostay2017-02-041-0/+1
| | | | | Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: bcm2835: cleanup: remove deprecated <asm/uaccess.h> includeSeraphime Kirkovski2017-02-031-1/+1
| | | | | | | | This replaces the last occurrence of the deprecated <asm/uaccess.h> include in the staging directory with the newer <linux/uaccess.h> Signed-off-by: Seraphime Kirkovski <kirkseraph@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: libcfs: double copy bugDan Carpenter2017-02-031-2/+13
| | | | | | | | | | | The problem is that we copy hdr.ioc_len, we verify it, then we copy it again without checking to see if it has changed in between the two copies. This could result in an information leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: fix coding style issue in vvp_page.cZhengyi Shen2017-02-031-1/+2
| | | | | | | | This is a patch to fix "WARNING: line over 80 characters" found by checkpatch.pl in vvp_page.c. Signed-off-by: Zhengyi Shen <shenzhengyi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ptlrpc : remove userland usage from ptlrpcJames Simmons2017-02-032-17/+2
| | | | | | | | | | | | | | | | | | The reason for __REQ_LAYOUT_USER__ was to expose a section of code in layout.c to userland for a utility similar to wireshark. This was done before wireshark existed but now that it does we no longer need to do this type of hack. This also reduces lustre_acl.h to strictly a kernel header now. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8945 Reviewed-on: https://review.whamcloud.com/24396 Reviewed-by: Dmitry Eremin <dmitry.eremin@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>
* staging: lustre: osc: avoid 64 divide in osc_cache_too_muchJames Simmons2017-02-031-3/+8
| | | | | | | | | | | | | | | | The use of 64 bit time introduces an expensive 64 bit division operation. Since the time lapse being calculated in osc_cache_too_much will never be more than seventy years we can cast the time lapse to an long and perform a normal 32 bit divison operation instead. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8835 Reviewed-on: https://review.whamcloud.com/23814 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: lmv: remove nlink check in lmv_revalidate_slaveswang di2017-02-031-15/+1
| | | | | | | | | | | | | | | | | | | If an application attempts to remove millions of files in a single directory it will fail. This failure was tracked down to the nlink < 2 check in lmv_revalidate_slaves, because after nlink reaches to maximum value of LDISKFS_LINK_MAX (65000), the nlink broadcast back from the server will be reported as one. The return value of 1 is not invalid so lets remove the check. Signed-off-by: wang di <di.wang@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984 Reviewed-on: http://review.whamcloud.com/16490 Reviewed-by: James Simmons <uja.ornl@yahoo.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>
* staging: lustre: llite: don't invoke direct_IO for the EOF caseYang Sheng2017-02-031-0/+4
| | | | | | | | | | | | | | | The function generic_file_read_iter() does not check EOF before invoke direct_IO callback. So we have to check it ourselves. Signed-off-by: Yang Sheng <yang.sheng@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969 Reviewed-on: https://review.whamcloud.com/24552 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.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>
* staging: lustre: obd: move s3 in lmd_parse to inner loopJames Simmons2017-02-031-1/+2
| | | | | | | | | | | | | | | | | | | Building the lustre client with W=1 reports the following error: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: fid: Change positional struct initializers to C99Steve Guminski2017-02-032-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes no functional changes. Struct initializers in the fid directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializers have been updated: lustre/fid/fid_lib.c: const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE lustre/fid/lproc_fid.c: struct lprocfs_vars seq_client_debugfs_list Signed-off-by: Steve Guminski <stephenx.guminski@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: https://review.whamcloud.com/23789 Reviewed-by: Nathaniel Clark <nathaniel.l.clark@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>
* staging: lustre: ptlrpc: update replay cursor when close during replayNiu Yawei2017-02-032-27/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replay cursor should be updated properly when close happened during replay, otherwise, ptlrpc_replay_next() could run into a dead loop due to an invalid replay cursor: - replay cursor is moved to an open request during replay; - application close that open file, so the rq_replay of the open request is cleared; - ptlrpc_replay_next() calls ptlrpc_free_committed() to free committed/closed requests, the open request is removed from the committed list, so the replay cursor is changed to an empty list_head now. The open request won't be freed now since it's still held by the pending close request; - ptlrpc_replay_next() continue to move the replay cursor to next and run into a dead loop at the end; Another change in this patch is to remove the out of date comments in ptlrpc_replay_next() and cover the whole process of finding replay request within imp_lock, because: 1. With two separated replay lists and replay cursor introduced, finding replay request won't take much time as before, it's not necessary to do this "lock -> unlock -> lock -> unlock" trick anymore; 2. Nowadays there are various kind of non-replay requests are allowed during recovery, so ptlrpc_free_committed() may run in parallel to remove an open request while ptlrpc_replay_next() is iterating the open requests list; Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8765 Reviewed-on: https://review.whamcloud.com/23418 Reviewed-by: Yang Sheng <yang.sheng@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>
* staging: lustre: ptlrpc: update MODULE_PARAM_DESC in ptlrpcd.cDmitry Eremin2017-02-031-2/+3
| | | | | | | | | | | | | | | Update max_ptlrpcds module parameter descriptions to let users know its obsolete. Change cpt to CPT for the module parameter description ptlrpcd_per_cpt_max so it matches documentation. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8890 Reviewed-on: https://review.whamcloud.com/24065 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>