Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
ubi_device Struct Reference

#include <ubi.h>

Data Fields

struct cdev cdev
 
struct device dev
 
int ubi_num
 
char ubi_name [sizeof(UBI_NAME_STR)+5]
 
int vol_count
 
struct ubi_volumevolumes [UBI_MAX_VOLUMES+UBI_INT_VOL_COUNT]
 
spinlock_t volumes_lock
 
int ref_count
 
int image_seq
 
int rsvd_pebs
 
int avail_pebs
 
int beb_rsvd_pebs
 
int beb_rsvd_level
 
int bad_peb_limit
 
int autoresize_vol_id
 
int vtbl_slots
 
int vtbl_size
 
struct ubi_vtbl_recordvtbl
 
struct mutex device_mutex
 
int max_ec
 
int mean_ec
 
unsigned long long global_sqnum
 
spinlock_t ltree_lock
 
struct rb_root ltree
 
struct mutex alc_mutex
 
int fm_disabled
 
struct ubi_fastmap_layoutfm
 
struct ubi_fm_pool fm_pool
 
struct ubi_fm_pool fm_wl_pool
 
struct rw_semaphore fm_sem
 
struct mutex fm_mutex
 
voidfm_buf
 
size_t fm_size
 
struct work_struct fm_work
 
struct rb_root used
 
struct rb_root erroneous
 
struct rb_root free
 
int free_count
 
struct rb_root scrub
 
struct list_head pq [UBI_PROT_QUEUE_LEN]
 
int pq_head
 
spinlock_t wl_lock
 
struct mutex move_mutex
 
struct rw_semaphore work_sem
 
int wl_scheduled
 
struct ubi_wl_entry ** lookuptbl
 
struct ubi_wl_entrymove_from
 
struct ubi_wl_entrymove_to
 
int move_to_put
 
struct list_head works
 
int works_count
 
struct task_structbgt_thread
 
int thread_enabled
 
char bgt_name [sizeof(UBI_BGT_NAME_PATTERN)+2]
 
long long flash_size
 
int peb_count
 
int peb_size
 
int bad_peb_count
 
int good_peb_count
 
int corr_peb_count
 
int erroneous_peb_count
 
int max_erroneous
 
int min_io_size
 
int hdrs_min_io_size
 
int ro_mode
 
int leb_size
 
int leb_start
 
int ec_hdr_alsize
 
int vid_hdr_alsize
 
int vid_hdr_offset
 
int vid_hdr_aloffset
 
int vid_hdr_shift
 
unsigned int bad_allowed:1
 
unsigned int nor_flash:1
 
int max_write_size
 
struct mtd_infomtd
 
voidpeb_buf
 
struct mutex buf_mutex
 
struct mutex ckvol_mutex
 
struct ubi_debug_infodbg
 

Detailed Description

struct ubi_device - UBI device description structure : UBI device object to use the the Linux device model : character device object to create character device : UBI device number : UBI device name : number of volumes in this UBI device : volumes of this UBI device : protects , , , beb_rsvd_pebs, , , , , ->readers, ->writers, ->exclusive, ->ref_count, ->mapping and ->eba_tbl. : count of references on the UBI device : image sequence number recorded on EC headers

: count of reserved physical eraseblocks : count of available physical eraseblocks : how many physical eraseblocks are reserved for bad PEB handling : normal level of PEBs reserved for bad PEB handling

: ID of the volume which has to be auto-resized at the end of UBI initialization : how many slots are available in the volume table : size of the volume table in bytes : in-RAM volume table copy : protects on-flash volume table and serializes volume creation, deletion, update, re-size, re-name and set property

: current highest erase counter value : current mean erase counter value

: global sequence number : protects the lock tree and : the lock tree : serializes "atomic LEB change" operations

: non-zero if fastmap is disabled (default) : in-memory data structure of the currently used fastmap : in-memory data structure of the fastmap pool : in-memory data structure of the fastmap pool used by the WL sub-system : serializes ubi_update_fastmap() and protects : vmalloc()'d buffer which holds the raw fastmap : fastmap size in bytes : allows ubi_update_fastmap() to block EBA table changes : fastmap work queue

: RB-tree of used physical eraseblocks : RB-tree of erroneous used physical eraseblocks : RB-tree of free physical eraseblocks : Contains the number of elements in : RB-tree of physical eraseblocks which need scrubbing : protection queue (contain physical eraseblocks which are temporarily protected from the wear-leveling worker) : protection queue head : protects the , , , , , , , , , , , and fields : serializes eraseblock moves : synchronizes the WL worker with use tasks : non-zero if the wear-leveling was scheduled : a table to quickly find a &struct ubi_wl_entry object for any physical eraseblock : physical eraseblock from where the data is being moved : physical eraseblock where the data is being moved to : if the "to" PEB was put : list of pending works : count of pending works : background thread description object : if the background thread is enabled : background thread name

: underlying MTD device size (in bytes) : count of physical eraseblocks on the MTD device : physical eraseblock size : top limit of expected bad physical eraseblocks : count of bad physical eraseblocks : count of good physical eraseblocks : count of corrupted physical eraseblocks (preserved and not used by UBI) : count of erroneous physical eraseblocks in : maximum allowed amount of erroneous physical eraseblocks : minimal input/output unit size of the underlying MTD device : minimal I/O unit size used for VID and EC headers : if the UBI device is in read-only mode : logical eraseblock size : starting offset of logical eraseblocks within physical eraseblocks : size of the EC header aligned to : size of the VID header aligned to : starting offset of the volume identifier header (might be unaligned) : starting offset of the VID header aligned to : contains - : whether the MTD device admits of bad physical eraseblocks or not : non-zero if working on top of NOR flash : maximum amount of bytes the underlying flash can write at a time (MTD write buffer size) : MTD device descriptor

: a buffer of PEB size used for different purposes : protects : serializes static volume checking when opening

: debugging information for this UBI device

Definition at line 454 of file ubi.h.

Field Documentation

struct mutex alc_mutex

Definition at line 485 of file ubi.h.

int autoresize_vol_id

Definition at line 471 of file ubi.h.

int avail_pebs

Definition at line 466 of file ubi.h.

unsigned int bad_allowed

Definition at line 539 of file ubi.h.

int bad_peb_count

Definition at line 524 of file ubi.h.

int bad_peb_limit

Definition at line 469 of file ubi.h.

int beb_rsvd_level

Definition at line 468 of file ubi.h.

int beb_rsvd_pebs

Definition at line 467 of file ubi.h.

Definition at line 518 of file ubi.h.

struct task_struct* bgt_thread

Definition at line 516 of file ubi.h.

struct mutex buf_mutex

Definition at line 545 of file ubi.h.

Definition at line 455 of file ubi.h.

struct mutex ckvol_mutex

Definition at line 546 of file ubi.h.

int corr_peb_count

Definition at line 526 of file ubi.h.

Definition at line 548 of file ubi.h.

Definition at line 456 of file ubi.h.

struct mutex device_mutex

Definition at line 475 of file ubi.h.

int ec_hdr_alsize

Definition at line 534 of file ubi.h.

struct rb_root erroneous

Definition at line 500 of file ubi.h.

int erroneous_peb_count

Definition at line 527 of file ubi.h.

long long flash_size

Definition at line 521 of file ubi.h.

Definition at line 489 of file ubi.h.

void* fm_buf

Definition at line 494 of file ubi.h.

int fm_disabled

Definition at line 488 of file ubi.h.

struct mutex fm_mutex

Definition at line 493 of file ubi.h.

Definition at line 490 of file ubi.h.

Definition at line 492 of file ubi.h.

size_t fm_size

Definition at line 495 of file ubi.h.

struct ubi_fm_pool fm_wl_pool

Definition at line 491 of file ubi.h.

Definition at line 496 of file ubi.h.

Definition at line 501 of file ubi.h.

int free_count

Definition at line 502 of file ubi.h.

unsigned long long global_sqnum

Definition at line 482 of file ubi.h.

int good_peb_count

Definition at line 525 of file ubi.h.

int hdrs_min_io_size

Definition at line 530 of file ubi.h.

int image_seq

Definition at line 463 of file ubi.h.

int leb_size

Definition at line 532 of file ubi.h.

int leb_start

Definition at line 533 of file ubi.h.

struct ubi_wl_entry** lookuptbl

Definition at line 510 of file ubi.h.

struct rb_root ltree

Definition at line 484 of file ubi.h.

spinlock_t ltree_lock

Definition at line 483 of file ubi.h.

int max_ec

Definition at line 477 of file ubi.h.

int max_erroneous

Definition at line 528 of file ubi.h.

int max_write_size

Definition at line 541 of file ubi.h.

int mean_ec

Definition at line 479 of file ubi.h.

int min_io_size

Definition at line 529 of file ubi.h.

struct ubi_wl_entry* move_from

Definition at line 511 of file ubi.h.

struct mutex move_mutex

Definition at line 507 of file ubi.h.

struct ubi_wl_entry* move_to

Definition at line 512 of file ubi.h.

int move_to_put

Definition at line 513 of file ubi.h.

Definition at line 542 of file ubi.h.

unsigned int nor_flash

Definition at line 540 of file ubi.h.

void* peb_buf

Definition at line 544 of file ubi.h.

int peb_count

Definition at line 522 of file ubi.h.

int peb_size

Definition at line 523 of file ubi.h.

Definition at line 504 of file ubi.h.

int pq_head

Definition at line 505 of file ubi.h.

int ref_count

Definition at line 462 of file ubi.h.

int ro_mode

Definition at line 531 of file ubi.h.

int rsvd_pebs

Definition at line 465 of file ubi.h.

struct rb_root scrub

Definition at line 503 of file ubi.h.

int thread_enabled

Definition at line 517 of file ubi.h.

char ubi_name[sizeof(UBI_NAME_STR)+5]

Definition at line 458 of file ubi.h.

int ubi_num

Definition at line 457 of file ubi.h.

Definition at line 499 of file ubi.h.

int vid_hdr_aloffset

Definition at line 537 of file ubi.h.

int vid_hdr_alsize

Definition at line 535 of file ubi.h.

int vid_hdr_offset

Definition at line 536 of file ubi.h.

int vid_hdr_shift

Definition at line 538 of file ubi.h.

int vol_count

Definition at line 459 of file ubi.h.

Definition at line 460 of file ubi.h.

spinlock_t volumes_lock

Definition at line 461 of file ubi.h.

Definition at line 474 of file ubi.h.

int vtbl_size

Definition at line 473 of file ubi.h.

int vtbl_slots

Definition at line 472 of file ubi.h.

spinlock_t wl_lock

Definition at line 506 of file ubi.h.

int wl_scheduled

Definition at line 509 of file ubi.h.

struct rw_semaphore work_sem

Definition at line 508 of file ubi.h.

Definition at line 514 of file ubi.h.

int works_count

Definition at line 515 of file ubi.h.


The documentation for this struct was generated from the following file: