|
Packit Service |
db8df9 |
/*
|
|
Packit Service |
db8df9 |
* Intel(R) Enclosure LED Utilities
|
|
Packit Service |
db8df9 |
* Copyright (C) 2009-2018 Intel Corporation.
|
|
Packit Service |
db8df9 |
*
|
|
Packit Service |
db8df9 |
* This program is free software; you can redistribute it and/or modify it
|
|
Packit Service |
db8df9 |
* under the terms and conditions of the GNU General Public License,
|
|
Packit Service |
db8df9 |
* version 2, as published by the Free Software Foundation.
|
|
Packit Service |
db8df9 |
*
|
|
Packit Service |
db8df9 |
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
Packit Service |
db8df9 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
Packit Service |
db8df9 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
Packit Service |
db8df9 |
* more details.
|
|
Packit Service |
db8df9 |
*
|
|
Packit Service |
db8df9 |
* You should have received a copy of the GNU General Public License along with
|
|
Packit Service |
db8df9 |
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
Packit Service |
db8df9 |
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
|
Packit Service |
db8df9 |
*
|
|
Packit Service |
db8df9 |
*/
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
#ifndef _SLAVE_H_INCLUDED_
|
|
Packit Service |
db8df9 |
#define _SLAVE_H_INCLUDED_
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
#include "block.h"
|
|
Packit Service |
db8df9 |
#include "raid.h"
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
/**
|
|
Packit Service |
db8df9 |
*/
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_UNKNOWN 0x00
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_IN_SYNC 0x01
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_SPARE 0x02
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_FAULTY 0x04
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_WRITE_MOSTLY 0x08
|
|
Packit Service |
db8df9 |
#define SLAVE_STATE_BLOCKED 0x10
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
/**
|
|
Packit Service |
db8df9 |
*/
|
|
Packit Service |
db8df9 |
struct slave_device {
|
|
Packit Service |
db8df9 |
struct raid_device *raid;
|
|
Packit Service |
db8df9 |
unsigned int errors;
|
|
Packit Service |
db8df9 |
unsigned int slot;
|
|
Packit Service |
db8df9 |
struct block_device *block;
|
|
Packit Service |
db8df9 |
unsigned char state;
|
|
Packit Service |
db8df9 |
};
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
/**
|
|
Packit Service |
db8df9 |
*/
|
|
Packit Service |
db8df9 |
struct slave_device *slave_device_init(const char *path, struct list *block_list);
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
/**
|
|
Packit Service |
db8df9 |
*/
|
|
Packit Service |
db8df9 |
void slave_device_fini(struct slave_device *device);
|
|
Packit Service |
db8df9 |
|
|
Packit Service |
db8df9 |
#endif /* _SLAVE_H_INCLUDED_ */
|