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

Go to the source code of this file.

Data Structures

struct  check_orphan
 
struct  check_info
 

Functions

int ubifs_add_orphan (struct ubifs_info *c, ino_t inum)
 
void ubifs_delete_orphan (struct ubifs_info *c, ino_t inum)
 
int ubifs_orphan_start_commit (struct ubifs_info *c)
 
int ubifs_orphan_end_commit (struct ubifs_info *c)
 
int ubifs_clear_orphans (struct ubifs_info *c)
 
int ubifs_mount_orphans (struct ubifs_info *c, int unclean, int read_only)
 

Function Documentation

int ubifs_add_orphan ( struct ubifs_info c,
ino_t  inum 
)

ubifs_add_orphan - add an orphan. : UBIFS file-system description object : orphan inode number

Add an orphan. This function is called when an inodes link count drops to zero.

Definition at line 65 of file orphan.c.

int ubifs_clear_orphans ( struct ubifs_info c)

ubifs_clear_orphans - erase all LEBs used for orphans. : UBIFS file-system description object

If recovery is not required, then the orphans from the previous session are not needed. This function locates the LEBs used to record orphans, and un-maps them.

Definition at line 483 of file orphan.c.

void ubifs_delete_orphan ( struct ubifs_info c,
ino_t  inum 
)

ubifs_delete_orphan - delete an orphan. : UBIFS file-system description object : orphan inode number

Delete an orphan. This function is called when an inode is deleted.

Definition at line 115 of file orphan.c.

int ubifs_mount_orphans ( struct ubifs_info c,
int  unclean,
int  read_only 
)

ubifs_mount_orphans - delete orphan inodes and erase LEBs that recorded them. : UBIFS file-system description object : indicates recovery from unclean unmount : indicates read only mount

This function is called when mounting to erase orphans from the previous session. If UBIFS was not unmounted cleanly, then the inodes recorded as orphans are deleted.

Definition at line 702 of file orphan.c.

int ubifs_orphan_end_commit ( struct ubifs_info c)

ubifs_orphan_end_commit - end commit of orphans. : UBIFS file-system description object

End commit of orphans.

Definition at line 461 of file orphan.c.

int ubifs_orphan_start_commit ( struct ubifs_info c)

ubifs_orphan_start_commit - start commit of orphans. : UBIFS file-system description object

Start commit of orphans.

Definition at line 167 of file orphan.c.