]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/linux/dlm_plock.h
Merge branch 'for-3.5' of ../cgroup into block/for-3.5/core-merged
[mirror_ubuntu-zesty-kernel.git] / include / linux / dlm_plock.h
CommitLineData
2402211a
DT
1/*
2 * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
3 *
4 * This copyrighted material is made available to anyone wishing to use,
5 * modify, copy, or redistribute it subject to the terms and conditions
6 * of the GNU General Public License v.2.
7 */
8
9#ifndef __DLM_PLOCK_DOT_H__
10#define __DLM_PLOCK_DOT_H__
11
37eb1f4c
JSR
12#include <linux/types.h>
13
2402211a
DT
14#define DLM_PLOCK_MISC_NAME "dlm_plock"
15
16#define DLM_PLOCK_VERSION_MAJOR 1
901025d2 17#define DLM_PLOCK_VERSION_MINOR 2
2402211a
DT
18#define DLM_PLOCK_VERSION_PATCH 0
19
20enum {
21 DLM_PLOCK_OP_LOCK = 1,
22 DLM_PLOCK_OP_UNLOCK,
23 DLM_PLOCK_OP_GET,
24};
25
901025d2
DT
26#define DLM_PLOCK_FL_CLOSE 1
27
2402211a
DT
28struct dlm_plock_info {
29 __u32 version[3];
30 __u8 optype;
31 __u8 ex;
32 __u8 wait;
901025d2 33 __u8 flags;
2402211a
DT
34 __u32 pid;
35 __s32 nodeid;
36 __s32 rv;
37 __u32 fsid;
38 __u64 number;
39 __u64 start;
40 __u64 end;
41 __u64 owner;
42};
43
44#ifdef __KERNEL__
45int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
46 int cmd, struct file_lock *fl);
47int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
48 struct file_lock *fl);
49int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
50 struct file_lock *fl);
51#endif /* __KERNEL__ */
52
53#endif
54