summaryrefslogtreecommitdiff
path: root/tools/dlock.h
blob: 2a6ebe183e14073f1d74d728c9a09d05c1cb6c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright (C) 2014 Red Hat, Inc.
 *
 * This file is part of LVM2.
 *
 * This copyrighted material is made available to anyone wishing to use,
 * modify, copy, or redistribute it subject to the terms and conditions
 * of the GNU Lesser General Public License v.2.1.
 */

#ifndef _DLOCK_H
#define _DLOCK_H

#define DL_GL_MODE_NOARG           0x00000001
#define DL_GL_SKIP_CACHE_VALIDATE  0x00000002
#define DL_GL_UPDATE_NAMES         0x00000004

#define DL_VG_MODE_NOARG           0x00000001

#ifdef LVMLOCKD_SUPPORT

int dlock_gl_create(struct cmd_context *cmd, const char *def_mode, uint32_t flags,
                    const char *vg_lock_type);
int dlock_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags);

int dlock_vg(struct cmd_context *cmd, const char *vg_name,
	     const char *def_mode, uint32_t flags);

int dlock_gl_vg(struct cmd_context *cmd, const char *vg_name,
		const char *def_gl_mode, const char *def_vg_mode,
		uint32_t flags);

#else /* LVMLOCKD_SUPPORT */

#define dlock_gl_create(cmd, def_mode, flags, vg_lock_type) (1)
#define dlock_gl(cmd, def_mode, flags) (1)
#define dlock_vg(cmd, vg_name, def_mode, flags) (1)
#define dlock_gl_vg(cmd, vg_name, def_gl_mode, def_vg_mode, flags) (1)

#endif /* LVMLOCKD_SUPPORT */

#endif