Move common user and freelist partition data to a new struct
New structure ocf_part is added to contain all the data common for both user partitions and freelist partition: part_runtime and part_id. ocf_user_part now contains ocf_part structure as well as pointer to cleaning partition runtime metadata (moved out from part_runtime) and user partition config (no change here). Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -308,7 +308,7 @@ typedef enum {
|
||||
/**
|
||||
* Maximum numbers of IO classes per cache instance
|
||||
*/
|
||||
#define OCF_IO_CLASS_MAX OCF_CONFIG_MAX_IO_CLASSES
|
||||
#define OCF_USER_IO_CLASS_MAX OCF_CONFIG_MAX_IO_CLASSES
|
||||
/**
|
||||
* Minimum value of a valid IO class ID
|
||||
*/
|
||||
@@ -316,11 +316,11 @@ typedef enum {
|
||||
/**
|
||||
* Maximum value of a valid IO class ID
|
||||
*/
|
||||
#define OCF_IO_CLASS_ID_MAX (OCF_IO_CLASS_MAX - 1)
|
||||
#define OCF_IO_CLASS_ID_MAX (OCF_USER_IO_CLASS_MAX - 1)
|
||||
/**
|
||||
* Invalid value of IO class id
|
||||
*/
|
||||
#define OCF_IO_CLASS_INVALID OCF_IO_CLASS_MAX
|
||||
#define OCF_IO_CLASS_INVALID OCF_USER_IO_CLASS_MAX
|
||||
|
||||
/** Maximum size of the IO class name */
|
||||
#define OCF_IO_CLASS_NAME_MAX 1024
|
||||
|
||||
@@ -874,7 +874,7 @@ struct ocf_mngt_io_class_config {
|
||||
};
|
||||
|
||||
struct ocf_mngt_io_classes_config {
|
||||
struct ocf_mngt_io_class_config config[OCF_IO_CLASS_MAX];
|
||||
struct ocf_mngt_io_class_config config[OCF_USER_IO_CLASS_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user