Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | DEFAULT_JNL_PERCENT 5 |
#define | DEFAULT_MAX_JNL (32*1024*1024) |
#define | DEFAULT_FANOUT 8 |
#define | DEFAULT_JHEADS_CNT 1 |
#define | DEFAULT_IDX_LEB 0 |
#define | DEFAULT_DATA_LEB 1 |
#define | DEFAULT_GC_LEB 2 |
#define | DEFAULT_LSAVE_CNT 256 |
#define | DEFAULT_RP_PERCENT 5 |
#define | DEFAULT_MAX_RP_SIZE (5*1024*1024) |
#define | DEFAULT_TIME_GRAN 1000000000 |
Functions | |
struct ubifs_sb_node * | ubifs_read_sb_node (struct ubifs_info *c) |
int | ubifs_write_sb_node (struct ubifs_info *c, struct ubifs_sb_node *sup) |
int | ubifs_read_superblock (struct ubifs_info *c) |
int | ubifs_fixup_free_space (struct ubifs_info *c) |
int ubifs_fixup_free_space | ( | struct ubifs_info * | c | ) |
ubifs_fixup_free_space - find & fix all LEBs with free space. : UBIFS file-system description object
This function fixes up LEBs containing free space on first mount, if the appropriate flag was set when the FS was created. Each LEB with one or more empty min. I/O unit (i.e. free-space-count > 0) is re-written, to make sure the free space is actually erased. E.g., this is necessary for some NAND chips, since the free space may have been programmed like real "0xff" data (generating a non-0xff ECC), causing future writes to the not-really-erased NAND pages to behave badly. After the space is fixed up, the superblock flag is cleared, so that this is skipped for all future mounts.
|
read |
int ubifs_read_superblock | ( | struct ubifs_info * | c | ) |
ubifs_read_superblock - read superblock. : UBIFS file-system description object
This function finds, reads and checks the superblock. If an empty UBI volume is being mounted, this function creates default superblock. Returns zero in case of success, and a negative error code in case of failure.
int ubifs_write_sb_node | ( | struct ubifs_info * | c, |
struct ubifs_sb_node * | sup | ||
) |
ubifs_write_sb_node - write superblock node. : UBIFS file-system description object : superblock node read with 'ubifs_read_sb_node()'
This function returns %0 on success and a negative error code on failure.