Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions | Variables
super.c File Reference
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/parser.h>
#include <linux/crc32.h>
#include <linux/vfs.h>
#include <linux/writeback.h>
#include <linux/seq_file.h>
#include <linux/mount.h>
#include "nilfs.h"
#include "export.h"
#include "mdt.h"
#include "alloc.h"
#include "btree.h"
#include "btnode.h"
#include "page.h"
#include "cpfile.h"
#include "sufile.h"
#include "ifile.h"
#include "dat.h"
#include "segment.h"
#include "segbuf.h"

Go to the source code of this file.

Data Structures

struct  nilfs_super_data
 

Enumerations

enum  {
  Opt_err_cont, Opt_err_panic, Opt_err_ro, Opt_barrier,
  Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery,
  Opt_discard, Opt_nodiscard, Opt_err
}
 

Functions

 MODULE_AUTHOR ("NTT Corp.")
 
 MODULE_DESCRIPTION ("A New Implementation of the Log-structured Filesystem ""(NILFS)")
 
 MODULE_LICENSE ("GPL")
 
void nilfs_error (struct super_block *sb, const char *function, const char *fmt,...)
 
void nilfs_warning (struct super_block *sb, const char *function, const char *fmt,...)
 
struct inodenilfs_alloc_inode (struct super_block *sb)
 
void nilfs_destroy_inode (struct inode *inode)
 
void nilfs_set_log_cursor (struct nilfs_super_block *sbp, struct the_nilfs *nilfs)
 
struct nilfs_super_block ** nilfs_prepare_super (struct super_block *sb, int flip)
 
int nilfs_commit_super (struct super_block *sb, int flag)
 
int nilfs_cleanup_super (struct super_block *sb)
 
int nilfs_resize_fs (struct super_block *sb, __u64 newsize)
 
int nilfs_attach_checkpoint (struct super_block *sb, __u64 cno, int curr_mnt, struct nilfs_root **rootp)
 
struct nilfs_super_blocknilfs_read_super_block (struct super_block *sb, u64 pos, int blocksize, struct buffer_head **pbh)
 
int nilfs_store_magic_and_option (struct super_block *sb, struct nilfs_super_block *sbp, char *data)
 
int nilfs_check_feature_compatibility (struct super_block *sb, struct nilfs_super_block *sbp)
 
int nilfs_checkpoint_is_mounted (struct super_block *sb, __u64 cno)
 

Variables

struct kmem_cachenilfs_transaction_cachep
 
struct kmem_cachenilfs_segbuf_cachep
 
struct kmem_cachenilfs_btree_path_cache
 
struct file_system_type nilfs_fs_type
 

Enumeration Type Documentation

anonymous enum
Enumerator:
Opt_err_cont 
Opt_err_panic 
Opt_err_ro 
Opt_barrier 
Opt_nobarrier 
Opt_snapshot 
Opt_order 
Opt_norecovery 
Opt_discard 
Opt_nodiscard 
Opt_err 

Definition at line 689 of file super.c.

Function Documentation

MODULE_AUTHOR ( "NTT Corp."  )
MODULE_DESCRIPTION ( "A New Implementation of the Log-structured Filesystem ""(NILFS)"  )
MODULE_LICENSE ( "GPL"  )
struct inode* nilfs_alloc_inode ( struct super_block sb)
read

Definition at line 158 of file super.c.

int nilfs_attach_checkpoint ( struct super_block sb,
__u64  cno,
int  curr_mnt,
struct nilfs_root **  rootp 
)

Definition at line 520 of file super.c.

int nilfs_check_feature_compatibility ( struct super_block sb,
struct nilfs_super_block sbp 
)

Definition at line 865 of file super.c.

int nilfs_checkpoint_is_mounted ( struct super_block sb,
__u64  cno 
)

Definition at line 993 of file super.c.

int nilfs_cleanup_super ( struct super_block sb)

nilfs_cleanup_super() - write filesystem state for cleanup : super block instance to be unmounted or degraded to read-only

This function restores state flags in the on-disk super block. This will set "clean" flag (i.e. NILFS_VALID_FS) unless the filesystem was not clean previously.

Definition at line 324 of file super.c.

int nilfs_commit_super ( struct super_block sb,
int  flag 
)

Definition at line 291 of file super.c.

void nilfs_destroy_inode ( struct inode inode)

Definition at line 185 of file super.c.

void nilfs_error ( struct super_block sb,
const char function,
const char fmt,
  ... 
)

nilfs_error() - report failure condition on a filesystem

nilfs_error() sets an ERROR_FS flag on the superblock as well as reporting an error message. It should be called when NILFS detects incoherences or defects of meta data on disk. As for sustainable errors such as a single-shot I/O error, nilfs_warning() or the printk() function should be used instead.

The segment constructor must not call this function because it can kill itself.

Definition at line 109 of file super.c.

struct nilfs_super_block** nilfs_prepare_super ( struct super_block sb,
int  flip 
)
read

Definition at line 264 of file super.c.

struct nilfs_super_block* nilfs_read_super_block ( struct super_block sb,
u64  pos,
int  blocksize,
struct buffer_head **  pbh 
)
read

Definition at line 828 of file super.c.

int nilfs_resize_fs ( struct super_block sb,
__u64  newsize 
)

nilfs_resize_fs - resize the filesystem : super block instance : new size of the filesystem (in bytes)

Definition at line 411 of file super.c.

void nilfs_set_log_cursor ( struct nilfs_super_block sbp,
struct the_nilfs nilfs 
)

Definition at line 248 of file super.c.

int nilfs_store_magic_and_option ( struct super_block sb,
struct nilfs_super_block sbp,
char data 
)

Definition at line 842 of file super.c.

void nilfs_warning ( struct super_block sb,
const char function,
const char fmt,
  ... 
)

Definition at line 140 of file super.c.

Variable Documentation

struct kmem_cache* nilfs_btree_path_cache

Definition at line 73 of file super.c.

struct file_system_type nilfs_fs_type
Initial value:
= {
.owner = THIS_MODULE,
.name = "nilfs2",
.mount = nilfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
}

Definition at line 1357 of file super.c.

struct kmem_cache* nilfs_segbuf_cachep

Definition at line 72 of file super.c.

struct kmem_cache* nilfs_transaction_cachep

Definition at line 71 of file super.c.