Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
lpt_commit.c File Reference
#include <linux/crc16.h>
#include <linux/slab.h>
#include <linux/random.h>
#include "ubifs.h"

Go to the source code of this file.

Functions

int ubifs_lpt_start_commit (struct ubifs_info *c)
 
int ubifs_lpt_end_commit (struct ubifs_info *c)
 
int ubifs_lpt_post_commit (struct ubifs_info *c)
 
void ubifs_lpt_free (struct ubifs_info *c, int wr_only)
 
int dbg_check_ltab (struct ubifs_info *c)
 
int dbg_chk_lpt_free_spc (struct ubifs_info *c)
 
int dbg_chk_lpt_sz (struct ubifs_info *c, int action, int len)
 
void ubifs_dump_lpt_lebs (const struct ubifs_info *c)
 

Function Documentation

int dbg_check_ltab ( struct ubifs_info c)

dbg_check_ltab - check the free and dirty space in the ltab. : the UBIFS file-system description object

This function returns %0 on success and a negative error code on failure.

Definition at line 1703 of file lpt_commit.c.

int dbg_chk_lpt_free_spc ( struct ubifs_info c)

dbg_chk_lpt_free_spc - check LPT free space is enough to write entire LPT. : the UBIFS file-system description object

This function returns %0 on success and a negative error code on failure.

Definition at line 1745 of file lpt_commit.c.

int dbg_chk_lpt_sz ( struct ubifs_info c,
int  action,
int  len 
)

dbg_chk_lpt_sz - check LPT does not write more than LPT size. : the UBIFS file-system description object : what to do : length written

This function returns %0 on success and a negative error code on failure. The argument may be one of: o %0 - LPT debugging checking starts, initialize debugging variables; o %1 - wrote an LPT node, increase LPT size by bytes; o %2 - switched to a different LEB and wasted bytes; o %3 - check that we've written the right number of bytes. o %4 - wasted bytes;

Definition at line 1786 of file lpt_commit.c.

void ubifs_dump_lpt_lebs ( const struct ubifs_info c)

ubifs_dump_lpt_lebs - dump LPT lebs. : UBIFS file-system description object

This function dumps all LPT LEBs. The caller has to make sure the LPT is locked.

Definition at line 1983 of file lpt_commit.c.

int ubifs_lpt_end_commit ( struct ubifs_info c)

ubifs_lpt_end_commit - finish the commit operation. : the UBIFS file-system description object

This function has to be called when the commit operation finishes. It flushes the changes which were "frozen" by 'ubifs_lprops_start_commit()' to the media. Returns zero in case of success and a negative error code in case of failure.

Definition at line 1324 of file lpt_commit.c.

void ubifs_lpt_free ( struct ubifs_info c,
int  wr_only 
)

ubifs_lpt_free - free resources owned by the LPT. : UBIFS file-system description object : free only resources used for writing

Definition at line 1457 of file lpt_commit.c.

int ubifs_lpt_post_commit ( struct ubifs_info c)

ubifs_lpt_post_commit - post commit LPT trivial GC and LPT GC. : UBIFS file-system description object

LPT trivial GC is completed after a commit. Also LPT GC is done after a commit for the "big" LPT model.

Definition at line 1351 of file lpt_commit.c.

int ubifs_lpt_start_commit ( struct ubifs_info c)

ubifs_lpt_start_commit - UBIFS commit starts. : the UBIFS file-system description object

This function has to be called when UBIFS starts the commit operation. This function "freezes" all currently dirty LEB properties and does not change them anymore. Further changes are saved and tracked separately because they are not part of this commit. This function returns zero in case of success and a negative error code in case of failure.

Definition at line 1226 of file lpt_commit.c.