sdbc_ioctl.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SDBC_IOCTL_H
#define _SDBC_IOCTL_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Generic sdbc ioctl arguments structure.
* Individual ioctl's will use 0-n of these arguments.
*
* Each sdbc ioctl is described first by the command number
* e.g. #define SDBC_ADUMP _SDBC_(4)
*
* Followed by a description of each argument (if any).
* Each argument is on a single line.
*
*/
typedef struct _sdbc_ioctl_s {
long arg0;
long arg1;
long arg2;
long arg3;
long arg4;
long magic;
long pad[1];
typedef struct _sdbc_ioctl32_s {
/*
* Ioctl command numbers
*/
/*
* Old ioctl commands prior to ioctl reorg. These could be re-used
* at a later date
*/
/*
* int cd;
* _sdtr_table * table;
* _sdtr_t * trace_buffer;
* int size_of_trace_buffer;
* int flags;
*/
/*
* char * device_name;
* int index;
* int len;
* int track_size;
* int flags;
*/
/*
* int num;
* int type;
* int loops;
* int from;
* int seed;
*/
/* NO-ARGS */
/*
* _sd_cache_param_t * user_configuration;
*/
/* NO-ARGS */
/*
* int cd;
* int hint;
* int flags;
*/
/*
* int cd;
*/
/*
* int hint;
* int flags;
*/
/* NO-ARGS */
/*
* _sd_stats_t * stats buffer;
*/
/* NO-ARGS */
/*
* int cd;
* nsc_off_t * block_number;
* void * addresses[5];
*/
/*
* int * cluster_size;
*/
/*
* char * buffer[2*cluster_size];
*/
/*
* int * global_sizes;
*/
/*
* char * buffer[ 2 times sum of global_sizes];
*/
/* Unused _SDBC(21,22) */
/*
* char * device_name;
* int device_name_length;
*/
/* NO-ARGS */
/*
* int cd
* int io_error_number;
*/
/*
* int cd
*/
/*
* _sdbc_config_t *current_config;
*/
/*
* _sdbc_config_t *mgmt_config_info;
*/
/* Unused _SDBC(29) */
/*
* int * max_files;
*/
/*
* cache_version_t *cache_version;
*/
#define _SD_MAGIC 0xD017
#define MAX_CACHE_NET 4
#define MAX_REMOTE_MIRRORS 64
#define MAX_MIR_SEGS MAX_REMOTE_MIRRORS
#define MAX_CACHE_SIZE 1024
/* unexposed configuration bits */
#define CFG_USE_DMCHAIN 0x1
#define CFG_STATIC_CACHE 0x2
#define RESERVED1_DEFAULTS (CFG_STATIC_CACHE)
/* maintain _sd_cache_param struct layout (MAX_CACHE_NET is deprecated) */
#define CACHE_MEM_PAD 4
typedef struct _sd_cache_param {
int mirror_host;
int blk_size;
int threads;
int procs;
int test_demons;
int write_cache;
int trace_size;
int trace_mask;
int trace_lbolt;
int trace_good;
int trace_net; /* not used */
int iobuf;
int num_handles;
int cache_mem[CACHE_MEM_PAD];
int prot_lru;
int gen_pattern;
short net_type; /* not used */
int reserved1; /* unexposed config options */
int reserved[8];
typedef struct _sdbc_config {
int cache_mem[CACHE_MEM_PAD];
int threads;
int enabled;
typedef struct cache_version {
int major; /* Major release number */
int minor; /* Minor release number */
int micro; /* Micro release number */
int baseline; /* Baseline revison number */
#if !defined(_KERNEL)
/* Keep this definition in sync with the one in rdc_ioctl.h. */
#ifndef SDBC_IOCTL
#endif
int sdbc_ioctl(long, long, long, long, long, long, spcs_s_info_t *);
#endif /* ! _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SDBC_IOCTL_H */