#ifndef _HINT_STORAGE_H_
#define _HINT_STORAGE_H_

#define LBA_HINT_DATA_MAX_SIZE (128)
#define LBA_HINT_MAX_COUNT (32)

#include "hint_data.h"
#include <linux/list.h>

typedef struct lba_hint_s {
  struct list_head list; 
  uint32_t lba;
  uint32_t sectors_count;
  hint_data_t hint_data;
}lba_hint_t;

typedef struct hint_storage_info_s {
  struct list_head lbas_list;
  uint32_t lbas_count;
  spinlock_t lock;
} hint_storage_info_t;

int hint_storage_init(void);
void hint_storage_fini(void);
int hint_storage_store_lba_hint(uint32_t lba, uint32_t sectors_count,
                                hint_data_t *hint);
int hint_storage_get_lba_hint(uint32_t lba, uint32_t sectors_count,
                              hint_data_t **hint);


#endif /* _HINT_STORAGE_H_ */
