fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _SDBC_IOCTL_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SDBC_IOCTL_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/unistat/spcs_s.h> /* included for unistat */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Generic sdbc ioctl arguments structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Individual ioctl's will use 0-n of these arguments.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Each sdbc ioctl is described first by the command number
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * e.g. #define SDBC_ADUMP _SDBC_(4)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Followed by a description of each argument (if any).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Each argument is on a single line.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _sdbc_ioctl_s {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long arg0;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long arg1;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long arg2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long arg3;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long arg4;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long magic;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte spcs_s_info_t sdbc_ustatus;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte long pad[1];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} _sdbc_ioctl_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _sdbc_ioctl32_s {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t arg0;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t arg1;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t arg2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t arg3;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t arg4;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t magic;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte spcs_s_info32_t sdbc_ustatus;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int32_t pad[1];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} _sdbc_ioctl32_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Ioctl command numbers
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SDBC_(x) (('B'<<16)|('C'<<8)|(x))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Old ioctl commands prior to ioctl reorg. These could be re-used
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * at a later date
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_UNUSED_1 _SDBC_(1) /* OLD out of date syscall -> ioctl stuff */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_UNUSED_2 _SDBC_(2) /* OLD INFSD_CONC_WRITE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_UNUSED_3 _SDBC_(3) /* OLD muli-subopcode configuration */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_ADUMP _SDBC_(4)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sdtr_table * table;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sdtr_t * trace_buffer;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int size_of_trace_buffer;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int flags;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_TEST_INIT _SDBC_(5) /* TESTING - tdaemon parameters */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * char * device_name;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int index;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int len;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int track_size;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int flags;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_TEST_START _SDBC_(6) /* TESTING - tdaemon .... */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int num;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int type;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int loops;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int from;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int seed;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_TEST_END _SDBC_(7) /* TESTING - tdaemon .... */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* NO-ARGS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_ENABLE _SDBC_(8) /* configure sdbc */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sd_cache_param_t * user_configuration;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_DISABLE _SDBC_(9) /* deconfigure sdbc */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* NO-ARGS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_SET_CD_HINT _SDBC_(10)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int hint;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int flags;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_CD_HINT _SDBC_(11)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_SET_NODE_HINT _SDBC_(12)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int hint;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int flags;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_NODE_HINT _SDBC_(13)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* NO-ARGS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_STATS _SDBC_(14)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sd_stats_t * stats buffer;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_ZAP_STATS _SDBC_(15)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* NO-ARGS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_CD_BLK _SDBC_(16)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * nsc_off_t * block_number;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * void * addresses[5];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_CLUSTER_SIZE _SDBC_(17)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int * cluster_size;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_CLUSTER_DATA _SDBC_(18)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * char * buffer[2*cluster_size];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_GLMUL_SIZES _SDBC_(19)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int * global_sizes;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_GLMUL_INFO _SDBC_(20)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * char * buffer[ 2 times sum of global_sizes];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Unused _SDBC(21,22) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_STATE_DEV _SDBC_(23) /* set path to sdbc state file/volume */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * char * device_name;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int device_name_length;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_TOGGLE_FLUSH _SDBC_(24) /* TESTING - toggle flusher enable */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* NO-ARGS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_INJ_IOERR _SDBC_(25) /* TESTING - inject i/o error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int io_error_number;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_CLR_IOERR _SDBC_(26) /* TESTING - clear injected i/o error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int cd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_GET_CONFIG _SDBC_(27) /* retrieve current configuration */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sdbc_config_t *current_config;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_SET_CONFIG _SDBC_(28) /* enable cache configuration info */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _sdbc_config_t *mgmt_config_info;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Unused _SDBC(29) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_MAXFILES _SDBC_(30) /* get maxfiles */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * int * max_files;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_VERSION _SDBC_(31)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * cache_version_t *cache_version;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_MAGIC 0xD017
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_CACHE_NET 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_REMOTE_MIRRORS 64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_MIR_SEGS MAX_REMOTE_MIRRORS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_CACHE_SIZE 1024
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* unexposed configuration bits */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CFG_USE_DMCHAIN 0x1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CFG_STATIC_CACHE 0x2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define RESERVED1_DEFAULTS (CFG_STATIC_CACHE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* maintain _sd_cache_param struct layout (MAX_CACHE_NET is deprecated) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CACHE_MEM_PAD 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _sd_cache_param {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int mirror_host;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int blk_size;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int threads;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int procs;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int test_demons;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int write_cache;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int trace_size;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int trace_mask;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int trace_lbolt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int trace_good;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int trace_net; /* not used */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int iobuf;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int num_handles;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int cache_mem[CACHE_MEM_PAD];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int prot_lru;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int gen_pattern;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t fill_pattern;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte short nodes_conf[MAX_REMOTE_MIRRORS]; /* Actual Nodes in conf file */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte short num_nodes; /* Number of nodes in sd.cf */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte short net_type; /* not used */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ushort_t magic; /* Check for proper sd_cadmin */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int reserved1; /* unexposed config options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int reserved[8];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} _sd_cache_param_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _sdbc_config {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int cache_mem[CACHE_MEM_PAD];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int threads;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int enabled;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ushort_t magic;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} _sdbc_config_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct cache_version {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int major; /* Major release number */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int minor; /* Minor release number */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int micro; /* Micro release number */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int baseline; /* Baseline revison number */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} cache_version_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(_KERNEL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Keep this definition in sync with the one in rdc_ioctl.h. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef SDBC_IOCTL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SDBC_IOCTL(cmd, a0, a1, a2, a3, a4, ustatus) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_ioctl((long)(cmd), (long)(a0), (long)(a1), (long)(a2), \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (long)(a3), (long)(a4), (spcs_s_info_t *)(ustatus))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint sdbc_ioctl(long, long, long, long, long, long, spcs_s_info_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* ! _KERNEL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SDBC_IOCTL_H */