Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
master.c File Reference
#include "ubifs.h"

Go to the source code of this file.

Functions

int ubifs_read_master (struct ubifs_info *c)
 
int ubifs_write_master (struct ubifs_info *c)
 

Function Documentation

int ubifs_read_master ( struct ubifs_info c)

ubifs_read_master - read master node. : UBIFS file-system description object

This function finds and reads the master node during file-system mount. If the flash is empty, it creates default master node as well. Returns zero in case of success and a negative error code in case of failure.

Definition at line 256 of file master.c.

int ubifs_write_master ( struct ubifs_info c)

ubifs_write_master - write master node. : UBIFS file-system description object

This function writes the master node. The caller has to take the ->mst_mutex lock before calling this function. Returns zero in case of success and a negative error code in case of failure. The master node is written twice to enable recovery.

Definition at line 360 of file master.c.