chfs_ebh
struct chfs_ebh *chm_ebh; /* eraseblock handler */
chmp->chm_ebh = kmem_alloc(sizeof(struct chfs_ebh), KM_SLEEP);
kmem_free(chmp->chm_ebh, sizeof(struct chfs_ebh));
release_peb(struct chfs_ebh *ebh, int pebnr)
struct chfs_ebh *ebh = data;
nor_calc_data_offs(struct chfs_ebh *ebh, int pebnr, int offset)
erase_thread_start(struct chfs_ebh *ebh)
erase_thread_stop(struct chfs_ebh *ebh)
nor_scan_add_to_used(struct chfs_ebh *ebh, struct chfs_scan_info *si,
nand_calc_data_offs(struct chfs_ebh *ebh, int pebnr, int offset)
nor_process_eb(struct chfs_ebh *ebh, struct chfs_scan_info *si,
nand_scan_add_to_used(struct chfs_ebh *ebh, struct chfs_scan_info *si,
nand_process_eb(struct chfs_ebh *ebh, struct chfs_scan_info *si,
nor_read_eb_hdr(struct chfs_ebh *ebh,
chfs_scan(struct chfs_ebh *ebh)
scan_media(struct chfs_ebh *ebh)
ebh_open(struct chfs_ebh *ebh, dev_t dev)
kmem_free(ebh, sizeof(struct chfs_ebh));
ebh_close(struct chfs_ebh *ebh)
kmem_free(ebh, sizeof(struct chfs_ebh));
ebh_read_leb(struct chfs_ebh *ebh, int lnr, char *buf, uint32_t offset,
get_peb(struct chfs_ebh *ebh)
nand_read_eb_hdr(struct chfs_ebh *ebh, int pebnr,
ebh_write_leb(struct chfs_ebh *ebh, int lnr, char *buf, uint32_t offset,
ebh_erase_leb(struct chfs_ebh *ebh, int lnr)
ebh_map_leb(struct chfs_ebh *ebh, int lnr)
ebh_unmap_leb(struct chfs_ebh *ebh, int lnr)
ebh_is_mapped(struct chfs_ebh *ebh, int lnr)
ebh_change_leb(struct chfs_ebh *ebh, int lnr, char *buf, size_t len,
nor_write_eb_hdr(struct chfs_ebh *ebh, int pebnr, struct chfs_eb_hdr *ebhdr)
nand_write_eb_hdr(struct chfs_ebh *ebh, int pebnr,
nor_check_eb_hdr(struct chfs_ebh *ebh, void *buf)
nand_check_eb_hdr(struct chfs_ebh *ebh, void *buf)
nor_mark_eb_hdr_dirty_flash(struct chfs_ebh *ebh, int pebnr, int lid)
int nor_calc_data_offs(struct chfs_ebh *ebh, int pebnr, int offset);
int nand_calc_data_offs(struct chfs_ebh *ebh, int pebnr, int offset);
nor_invalidate_eb_hdr(struct chfs_ebh *ebh, int pebnr)
int nor_read_eb_hdr(struct chfs_ebh *ebh, int pebnr, struct chfs_eb_hdr *ebhdr);
int nand_read_eb_hdr(struct chfs_ebh *ebh, int pebnr, struct chfs_eb_hdr *ebhdr);
int nor_write_eb_hdr(struct chfs_ebh *ebh, int pebnr, struct chfs_eb_hdr *ebhdr);
int nand_write_eb_hdr(struct chfs_ebh *ebh, int pebnr,struct chfs_eb_hdr *ebhdr);
mark_eb_hdr_free(struct chfs_ebh *ebh, int pebnr, int ec)
int nor_check_eb_hdr(struct chfs_ebh *ebh, void *buf);
int nand_check_eb_hdr(struct chfs_ebh *ebh, void *buf);
int nor_mark_eb_hdr_dirty_flash(struct chfs_ebh *ebh, int pebnr, int lid);
int nor_invalidate_eb_hdr(struct chfs_ebh *ebh, int pebnr);
int mark_eb_hdr_free(struct chfs_ebh *ebh, int pebnr, int ec);
ltree_lookup(struct chfs_ebh *ebh, int lnr)
ltree_add_entry(struct chfs_ebh *ebh, int lnr)
int add_peb_to_erase_queue(struct chfs_ebh *ebh, int pebnr, int ec,struct peb_queue *queue);
struct chfs_peb * find_peb_in_use(struct chfs_ebh *ebh, int pebnr);
int add_peb_to_free(struct chfs_ebh *ebh, int pebnr, int ec);
leb_read_lock(struct chfs_ebh *ebh, int lnr)
int add_peb_to_in_use(struct chfs_ebh *ebh, int pebnr, int ec);
leb_read_unlock(struct chfs_ebh *ebh, int lnr)
int free_peb(struct chfs_ebh *ebh);
int release_peb(struct chfs_ebh *ebh, int pebnr);
leb_write_lock(struct chfs_ebh *ebh, int lnr)
static void erase_thread_start(struct chfs_ebh *ebh);
static void erase_thread_stop(struct chfs_ebh *ebh);
leb_write_unlock(struct chfs_ebh *ebh, int lnr)
int nor_scan_add_to_used(struct chfs_ebh *ebh, struct chfs_scan_info *si,struct chfs_eb_hdr *ebhdr, int pebnr, int leb_status);
int nor_process_eb(struct chfs_ebh *ebh, struct chfs_scan_info *si,
int nand_scan_add_to_used(struct chfs_ebh *ebh, struct chfs_scan_info *si,struct chfs_eb_hdr *ebhdr, int pebnr);
int nand_process_eb(struct chfs_ebh *ebh, struct chfs_scan_info *si,
struct chfs_scan_info *chfs_scan(struct chfs_ebh *ebh);
add_peb_to_erase_queue(struct chfs_ebh *ebh, int pebnr, int ec,
int scan_media(struct chfs_ebh *ebh);
find_peb_in_use(struct chfs_ebh *ebh, int pebnr)
int get_peb(struct chfs_ebh *ebh);
add_peb_to_free(struct chfs_ebh *ebh, int pebnr, int ec)
add_peb_to_in_use(struct chfs_ebh *ebh, int pebnr, int ec)
struct chfs_ebh *ebh = priv->ebh;
free_peb(struct chfs_ebh *ebh)
struct chfs_ebh;
int (*read_eb_hdr)(struct chfs_ebh *ebh, int pebnr,
int (*write_eb_hdr)(struct chfs_ebh *ebh, int pebnr,
int (*check_eb_hdr)(struct chfs_ebh *ebh, void *buf);
int (*mark_eb_hdr_dirty_flash)(struct chfs_ebh *ebh, int pebnr, int lid);
int (*invalidate_eb_hdr)(struct chfs_ebh *ebh, int pebnr);
int (*mark_eb_hdr_free)(struct chfs_ebh *ebh, int pebnr, int ec);
int (*process_eb)(struct chfs_ebh *ebh, struct chfs_scan_info *si,
int (*calc_data_offs)(struct chfs_ebh *ebh, int pebnr, int offset);
struct chfs_ebh *ebh;
int ebh_open(struct chfs_ebh *ebh, dev_t dev);
int ebh_close(struct chfs_ebh *ebh);
int ebh_read_leb(struct chfs_ebh *ebh, int lnr, char *buf,
int ebh_write_leb(struct chfs_ebh *ebh, int lnr, char *buf,
int ebh_erase_leb(struct chfs_ebh *ebh, int lnr);
int ebh_map_leb(struct chfs_ebh *ebh, int lnr);
int ebh_unmap_leb(struct chfs_ebh *ebh, int lnr);
int ebh_is_mapped(struct chfs_ebh *ebh, int lnr);
int ebh_change_leb(struct chfs_ebh *ebh, int lnr, char *buf,