aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/lustre_dlm_flags.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-06-05staging: lustre: delete the filesystem from the tree.Greg Kroah-Hartman1-402/+0
The Lustre filesystem has been in the kernel tree for over 5 years now. While it has been an endless source of enjoyment for new kernel developers learning how to do basic codingstyle cleanups, as well as an semi-entertaining source of bewilderment from the vfs developers any time they have looked into the codebase to try to figure out how to port their latest api changes to this filesystem, it has not really moved forward into the "this is in shape to get out of staging" despite many half-completed attempts. And getting code out of staging is the main goal of that portion of the kernel tree. Code should not stagnate and it feels like having this code in staging is only causing the development cycle of the filesystem to take longer than it should. There is a whole separate out-of-tree copy of this codebase where the developers work on it, and then random changes are thrown over the wall at staging at some later point in time. This dual-tree development model has never worked, and the state of this codebase is proof of that. So, let's just delete the whole mess. Now the lustre developers can go off and work in their out-of-tree codebase and not have to worry about providing valid changelog entries and breaking their patches up into logical pieces. They can take the time they have spend doing those types of housekeeping chores and get the codebase into a much better shape, and it can be submitted for inclusion into the real part of the kernel tree when ready. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: lustre: add SPDX identifiers to all lustre filesGreg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/lustre files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: James Simmons <jsimmons@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: lustre: fix incorrect multi-line comment styleAastha Gupta1-2/+4
This patch fixes the checkpatch.pl warning: WARNING: block comments use a trailing */ on a separate line Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: lustre: ldlm: handle ldlm lock cancel race when evicting client.Jinshan Xiong1-0/+3
A ldlm lock could be canceled simutaneously by ldlm bl thread and cleanup_resource(). In this case, only one side will win the race and the other side should wait for the work to complete. Eviction on group lock is now well supported. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-by: Bobi Jam <bobijam@hotmail.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>
2016-08-21staging: lustre: ldlm: flock completion fixes.Vitaly Fertman1-15/+21
Move checks for FAILED, DESTROYED flags under ldlm spinlock, destroy flock atomically with the check it is not destroyed yet. Do not put the granted flock into the resource if this is UNLOCK, TEST, or DEADLOCK'ed flock. Later a regression for this patch was reported under LU-7626. The refcount nonzero (1) after lock cleanup errors was reported. The reason is that the case LCK_NL was not handled for obdecho. Patch 17791 resolved this issue which has been combined into this upstream patch. Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2177 Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com> Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com> Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Xyratex-bug-id: MRP-1588 Reviewed-on: http://review.whamcloud.com/10005 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7626 Reviewed-by: Mirza Arshad Mirza Hussain <arshad.hussain@seagate.com> Reviewed-by: Alexey Leonidovich Lyashkov <alexey.lyashkov@seagate.com> Reviewed-on: http://review.whamcloud.com/17791 Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28staging: lustre: ldlm: update comments about ldlm l_flagsBruce Korb1-7/+7
Add and update documentation about some of the ldlm l_flags. Signed-off-by: Bruce Korb <bruce.korb@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906 Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-on: http://review.whamcloud.com/7963 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28staging: lustre: ldlm: remove code wireshark handlingBruce Korb1-86/+1
Wireshark output moved to userland file "lustre_dlm_flags_wshark.c" and only bits that can actually appear "on the wire" are emitted. The user land "packet-lustre.c" code that references these bits now gets emitted into that file. e.g. the "local_only" bit is never put on the wire, so references to it in wireshark are gone. Signed-off-by: Bruce Korb <bruce.korb@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906 Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-on: http://review.whamcloud.com/7963 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28staging: lustre: ldlm: clean up l_flagsBruce Korb1-14/+2
Remove the now obsolete LDLM_AST_FLAGS and LDLM_INHERIT_FLAGS defines. Remove the obsolete LDLM_FL_HIDE_LOCK_MASK define. Rename "local_only" mask to "off_wire" since it is confusingly similar to a flag that (I think) means, "do not copy this lock over the wire." Signed-off-by: Bruce Korb <bruce.korb@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906 Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-on: http://review.whamcloud.com/7963 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28staging: lustre: ldlm: use accessor macros for l_flagsBruce Korb1-0/+3
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>
2016-02-25staging/lustre/include: Adjust comment styleOleg Drokin1-17/+34
This fixes most of the "Block comments use a trailing */ on a separate line" checkpatch warnings, also some slight reformats of structures or comments at places. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: lustre: Fixed the parenthesisShalin Mehta1-2/+2
The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags. Signed-off-by: Shalin Mehta <shalinmehta85@gmail.com> Acked-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: lustre: lustre_dlm_flags: stop using C99 commentsMike Rapoport1-38/+38
Convert C99-style // comments to C89-style comments and fix C99_COMMENTS checpatch errors. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: lustre: fix whitespace errors reported by checkpatch.plMike Rapoport1-76/+76
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging/lustre: Update header license for lustre_dlm_flags.hOleg Drokin1-13/+4
lustre_dlm_flags.h was autogenerated with a wrong script that mistakenly stated it is GPLv3 when in fact it should be GPLv2. Also since we are no longer autogenerating this header, drop all such mentionings. Reported by: George G. Davis <ggdavisiv@gmail.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6599 Reviewed-on: http://review.whamcloud.com/14797 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> CC: George G. Davis <ggdavisiv@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: lustre: Fix typo in lustre/include part1Masanari Iida1-2/+2
Fix typo in comments within lustre/include. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging/lustre/ptlrpc: flock deadlock detection does not workAndriy Skulysh1-3/+11
Flock deadlocks are checked on the first attempt to grant the flock only. If we try again to grant it after its blocking lock is cancelled, we don't check for deadlocks which also may exist. Perform deadlock detection during reprocess Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1715 Lustre-change: http://review.whamcloud.com/3553 Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com> Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Reviewed-by: Bruce Korb <bruce_korb@xyratex.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19drivers/staging/lustre: indent lustre_ldlm_flags_valsPeng Tao1-40/+40
To follow kernel's "no spaces at the start of a line" rule. Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging/lustre/hsm: Implementation of exclusive openJinshan Xiong1-2/+10
Proposed way to do exclusive open: 0. First of all, we have to perform most of the work in kernel space; 1. Client exclusively opens the file with IT_RELEASE_OPEN. 1.1 exclusive open means the open will fail if the file is being opened by somebody else; 2. the MDT will handle IT_RELEASE as follows: 2.1 Revoke OPEN_LOCK on this file, just request EX mode of MDS_INODELOCK_OPEN lock and release it; 2.2 Acquire a rwsem, say open_rwsem, with write mode before trying to the file; for the normal open, it should acquire read mode of open_rwsem; 2.3 Check if the file is already being opened by others, if not return with -EBUSY; 2.4 Check if the file can be released; 2.5 Set a special flag in struct mdt_file_data to mark this open is exclusive; 2.5 Release open rwsem. >From now on, if the file is opened by others, it will mark mdt_file_data that the exclusive open is broken. 3. Client: if IT_RELEASE_OPEN is finished successfully, and do followings: 3.1 Acquire full PW or EX extent lock to flush dirty cache; 3.2 Pack the handle of layout lock, data version and other attars; 3.3 Close the file with IT_RELEASE_CLOSE. 4. Back to MDT to handle IT_RELEASE CLOSE: 4.1 Grab the open_rwsem 4.2 Check if the exclusive open has ever been broken, in that case, the RELEASE process will fail; 4.3 Verify the data version matches archive; 4.4 Grab EX layout lock 4.5 Swap the layout 4.6 Release EX layout lock 4.7 Close the exclusive open Basically we avoid granting EX layout lock back to client and introduce exclusive open so that we know it if the file has ever being accessed. I hope this can simplify things a little bit. Also, exclusive open can be used to implement file lease. In this patch, a framework of lease is implemented. However, only exclusive lease is supported right now. To apply a lease, MDS_OPEN_LEASE must be set to open the file, EX mode open lock is returned to the client side to hold a lease. From that time on, if this file is opened again by other processes, the open lock will be revoked so the client who holds the lease will know the lease is already broken by checking that open lock. To release a lease, normal close is used. The client will revoke the open lock before sending CLOSE request. Lease can be applied in two ways. ll_lease_open()/close() can be called directly if the lease holder is in kernel space; or if the lease holder lives in user space, it has to open the file first and then use ioctl() with command LL_IOC_SET_LEASE to apply a lease. The lease holder has to poll the lease status itself. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2919 Lustre-change: http://review.whamcloud.com/6730 Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging/lustre/dlmlock: compress out unused spaceBruce Korb1-0/+460
* lustre/include/lustre_dlm.h: Remove all bit fields and the unused weighing callback procedure. respell LDLM_AST_DISCARD_DATA as LDLM_FL_AST_DISCARD_DATA to match other flags. * .gitignore: ignore emacs temporary files * autogen.sh: rebuild the lock bits, if autogen is available. * contrib/bit-masks/lustre_dlm_flags.def: define the ldlm_lock flags * contrib/bit-masks/lustre_dlm_flags.tpl: template for emitting text * contrib/bit-masks/Makefile: construct the .c and .h files The .c file is for constructing a crash extension and is not preserved. * contrib/bit-masks/.gitignore: ignore built products * lustre/contrib/wireshark/packet-lustre.c: use built files instead of local versions of the defines. In the rest of the modified sources, replace flag field references with bit mask references. * lustre/osc/osc_lock.c: removed osc_lock_weigh, too Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2771 Lustre-change: http://review.whamcloud.com/5312 Signed-off-by: Bruce Korb <bruce_korb@xyratex.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: <bruce.korb@gmail.com> 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>