History log of /drivers/staging/lustre/lustre/include/lustre_dlm_flags.h
Revision Date Author Comments
17891183d08038655d60c1f3c894a8502cd5d7c1 08-Mar-2014 Masanari Iida <standby24x7@gmail.com> staging: lustre: Fix typo in lustre/include part1

Fix typo in comments within lustre/include.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
69342b7884d6ea1ec97c0a99fe0524a380783e83 22-Jan-2014 Andriy Skulysh <Andriy_Skulysh@xyratex.com> staging/lustre/ptlrpc: flock deadlock detection does not work

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>
d298b5377d415f001bcba914610417e3396d6d6c 19-Nov-2013 Peng Tao <tao.peng@emc.com> drivers/staging/lustre: indent lustre_ldlm_flags_vals

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>
d3a8a4e2d5e42e80625d734bb2bc5f71ecd9ffc1 19-Nov-2013 Jinshan Xiong <jinshan.xiong@intel.com> staging/lustre/hsm: Implementation of exclusive open

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>
f2145eae3d4d7c93fcbd7013bbf31db76bdd0ad4 22-Jul-2013 Bruce Korb <bruce_korb@xyratex.com> staging/lustre/dlmlock: compress out unused space

* 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>