2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _META_SET_COM_H
2N/A#define _META_SET_COM_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <meta.h>
2N/A#include <ctype.h>
2N/A#include <sys/lvm/md_convert.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#define RB_PREEMPT if (md_got_sig()) goto rollback
2N/A#ifdef DEBUG
2N/A#define RB_TEST(tstpt, tag, ep) if (rb_test(tstpt, tag, (ep)) < 0) \
2N/A goto rollback;
2N/A#else /* !DEBUG */
2N/A#define RB_TEST(tstpt, tag, ep)
2N/A#endif /* DEBUG */
2N/A
2N/A/* meta_setup.c */
2N/Aextern int procsigs(int block, sigset_t *oldsigs, md_error_t *ep);
2N/A
2N/A#ifdef DEBUG
2N/Aextern int rb_test(int rbt_sel_tpt, char *rbt_sel_tag, md_error_t *ep);
2N/A#endif /* DEBUG */
2N/A
2N/A/*
2N/A * Flag values used by the nodehasset() function.
2N/A */
2N/A#define NHS_N_EQ 0x00000001 /* name == */
2N/A#define NHS_NS_EQ 0x00000002 /* name, setno == */
2N/A#define NHS_NST_EQ 0x00000004 /* name, setno, TS == */
2N/A#define NHS_NSTG_EQ 0x00000008 /* name, setno, TS, genid == */
2N/A#define NHS_NST_EQ_G_GT 0x00000010 /* name, setno, TS ==, genid > */
2N/A
2N/A/*
2N/A * Node, set, and mediator names can be any printable characters
2N/A * (isprint()) except for the characters in the #define that follows.
2N/A */
2N/A#define INVALID_IN_NAMES " *?/"
2N/A
2N/A/* meta_set_prv.c */
2N/Aextern int checkdrive_onnode(mdsetname_t *sp, mddrivename_t *dnp,
2N/A char *node, md_error_t *ep);
2N/Aextern side_t getnodeside(char *node, md_set_desc *sd);
2N/Aextern int halt_set(mdsetname_t *sp, md_error_t *ep);
2N/Aextern md_drive_desc *metadrivedesc_append(md_drive_desc **dd,
2N/A mddrivename_t *dnp, int dbcnt, int dbsize,
2N/A md_timeval32_t timestamp, ulong_t genid,
2N/A uint_t flags);
2N/Aextern int nodehasset(mdsetname_t *sp, char *node,
2N/A uint_t match_flag, md_error_t *ep);
2N/Aextern int nodesuniq(mdsetname_t *sp, int cnt, char **strings,
2N/A md_error_t *ep);
2N/Aextern int own_set(mdsetname_t *sp, char **owner_of_set,
2N/A int forceflg, md_error_t *ep);
2N/Aextern void resync_genid(mdsetname_t *sp, md_set_desc *sd,
2N/A ulong_t max_genid, int node_c, char **node_v);
2N/Aextern int setup_db_bydd(mdsetname_t *sp, md_drive_desc *dd,
2N/A int force, md_error_t *ep);
2N/Aextern int snarf_set(mdsetname_t *sp, bool_t stale_bool,
2N/A md_error_t *ep);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _META_SET_COM_H */