summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: lustre: header: remove assert from interval_set()James Simmons2017-02-031-2/+3
| | | | | | | | | | | | | | | | | | | | In the case of interval_tree.h only interval_set() uses LASSERT which is removed in this patch and interval_set() instead reports a real error. The header libcfs.h for interval_tree.h is not needed anymore so we can just use the standard linux kernel headers instead.h Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22522 Reviewed-on: https://review.whamcloud.com/24323 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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: ASSERTION(flock->blocking_export!=0) failedAndriy Skulysh2017-02-031-1/+0
| | | | | | | | | | | | | | | | | | Whole policy structure was zeroed twice. Once during enqueue and second time during resend or replay. Policy structure should be initialized with default values only in ldlm_lock_new(). Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com> Signed-off-by: Ben Evans <bevans@cray.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8349 Seagate-bug-id: MRP-2536, MRP-2909 Reviewed-on: http://review.whamcloud.com/21061 Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com> Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: remove ldlm_wire_policy_data_t typedef usage from codeAndreas Dilger2016-11-291-2/+2
| | | | | | | | | | | | | | | | | | Replace usage of ldlm_wire_policy_data_t with named enums to conform to upstream coding style. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: http://review.whamcloud.com/15300 Reviewed-on: http://review.whamcloud.com/15301 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> 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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: remove ldlm_policy_data_t typedef usage from codeAndreas Dilger2016-11-291-2/+2
| | | | | | | | | | | | | | | | | | Replace usage of ldlm_policy_data_t with named enums to conform to upstream coding style. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: http://review.whamcloud.com/15300 Reviewed-on: http://review.whamcloud.com/15301 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> 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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: conflicting PW & PR extent locks on a clientAndriy Skulysh2016-11-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | PW lock isn't replayed once a lock is marked LDLM_FL_CANCELING and glimpse lock doesn't wait for conflicting locks on the client. So the server will grant a PR lock in response to the glimpse lock request, which conflicts with the PW lock in LDLM_FL_CANCELING state on the client. Lock in LDLM_FL_CANCELING state may still have pending IO, so it should be replayed until LDLM_FL_BL_DONE is set to avoid granted conflicting lock by a server. Seagate-bug-id: MRP-3311 Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com> Reviewed-on: http://review.whamcloud.com/20345 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8175 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: Make alignment match open parenthesisOleg Drokin2016-08-211-2/+2
| | | | | | | | | | This patch fixes most of checkpatch occurences of "CHECK: Alignment should match open parenthesis" in Lustre code. Signed-off-by: Emoly Liu <emoly.liu@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: Replace sun.com GPLv2 URL with gnu.org one.Oleg Drokin2016-06-171-1/+1
| | | | | | | | | | http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no longer around, so replae it with (hopefully more permanent) http://http://www.gnu.org/licenses/gpl-2.0.html Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: Remove the "Please contact SUN for GPL" from headersOleg Drokin2016-06-171-4/+0
| | | | | | | | | | | | | Since SUN is no longer around and there's no point in contacting them, just remove that whole thing. Copy of GPL is available online anyway (URLs to be updated in next patch). This patch was generated with: find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \; Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: use accessor macros for l_flagsBruce Korb2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | Convert most of the ldlm lock's l_flags references from direct bit twiddling to using bit specific macros. A few multi-bit operations are left as an exercise for the reader. The changes are mostly in ldlm, but also in llite, osc and quota. Also add a multi-bit (mask) test. Signed-off-by: Bruce Korb <bruce.korb@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906 Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-on: http://review.whamcloud.com/7963 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: Replace kmem_cache_alloc with kmem_cache_zallocAmitoj Kaur Chawla2016-03-011-1/+1
| | | | | | | | | | | | | | | | | | | Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory to zero. The Coccinelle semantic patch used to make this change is as follows: // <smpl> @@ expression e,f; @@ - kmem_cache_alloc(e, f |__GFP_ZERO) + kmem_cache_zalloc(e, f) // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/ldlm: Adjust comments to better conform to coding styleOleg Drokin2016-02-251-4/+8
| | | | | | | | This patch fixes "Block comments use a trailing */ on a separate line" warnings from checkpatch. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: Remove ldlm type/mode typedefsOleg Drokin2016-02-251-1/+1
| | | | | | | | Replace ldlm_mode_t with enum ldlm_mode, ldlm_type_t with enum ldlm_type Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/ldlm: Adjust NULL comparison codestyleOleg Drokin2016-02-201-5/+4
| | | | | | | | | | All instances of "x == NULL" are changed to "!x" and "x != NULL" to "x" Also remove some redundant assertions. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm_extent.c: replace IS_PO2 by is_power_of_2Aya Mahfouz2015-11-151-1/+1
| | | | | | | | | | Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: replace OBD_SLAB_FREE with kmem_cache_freeMike Rapoport2015-10-241-1/+1
| | | | | | | Use kmem_cache_free directly instead of wrapping macro. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: replace OBD_SLAB_ALLOC_PTR_GFP with kmem_cache_allocMike Rapoport2015-10-241-1/+1
| | | | | | | | The OBD_SLAB_ALLOC_PTR_GFP macro expands to call to kmem_cache_alloc, which may be used directly. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove multiple blank linesMike Rapoport2015-10-131-1/+0
| | | | | | | | | | | | | | | Fixes checkpatch.pl CHECK:LINE_SPACING: Please don't use multiple blank lines. The patch is generated using checkpatch.pl --fix-inplace: for f in $(find drivers/staging/lustre/ -type f) ; do ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=multiple \ --fix-inplace -f $f done Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/ldlm: Remove unused exported symbols.Oleg Drokin2015-10-021-11/+11
| | | | | | | | | | | | | | | | This rather large patch prunes all unused EXPORT_SYMBOLS and marks functions only used locally as static lustre ldlm module. The only two remaining nonstatic functions that should be static now are: ldlm_cancel_lru_local ldlm_resource_putref_locked But some bigger code shuffling around is needed to achieve that, so it's left for a future patch. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: lustre: lustre: idlm: Move trailing statement to next lineHaneen Mohammed2015-03-011-1/+2
| | | | | | | | This patch Fix both "trailing statement should be on next line" and space before semicolon errors addressed by checkpatch.pl Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ldlm: Add missing newlines after declarationsAndreas Ruprecht2014-11-261-1/+3
| | | | | | | | checkpatch.pl complains about a number of missing newlines after declarations. This patch gets rid of these warnings. Signed-off-by: Andreas Ruprecht <rupran@einserver.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove LPU64 defineGreg Kroah-Hartman2014-07-121-1/+1
| | | | | | | | Just use the proper modifier type... Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: ptlrpc/ldlm: remove ccflags from MakefileGreg Kroah-Hartman2014-07-111-7/+5
| | | | | | | | | | Fix up the relative paths in the .c files to properly build with the Makefile change. Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: hpdd-discuss <hpdd-discuss@lists.01.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove top level ccflags variableGreg Kroah-Hartman2014-07-111-1/+1
| | | | | | | | | | | | | | | | | We need to remove the ccflags from the Lustre code as it prevents individual object files from building properly in the kernel build system. It also hids the horrid mess that the Lustre include files are made up of. Start out by removing the toplevel ccflags variable pointing to drivers/staging/lustre/include/ as a valid include path. This requires the absolute include markings of a bunch of .h and .c files, which is also done here. Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: hpdd-discuss <hpdd-discuss@lists.01.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: restore __GFP_WAIT flag to memalloc callsAnn Koehler2014-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Lustre 2.4, the flags passed to the memory allocation functions are translated from CFS enumeration values types to the kernel GFP values by calling cfs_alloc_flags_to_gfp(). This function adds __GFP_WAIT to all flags except CFS_ALLOC_ATOMIC. In 2.5, when the cfs wrappers were dropped, cfs_alloc_flags_to_gfp() was removed and the CFS_ALLOC_xxxx was simply replaced with __GFP_xxxx. This means that most memory allocation calls are missing the __GFP_WAIT flag. The result is that Lustre experiences more ENOMEM errors, many of which the higher levels of Lustre do not handle robustly. Notes GFP_NOFS = __GFP_WAIT | __GFP_IO. So the patch replaces __GFP_IO with GFP_NOFS. Patch does not add __GFP_WAIT to GFP_IOFS. GFP_IOFS was not used in Lustre 2.4 so it has never been used with __GFP_WAIT. Signed-off-by: Ann Koehler <amk@cray.com> Signed-off-by: Emoly Liu <emoly.liu@intel.com> Reviewed-on: http://review.whamcloud.com/9223 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4357 Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: lustre: Fix paranthesis not required around returnRashika Kheria2013-10-261-1/+1
| | | | | | | | | This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_extent.c- ERROR: return is not a function, parentheses are not required Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove RETURN macroGreg Kroah-Hartman2013-08-031-4/+4
| | | | | | | | | We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove ENTRY macroGreg Kroah-Hartman2013-08-021-2/+0
| | | | | | | | | We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: add Lustre file system client supportPeng Tao2013-05-141-0/+242
Lustre is the most deployed distributed file system in the HPC (High Performance Computing) world. The patch adds its client side support. The code is not very clean and needs to live in drivers/staging for some time for continuing cleanup work. See drivers/staging/lustre/TODO for details. The code is based on Lustre master commit faefbfc04 commit faefbfc0460bc00f2ee4c1c1c86aa1e39b9eea49 Author: Alex Zhuravlev <alexey.zhuravlev@intel.com> Date: Tue Apr 30 23:05:21 2013 +0400 LU-3244 utils: tunefs.lustre should preserve virgin label Plus a few under-review patches on Whamcloud gerrit: 3.8 kernel support: http://review.whamcloud.com/#change,5973 http://review.whamcloud.com/#change,5974 http://review.whamcloud.com/#change,5768 http://review.whamcloud.com/#change,5781 http://review.whamcloud.com/#change,5763 http://review.whamcloud.com/#change,5613 http://review.whamcloud.com/#change,5655 3.9 kernel support: http://review.whamcloud.com/#change,5898 http://review.whamcloud.com/#change,5899 Kconfig/Kbuild: http://review.whamcloud.com/#change,4646 http://review.whamcloud.com/#change,4644 libcfs cleanup: http://review.whamcloud.com/#change,2831 http://review.whamcloud.com/#change,4775 http://review.whamcloud.com/#change,4776 http://review.whamcloud.com/#change,4777 http://review.whamcloud.com/#change,4778 http://review.whamcloud.com/#change,4779 http://review.whamcloud.com/#change,4780 All starting/trailing whitespaces are removed, to match kernel coding style. Also ran scripts/cleanfile on all lustre source files. [maked the Kconfig depend on BROKEN as the recent procfs changes causes this to fail - gregkh] Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud