/*
* Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
* Copyright (c) 2005 Marco Peereboom. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Devices getting ioctls through this interface should use ioctl class 'B'
* and command numbers starting from 32, lower ones are reserved for generic
* ioctls. All ioctl data must be structures which start with a void *
* cookie.
*/
int ba_status; /* only used with get state */
#define BIOC_SADISABLE 0x00 /* disable alarm */
#define BIOC_SAENABLE 0x01 /* enable alarm */
#define BIOC_SASILENCE 0x02 /* silence alarm */
#define BIOC_GASTATUS 0x03 /* get status */
#define BIOC_SATEST 0x04 /* test alarm */
};
int bs_status; /* change to this status */
#define BIOC_SSONLINE 0x00 /* online disk */
#define BIOC_SSOFFLINE 0x01 /* offline disk */
#define BIOC_SSHOTSPARE 0x02 /* mark as hotspare */
#define BIOC_SSREBUILD 0x03 /* rebuild on this disk */
#define BIOC_SSDELHOTSPARE 0x04 /* unmark as hotspare */
#define BIOC_SSPASSTHRU 0x05 /* mark as pass-through */
#define BIOC_SSDELPASSTHRU 0x06 /* unmark as pass-through */
#define BIOC_SSCHECKSTART_VOL 0x07 /* start consistency check in vol# */
#define BIOC_SSCHECKSTOP_VOL 0x08 /* stop consistency check in vol# */
int bs_volid; /* volume id for rebuild */
};
#define BIOCVOLOPS _IOWR('B', 39, struct bioc_volops)
struct bioc_volops {
void *bc_cookie;
uint64_t bc_size; /* size of the volume set */
uint64_t bc_other_id; /* unused for now */
uint32_t bc_devmask; /* device mask for the volume set */
int bc_opcode;
#define BIOC_VCREATE_VOLUME 0x00 /* create new volume */
#define BIOC_VREMOVE_VOLUME 0x01 /* remove volume */
int bc_volid; /* volume id to be created/removed */
};