mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
f40fd88374
related to managing files in /run/lvm/pvs_online and /run/lvm/vgs_online
47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2021 Red Hat, Inc. All rights reserved.
|
|
*
|
|
* 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.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef _ONLINE_H
|
|
#define _ONLINE_H
|
|
|
|
/*
|
|
* Avoid a duplicate pvscan[%d] prefix when logging to the journal.
|
|
* FIXME: this should probably replace if (udevoutput) with
|
|
* if (log_journal & LOG_JOURNAL_OUTPUT)
|
|
*/
|
|
#define log_print_pvscan(cmd, fmt, args...) \
|
|
do \
|
|
if (cmd->udevoutput) \
|
|
log_print(fmt, ##args); \
|
|
else \
|
|
log_print("pvscan[%d] " fmt, getpid(), ##args); \
|
|
while (0)
|
|
|
|
#define log_error_pvscan(cmd, fmt, args...) \
|
|
do \
|
|
if (cmd->udevoutput) \
|
|
log_error(fmt, ##args); \
|
|
else \
|
|
log_error("pvscan[%d] " fmt, getpid(), ##args); \
|
|
while (0)
|
|
|
|
int online_pvid_file_read(char *path, int *major, int *minor, char *vgname);
|
|
int online_vg_file_create(struct cmd_context *cmd, const char *vgname);
|
|
void online_vg_file_remove(const char *vgname);
|
|
int online_pvid_file_create(struct cmd_context *cmd, struct device *dev, const char *vgname);
|
|
int online_pvid_file_exists(const char *pvid);
|
|
void online_dir_setup(struct cmd_context *cmd);
|
|
|
|
#endif
|