/usr/include/sanlock_admin.h is in libsanlock-dev 2.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | /*
* Copyright 2010-2011 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*/
#ifndef __SANLOCK_ADMIN_H__
#define __SANLOCK_ADMIN_H__
/* add flags */
#define SANLK_ADD_ASYNC 0x00000001
/* rem flags */
#define SANLK_REM_ASYNC 0x00000001
#define SANLK_REM_UNUSED 0x00000002
/*
* add_lockspace returns:
* 0: the lockspace has been added successfully
* -EEXIST: the lockspace already exists
* -EINPROGRESS: the lockspace is already in the process of being added
* (the in-progress add may or may not succeed)
* -EAGAIN: the lockspace is being removed
*/
int sanlock_add_lockspace(struct sanlk_lockspace *ls, uint32_t flags);
/*
* inq_lockspace returns:
* 0: the lockspace exists and is currently held
* -ENOENT: lockspace not found
*/
int sanlock_inq_lockspace(struct sanlk_lockspace *ls, uint32_t flags);
/*
* rem_lockspace returns:
* 0: the lockspace has been removed successfully
* -EINPROGRESS: the lockspace is already in the process of being removed
* -ENOENT: lockspace not found
* -EBUSY: UNUSED was set and lockspace is being used
*
* The sanlock daemon will kill any pids using the lockspace when the
* lockspace is removed (unless UNUSED is set).
*/
int sanlock_rem_lockspace(struct sanlk_lockspace *ls, uint32_t flags);
/*
* Returns the alignment in bytes required by sanlock_init()
* (1MB for disks with 512 sectors, 8MB for disks with 4096 sectors)
*/
int sanlock_align(struct sanlk_disk *disk);
/*
* Ask sanlock daemon to initialize disk space.
* Use max_hosts = 0 for default value.
* Use num_hosts = 0 for default value.
* Provide either lockspace or resource, not both
*/
int sanlock_init(struct sanlk_lockspace *ls,
struct sanlk_resource *res,
int max_hosts, int num_hosts);
#endif
|