Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | idx_node |
Functions | |
int | ubifs_bg_thread (void *info) |
void | ubifs_commit_required (struct ubifs_info *c) |
void | ubifs_request_bg_commit (struct ubifs_info *c) |
int | ubifs_run_commit (struct ubifs_info *c) |
int | ubifs_gc_should_commit (struct ubifs_info *c) |
int | dbg_old_index_check_init (struct ubifs_info *c, struct ubifs_zbranch *zroot) |
int | dbg_check_old_index (struct ubifs_info *c, struct ubifs_zbranch *zroot) |
int dbg_check_old_index | ( | struct ubifs_info * | c, |
struct ubifs_zbranch * | zroot | ||
) |
dbg_check_old_index - check the old copy of the index. : UBIFS file-system description object : root of the new index
In order to be able to recover from an unclean unmount, a complete copy of the index must exist on flash. This is the "old" index. The commit process must write the "new" index to flash without overwriting or destroying any part of the old index. This function is run at commit end in order to check that the old index does indeed exist completely intact.
This function returns %0 on success and a negative error code on failure.
int dbg_old_index_check_init | ( | struct ubifs_info * | c, |
struct ubifs_zbranch * | zroot | ||
) |
dbg_old_index_check_init - get information for the next old index check. : UBIFS file-system description object : root of the index
This function records information about the index that will be needed for the next old index check i.e. 'dbg_check_old_index()'.
This function returns %0 on success and a negative error code on failure.
ubifs_bg_thread - UBIFS background thread function. : points to the file-system description object
This function implements various file-system background activities: o when a write-buffer timer expires it synchronizes the appropriate write-buffer; o when the journal is about to be full, it starts in-advance commit.
Note, other stuff like background garbage collection may be added here in future.
void ubifs_commit_required | ( | struct ubifs_info * | c | ) |
int ubifs_gc_should_commit | ( | struct ubifs_info * | c | ) |
ubifs_gc_should_commit - determine if it is time for GC to run commit. : UBIFS file-system description object
This function is called by garbage collection to determine if commit should be run. If commit state is , which means that the journal is full enough to start commit, this function returns true. It is not absolutely necessary to commit yet, but it feels like this should be better then to keep doing GC. This function returns %1 if GC has to initiate commit and %0 if not.
void ubifs_request_bg_commit | ( | struct ubifs_info * | c | ) |
int ubifs_run_commit | ( | struct ubifs_info * | c | ) |