2011-01-24 12:16:30 +00:00
|
|
|
/*
|
2014-03-07 13:38:51 +00:00
|
|
|
* domain_lock.h: Locking for domain lifecycle operations
|
2011-01-24 12:16:30 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 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.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2011-01-24 12:16:30 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:31 +00:00
|
|
|
#pragma once
|
2011-01-24 12:16:30 +00:00
|
|
|
|
2019-06-18 16:12:31 +00:00
|
|
|
#include "internal.h"
|
|
|
|
#include "domain_conf.h"
|
|
|
|
#include "lock_manager.h"
|
2011-01-24 12:16:30 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockProcessStart(virLockManagerPlugin *plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *dom,
|
2011-06-24 14:14:41 +00:00
|
|
|
bool paused,
|
|
|
|
int *fd);
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockProcessPause(virLockManagerPlugin *plugin,
|
|
|
|
virDomainObj *dom,
|
2011-01-24 12:16:30 +00:00
|
|
|
char **state);
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockProcessResume(virLockManagerPlugin *plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *dom,
|
2011-01-24 12:16:30 +00:00
|
|
|
const char *state);
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockProcessInquire(virLockManagerPlugin *plugin,
|
|
|
|
virDomainObj *dom,
|
2011-01-24 12:16:30 +00:00
|
|
|
char **state);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockImageAttach(virLockManagerPlugin *plugin,
|
2014-06-23 13:16:46 +00:00
|
|
|
const char *uri,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *dom,
|
|
|
|
virStorageSource *src);
|
|
|
|
int virDomainLockImageDetach(virLockManagerPlugin *plugin,
|
|
|
|
virDomainObj *dom,
|
|
|
|
virStorageSource *src);
|
2014-06-23 13:16:46 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int virDomainLockLeaseAttach(virLockManagerPlugin *plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *dom,
|
|
|
|
virDomainLeaseDef *lease);
|
|
|
|
int virDomainLockLeaseDetach(virLockManagerPlugin *plugin,
|
|
|
|
virDomainObj *dom,
|
|
|
|
virDomainLeaseDef *lease);
|