summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * iio: mma8452: add support for runtime power managementMartin Kepplinger2016-03-051-10/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for runtime power management and, if configured, activates automatic standby after 2 seconds of inactivity. Inactivity means no read of acceleration values and no events triggered or activated. If CONFIG_PM is not set, this doesn't change anything for existing users. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: avoid switching to active because of config changeMartin Kepplinger2016-03-051-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devices' config registers can only be changed in standby mode. Up until now the driver just held the device *always* active, so for changing a config it was *always* necessary to switch to standby. For upcoming support for runtime pm, the device can as well be in standby mode. Instead of putting runtime pm functions in there, just keep the device in standby if it already is. This section is protected by a lock after all. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: coding style fixesMartin Kepplinger2016-03-051-4/+6
| | | | | | | | | | | | | | | | fix checkpatch issues like "space before tabs", too long lines or alignment. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:magnetometer:ak8975: power regulator supportGregor Boirie2016-03-052-0/+18
| | | | | | | | | | | | | | | | | | Add support for an optional regulator which, if found into device-tree, will power on device at probing time. The regulator is declared into ak8975 DTS entry as a "vdd-supply" property. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:magnetometer:ak8975: remove unused fieldGregor Boirie2016-03-051-1/+0
| | | | | | | | | | | | | | Remove unused struct ak8975_data attrs field. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:magnetometer:ak8975: fix uninitialized chipsetGregor Boirie2016-03-051-1/+4
| | | | | | | | | | | | | | | | | | ak_def_array bounds are not properly checked in case of ACPI matching failure. GCC warns with the following message at line 799: ‘chipset’ may be used uninitialized in this function. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:at91-sama5d2: fix identationLudovic Desroches2016-03-051-10/+10
| | | | | | | | | | | | | | Remove some extra tabs. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:at91-sama5d2: fix typoLudovic Desroches2016-03-051-13/+13
| | | | | | | | | | | | | | Fix typo in the name of a macro. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:pressure:ms5611: oversampling rate supportGregor Boirie2016-03-054-23/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for setting and retrieving OverSampling Rate independently for each of the temperature and pressure channels. This allows userspace to fine tune hardware sampling process according to the following tradeoffs : * the higher the OSR, the finer the resolution ; * the higher the OSR, the lower the noise ; BUT: * the higher the OSR, the larger the drift ; * the higher the OSR, the longer the response time, i.e. less samples per unit of time. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:pressure:ms5611: complete DT supportGrégor Boirie2016-03-054-0/+46
| | | | | | | | | | | | | | | | Add device-tree ID tables and document bindings. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: potentiometer: tpl0102: change i2c functionality return codeMatt Ranostay2016-03-051-1/+1
| | | | | | | | | | | | | | | | Change i2c_check_functionality condition check return from ENOTSUPP to EOPNOTSUPP which is now the standard return code. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging: dgnc: clean up dgnc_input functionDaeseok Youn2016-03-311-21/+14
| | | | | | | | | | | | | | | | | | | | | | This is for fixing checkpatch.pl warning about "Alignment should match open parenthesis" but if that is fixed, code line is over 80 characters. I think "ch->ch_rqueue + tail + i" could be declared once in the begining of loop. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: dgnc: remove useless variables for saving tty'sDaeseok Youn2016-03-312-7/+0
| | | | | | | | | | | | | | | | | | It doesn't need to save major number with variable. And there are no use of these variables(dgnc_serial_major and dgnc_transparent_print_major) Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: unisys: visorbus: remove unnecessary poll_count logicTim Sell2016-03-311-7/+0
| | | | | | | | | | | | | | | | | | The use of poll_count is a vestige from long-ago testing, which is no longer needed. It is removed by this patch. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: delete linux-mem.hJames Simmons2016-03-313-62/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The header linux-mem.h is no longer needed. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: move NUM_CACHEPAGES to libcfs_prim.hJames Simmons2016-03-312-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really need linux specific headers anymore so move NUM_CACHEPAGES macro to libcfs_prim.h. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: remove MMSPACE macrosJames Simmons2016-03-312-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Another abstraction that is not needed. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: remove page_index() macroJames Simmons2016-03-313-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Just use the index field directly for struct page. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: move memory_pressure functions to libcfs_prim.hJames Simmons2016-03-312-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long ago libcfs_prim.h was used for userland code which is why memory_pressure_*() handling is in both libcfs_prim.h and linux-mem.h headers. So lets just move the memory_pressure_*() to libcfs_prim.h. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: libcfs: move add_wait_queue_exclusive_head to lustre layerJames Simmons2016-03-313-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Only lustre client uses add_wait_queue_exclusive_head() so move it from libcfs layer to lustre_lib.h where it is needed. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13874 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre: lov_io_init() should return error codeBobi Jam2016-03-303-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lov_io_init_empty/release() should returns error code instead of true on error case. Fault IO needs to handle restart in the case of accessing HSM released file Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reviewed-on: http://review.whamcloud.com/17240 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7446 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/ldlm: Solve a race for LRU lock cancelVitaly Fertman2016-03-303-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch solves a race condition that the lock may be used again after LRU cancellation policy check. In that case, the lock may have locked or dirty pages that makes the policy check totally useless. The problem is solved by checking l_last_used at cancellation time therefore it can make sure that the lock has not been used. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Reviewed-on: http://review.whamcloud.com/12603 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5781 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre: Fix spacing style before open parenthesisOleg Drokin2016-03-309-85/+85
| | | | | | | | | | | | | | | | | | This fixes the remaining occurences of checkpatch warnings of the form of WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/ldlm: restore the ELC for enqueueVitaly Fertman2016-03-303-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after LU-4300 enqueue does not ELC anymore, however if enqueue is agressive (ls -la of a large dir) we may exceed lru-resize limit quickly because LRUR shrinker and recalc are called not so often. ELC is to be restored in enqueue. ELC also should check for the lock weight, in addition to LRUR. ELC can also keep "skipped" locks, i.e. once checked for the weight and left in the lru - let LRUR take care about them later. LRUR is to be left untouched, no weight logic, otherwise LU-5727 appears and OPEN locks do not get canceled. Xyratex-bug-id: MRP-2550 Signed-off-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-on: http://review.whamcloud.com/14342 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6390 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/ldlm: revert changes to ldlm_cancel_aged_policy()Niu Yawei2016-03-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes to ldlm_cancel_aged_policy() introduced from LU-4300 was incorrect. This patch revert this part of changes. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Reviewed-on: http://review.whamcloud.com/12448 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/ldlm: ELC picks locks in a safer policyJinshan Xiong2016-03-305-29/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the policy of ELC to pick locks that have no dirty pages, no page in writeback state, and no locked pages. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/9175 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4300 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bobi Jam <bobijam@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Remove unused vui_local_lock fieldOleg Drokin2016-03-302-15/+0
| | | | | | | | | | | | | | | | | | vvp_io_setattr_lock is the only user that sets it, but it's never checked anywhere, so could go away. Also get rid of enum ccc_setattr_lock_type that becomes unused. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Move several declarations to llite_internal.hJohn Hammond2016-03-302-36/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move several declarations between llite_internal.h and vvp_internal.h with the goal of reserving the latter header for functions that pertain to vvp_{device,object,page,...}. Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/13714 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Move ll_dirent_type_get and make it staticOleg Drokin2016-03-303-23/+22
| | | | | | | | | | | | | | | | ll_dirent_type_get is only used in one place in llite/dir.c, so move it there. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Remove ccc_global_{init, fini}()John Hammond2016-03-305-57/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge their contents into vvp_global_{init,fini}() and {init,exit}_lustre_lite(). Rename ccc_inode_fini_* to cl_inode_fini_*. Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/13714 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename struct ccc_thread_info to vvp_thread_infoJohn Hammond2016-03-3010-80/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct ccc_thread_info is used in the VVP parts of llite so rename it struct vvp_thread_info. Rename supporting functions accordingly. Move init code from lcommon_cl.c to vvp_dev.c Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/13714 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Rename struct vvp_thread_info to ll_thread_infoJohn Hammond2016-03-304-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | struct vvp_thread_info is used in the non-VVP parts of llite so rename it struct ll_thread_info. Rename supporting functions accordingly. Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/13714 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: Rename struct ccc_grouplock to ll_grouplockJohn Hammond2016-03-305-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | And move the definition from vvp_internal.h to llite_internal.h. Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/13714 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename ccc_req to vvp_reqJohn L. Hammond2016-03-306-120/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename struct ccc_req to struct vvp_req and move related functions from lustre/llite/lcommon_cl.c to the new file lustre/llite/vvp_req.c. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13377 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: move vvp_io functions to vvp_io.cJohn L. Hammond2016-03-304-222/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | Move all vvp_io related functions from lustre/llite/lcommon_cl.c to the sole file where they are used lustre/llite/vvp_io.c. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13376 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: use vui prefix for struct vvp_io membersJohn L. Hammond2016-03-308-138/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename members of struct vvp_io to used to start with vui_ rather than cui_. Rename several instances of struct vvp_io * from cio to vio. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13363 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: merge ccc_io and vvp_ioJohn L. Hammond2016-03-3011-215/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the contents of struct vvp_io into struct ccc_io, delete the former, and rename the latter to struct vvp_io. Rename various ccc_io related functions to use vvp rather than ccc. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13351 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre:llite: remove struct ll_ra_readJohn L. Hammond2016-03-303-86/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since removal of the the unused function ll_ra_read_get(), the struct ll_ra_read members lrr_reader and lrr_linkage and the struct ll_readahead_state member ras_read_beads unnecessary so remove them. In struct vvp_io replace the struct ll_ra_read cui_bead member with cui_ra_start and cui_ra_count. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13347 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename ccc_lock to vvp_lockJohn L. Hammond2016-03-305-72/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename struct ccc_lock to struct vvp_lock and merge the CCC lock methods into the VVP lock methods. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13088 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename ccc_page to vvp_pageJohn L. Hammond2016-03-3011-132/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename struct ccc_page to struct vvp_page and remove obsolete CCC page methods. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13086 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename ccc_object to vvp_objectJohn L. Hammond2016-03-3015-271/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename struct ccc_object to struct vvp_object and merge the CCC object methods into the VVP object methods. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13077 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: rename ccc_device to vvp_deviceJohn L. Hammond2016-03-305-128/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename struct ccc_device to struct vvp_device and merge the CCC device methods into the VVP device methods. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/13075 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: merge lclient.h into llite/vvp_internal.hJohn L. Hammond2016-03-3012-417/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the definition of struct cl_client_cache to lustre/include/cl_object.h and move the rest of lustre/include/lclient.h in to lustre/llite/vvp_internal.h. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/12592 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5971 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: make sure we do cl_page_clip on the last pageLi Dongyang2016-03-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are doing a partial IO on both first and last page, the logic currently only call cl_page_clip on the first page, which will end up with a incorrect i_size. Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au> Reviewed-on: http://review.whamcloud.com/11630 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5552 Reviewed-by: Ian Costello <costello.ian@gmail.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Li Xi <pkuelelixi@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: deadlock for page writeJinshan Xiong2016-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing thread already locked page #1, and then wait for the Writeback bit of page #2; Ptlrpc thread is composing a write RPC, so it sets Writeback on page #2 and tries to lock page #1 to make it ready. Deadlocked. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/9036 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4540 Reviewed-by: wangdi <di.wang@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/llite: clip page correctly for vvp_io_commit_syncJinshan Xiong2016-03-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The original code was wrong which clipped page incorrectly for partial pages started with zero. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/8531 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4201 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wangdi <di.wang@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre: update comments after cl_lock simplificationBobi Jam2016-03-302-124/+19
| | | | | | | | | | | | | | | | | | | | | | | | Update comments to reflect current cl_lock situations. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reviewed-on: http://review.whamcloud.com/13137 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6046 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/clio: cl_lock simplificationJinshan Xiong2016-03-3033-5525/+1168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, the cl_lock cache is eliminated. cl_lock is turned into a cacheless data container for the requirements of locks to complete the IO. cl_lock is created before I/O starts and destroyed when the I/O is complete. cl_lock depends on LDLM lock to fulfill lock semantics. LDLM lock is attached to cl_lock at OSC layer. LDLM lock is still cacheable. Two major methods are supported for cl_lock: clo_enqueue and clo_cancel. A cl_lock is enqueued by cl_lock_request(), which will call clo_enqueue() methods for each layer to enqueue the lock. At the LOV layer, if a cl_lock consists of multiple sub cl_locks, each sub locks will be enqueued correspondingly. At OSC layer, the lock enqueue request will tend to reuse cached LDLM lock; otherwise a new LDLM lock will have to be requested from OST side. cl_lock_cancel() must be called to release a cl_lock after use. clo_cancel() method will be called for each layer to release the resource held by this lock. At OSC layer, the reference count of LDLM lock, which is held at clo_enqueue time, is released. LDLM lock can only be canceled if there is no cl_lock using it. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/10858 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3259 Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre/clio: generalize cl_sync_ioJinshan Xiong2016-03-303-45/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make cl_sync_io interfaces not just wait for pages, but to be a generic synchronization mechanism. Also remove cl_io_cancel that became not used. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/8656 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4198 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/lustre: Remove struct ll_iattrOleg Drokin2016-03-306-66/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This was a compat code from the time it had ia_attr_flags. Instead convert all the cryptic callers that did ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags into direct access to op_data->op_attr_flags This also makes lustre/include/linux/obd.h not needed anymore, so remove it. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud