00001 /* 00002 * Copyright (C) 2011-2014 Red Hat, Inc. 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 of the License, or any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; If not, see <http://www.gnu.org/licenses/>. 00015 * 00016 * Author: tasleson 00017 */ 00018 00019 #ifndef LSM_BLOCKRANGE_H 00020 #define LSM_BLOCKRANGE_H 00021 00022 #include "libstoragemgmt_common.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00035 lsm_block_range LSM_DLL_EXPORT * 00036 lsm_block_range_record_alloc(uint64_t source_start, uint64_t dest_start, 00037 uint64_t block_count); 00038 00044 int LSM_DLL_EXPORT lsm_block_range_record_free(lsm_block_range * br); 00045 00046 00052 lsm_block_range LSM_DLL_EXPORT * 00053 lsm_block_range_record_copy(lsm_block_range * source); 00054 00055 00061 lsm_block_range LSM_DLL_EXPORT ** 00062 lsm_block_range_record_array_alloc(uint32_t size); 00063 00064 00071 int LSM_DLL_EXPORT lsm_block_range_record_array_free(lsm_block_range *br[], 00072 uint32_t size); 00073 00079 uint64_t LSM_DLL_EXPORT 00080 lsm_block_range_source_start_get(lsm_block_range *br); 00081 00087 uint64_t LSM_DLL_EXPORT lsm_block_range_dest_start_get(lsm_block_range *br); 00088 00094 uint64_t LSM_DLL_EXPORT lsm_block_range_block_count_get(lsm_block_range *br); 00095 00096 #ifdef __cplusplus 00097 } 00098 #endif 00099 #endif