| display.h | | display.h | |
| | | | |
| skipping to change at line 12 | | skipping to change at line 12 | |
| * Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH. | | * Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH. | |
| * All rights reserved. | | * All rights reserved. | |
| * | | * | |
| * See file LICENSE at the top of this source tree for license information. | | * See file LICENSE at the top of this source tree for license information. | |
| */ | | */ | |
| | | | |
| #ifndef _DISPLAY_H_ | | #ifndef _DISPLAY_H_ | |
| #define _DISPLAY_H_ | | #define _DISPLAY_H_ | |
| | | | |
| enum dev_type { | | enum dev_type { | |
|
| DEVICE = 0x01, /* ALL devices */ | | DEVICE = 0x01, /* ALL devices */ | |
| RAID = 0x02, /* RAID devices */ | | RAID = 0x02, /* RAID devices */ | |
| NATIVE = 0x04, /* Native metadata of RAID devices */ | | NATIVE = 0x04, /* Native metadata of RAID devices */ | |
| SET = 0x08, /* RAID sets */ | | SET = 0x08, /* RAID sets */ | |
| }; | | }; | |
| | | | |
| enum active_type { | | enum active_type { | |
|
| D_ALL = 0x01, /* All devices */ | | D_ALL = 0x01, /* All devices */ | |
| D_ACTIVE = 0x02, /* Active devices only */ | | D_ACTIVE = 0x02, /* Active devices only */ | |
| D_INACTIVE = 0x04, /* Inactive devices only */ | | D_INACTIVE = 0x04, /* Inactive devices only */ | |
| }; | | }; | |
| | | | |
| extern void display_devices(struct lib_context *lc, enum dev_type type); | | extern void display_devices(struct lib_context *lc, enum dev_type type); | |
| extern void display_set(struct lib_context *lc, void *rs, | | extern void display_set(struct lib_context *lc, void *rs, | |
| enum active_type active, int top); | | enum active_type active, int top); | |
| extern void display_table(struct lib_context *lc, char *rs_name, char *tabl
e); | | extern void display_table(struct lib_context *lc, char *rs_name, char *tabl
e); | |
| extern int list_formats(struct lib_context *lc, int arg); | | extern int list_formats(struct lib_context *lc, int arg); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| dmraid.h | | dmraid.h | |
| /* | | /* | |
| * Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. | | * Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. | |
| * All rights reserved. | | * All rights reserved. | |
| * | | * | |
|
| * Copyright (C) 2007 Intel Corporation. All rights reserved. | | * Copyright (C) 2007, 2009 Intel Corporation. All rights reserved. | |
| * November, 2007 - additions for Create, Delete, Rebuild & Raid 10. | | * November, 2007 - additions for Create, Delete, Rebuild & Raid 10. | |
|
| | | * April, 2009 - dmreg.h file included | |
| * | | * | |
| * See file LICENSE at the top of this source tree for license information. | | * See file LICENSE at the top of this source tree for license information. | |
| */ | | */ | |
| | | | |
| #ifndef _DMRAID_H_ | | #ifndef _DMRAID_H_ | |
| #define _DMRAID_H_ | | #define _DMRAID_H_ | |
| | | | |
| #include <stdint.h> | | #include <stdint.h> | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| | | | |
| /* FIXME: avoid more library internals. */ | | /* FIXME: avoid more library internals. */ | |
| #include <dmraid/lib_context.h> | | #include <dmraid/lib_context.h> | |
| #include <dmraid/display.h> | | #include <dmraid/display.h> | |
| #include <dmraid/format.h> | | #include <dmraid/format.h> | |
| #include <dmraid/metadata.h> | | #include <dmraid/metadata.h> | |
| #include <dmraid/reconfig.h> | | #include <dmraid/reconfig.h> | |
|
| | | #include <dmraid/dmreg.h> | |
| /* | | /* | |
| * Library init/exit | | * Library init/exit | |
| */ | | */ | |
| extern struct lib_context *libdmraid_init(int argc, char **argv); | | extern struct lib_context *libdmraid_init(int argc, char **argv); | |
| extern void libdmraid_exit(struct lib_context *lc); | | extern void libdmraid_exit(struct lib_context *lc); | |
| | | | |
| /* | | /* | |
| * Retrieve version identifiers. | | * Retrieve version identifiers. | |
| */ | | */ | |
| extern int dm_version(struct lib_context *lc, char *version, size_t size); | | extern int dm_version(struct lib_context *lc, char *version, size_t size); | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| format.h | | format.h | |
| /* | | /* | |
|
| * Copyright (C) 2004-2008 Heinz Mauelshagen, Red Hat GmbH. | | * Copyright (C) 2004-2009 Heinz Mauelshagen, Red Hat GmbH. | |
| * All rights reserved. | | * All rights reserved. | |
| * | | * | |
|
| * Copyright (C) 2007 Intel Corporation. All rights reserved. | | * Copyright (C) 2007,2009 Intel Corporation. All rights reserved. | |
| * November, 2007 - additions for Create, Delete, Rebuild & Raid 10. | | * November, 2007 - additions for Create, Delete, Rebuild & Raid 10. | |
|
| | | * March, 2008 - additions for hot-spare check | |
| | | * August, 2008 - additions for Activation, Rebuild check | |
| | | * January, 2009 - additions for Activation, Rebuild check | |
| * | | * | |
| * See file LICENSE at the top of this source tree for license information. | | * See file LICENSE at the top of this source tree for license information. | |
| */ | | */ | |
| | | | |
| #ifndef _FORMAT_H_ | | #ifndef _FORMAT_H_ | |
| #define _FORMAT_H_ | | #define _FORMAT_H_ | |
| | | | |
| #ifdef FORMAT_HANDLER | | #ifdef FORMAT_HANDLER | |
| #undef FORMAT_HANDLER | | #undef FORMAT_HANDLER | |
| | | | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 81 | |
| t_scope_global = 0x02 | | t_scope_global = 0x02 | |
| }; | | }; | |
| | | | |
| /* Metadata Handler commands */ | | /* Metadata Handler commands */ | |
| enum handler_commands { | | enum handler_commands { | |
| UPDATE_REBUILD_STATE, | | UPDATE_REBUILD_STATE, | |
| GET_REBUILD_STATE, | | GET_REBUILD_STATE, | |
| GET_REBUILD_DRIVE, | | GET_REBUILD_DRIVE, | |
| GET_REBUILD_DRIVE_NO, | | GET_REBUILD_DRIVE_NO, | |
| CHECK_HOT_SPARE, | | CHECK_HOT_SPARE, | |
|
| | | ALLOW_ACTIVATE, | |
| | | ALLOW_REBUILD, | |
| | | GET_STATUS, | |
| | | GET_DEVICE_IDX, | |
| | | GET_NUMBER_OF_DEVICES, | |
| /* ... */ | | /* ... */ | |
| }; | | }; | |
| | | | |
| /* Union to return metadata_handler information. */ | | /* Union to return metadata_handler information. */ | |
| struct handler_info { | | struct handler_info { | |
| unsigned short size; | | unsigned short size; | |
| | | | |
| union { | | union { | |
| char *str; | | char *str; | |
| void *ptr; | | void *ptr; | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 10 lines changed or added | |
|
| locking.h | | locking.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| | | | |
| /* I want to be prepared for finer grained locking... */ | | /* I want to be prepared for finer grained locking... */ | |
| struct resource { | | struct resource { | |
| char *name; | | char *name; | |
| }; | | }; | |
| | | | |
| /* Locking abstraction. */ | | /* Locking abstraction. */ | |
| struct lib_context; | | struct lib_context; | |
| struct locking { | | struct locking { | |
| const char *name; | | const char *name; | |
|
| int (*lock) (struct lib_context * lc, struct resource * res); | | int (*lock)(struct lib_context *lc, struct resource *res); | |
| void (*unlock) (struct lib_context * lc, struct resource * res); | | void (*unlock)(struct lib_context *lc, struct resource *res); | |
| void *c_private; /* Private context. */ | | void *c_private; /* Private context. */ | |
| }; | | }; | |
| | | | |
| extern int init_locking(struct lib_context *lc); | | extern int init_locking(struct lib_context *lc); | |
| extern int lock_resource(struct lib_context *lc, struct resource *res); | | extern int lock_resource(struct lib_context *lc, struct resource *res); | |
| extern void unlock_resource(struct lib_context *lc, struct resource *res); | | extern void unlock_resource(struct lib_context *lc, struct resource *res); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| metadata.h | | metadata.h | |
| | | | |
| skipping to change at line 266 | | skipping to change at line 266 | |
| }; | | }; | |
| | | | |
| extern void process_sets(struct lib_context *lc, | | extern void process_sets(struct lib_context *lc, | |
| int (*func) (struct lib_context * lc, void *rs, | | int (*func) (struct lib_context * lc, void *rs, | |
| int arg), int arg, enum set_type type)
; | | int arg), int arg, enum set_type type)
; | |
| extern int write_set(struct lib_context *lc, void *rs); | | extern int write_set(struct lib_context *lc, void *rs); | |
| extern int partitioned_set(struct lib_context *lc, void *rs); | | extern int partitioned_set(struct lib_context *lc, void *rs); | |
| extern int base_partitioned_set(struct lib_context *lc, void *rs); | | extern int base_partitioned_set(struct lib_context *lc, void *rs); | |
| extern void discover_raid_devices(struct lib_context *lc, char **devices); | | extern void discover_raid_devices(struct lib_context *lc, char **devices); | |
| extern void discover_partitions(struct lib_context *lc); | | extern void discover_partitions(struct lib_context *lc); | |
|
| | | extern int dso_get_members(struct lib_context *lc, int arg); | |
| extern unsigned int count_devices(struct lib_context *lc, enum dev_type typ
e); | | extern unsigned int count_devices(struct lib_context *lc, enum dev_type typ
e); | |
| extern enum status rd_status(struct states *states, unsigned int status, | | extern enum status rd_status(struct states *states, unsigned int status, | |
| enum compare cmp); | | enum compare cmp); | |
| extern enum type rd_type(struct types *types, unsigned int type); | | extern enum type rd_type(struct types *types, unsigned int type); | |
| extern void file_metadata(struct lib_context *lc, const char *handler, | | extern void file_metadata(struct lib_context *lc, const char *handler, | |
| char *path, void *data, size_t size, uint64_t offs
et); | | char *path, void *data, size_t size, uint64_t offs
et); | |
| extern void file_dev_size(struct lib_context *lc, const char *handler, | | extern void file_dev_size(struct lib_context *lc, const char *handler, | |
| struct dev_info *di); | | struct dev_info *di); | |
| extern int write_dev(struct lib_context *lc, struct raid_dev *rd, int erase
); | | extern int write_dev(struct lib_context *lc, struct raid_dev *rd, int erase
); | |
| extern int erase_metadata(struct lib_context *lc); | | extern int erase_metadata(struct lib_context *lc); | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| reconfig.h | | reconfig.h | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| | | | |
| struct dev_info *di; | | struct dev_info *di; | |
| | | | |
| char *name; | | char *name; | |
| }; | | }; | |
| | | | |
| extern int add_dev_to_set(struct lib_context *lc, struct raid_set *rs, | | extern int add_dev_to_set(struct lib_context *lc, struct raid_set *rs, | |
| struct raid_dev *rd); | | struct raid_dev *rd); | |
| extern int del_dev_in_set(struct lib_context *lc, struct raid_set *rs, | | extern int del_dev_in_set(struct lib_context *lc, struct raid_set *rs, | |
| struct raid_dev *rd); | | struct raid_dev *rd); | |
|
| | | extern int dso_end_rebuild(struct lib_context *lc, int arg); | |
| extern void end_log(struct lib_context *lc, struct list_head *log); | | extern void end_log(struct lib_context *lc, struct list_head *log); | |
| extern int revert_log(struct lib_context *lc, struct list_head *log); | | extern int revert_log(struct lib_context *lc, struct list_head *log); | |
| extern int hot_spare_add(struct lib_context *lc, struct raid_set *rs); | | extern int hot_spare_add(struct lib_context *lc, struct raid_set *rs); | |
| extern struct raid_set *find_group(struct lib_context *lc, | | extern struct raid_set *find_group(struct lib_context *lc, | |
| struct raid_set *sub_rs); | | struct raid_set *sub_rs); | |
| extern int rebuild_raidset(struct lib_context *lc, char *set_name); | | extern int rebuild_raidset(struct lib_context *lc, char *set_name); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|