Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/buffer_head.h>
#include <linux/spinlock.h>
#include <linux/blkdev.h>
#include <linux/nilfs2_fs.h>
#include "the_nilfs.h"
#include "bmap.h"
Go to the source code of this file.
Data Structures | |
struct | nilfs_inode_info |
struct | nilfs_transaction_info |
Macros | |
#define | NILFS_MDT_INO_BITS |
#define | NILFS_SYS_INO_BITS ((unsigned int)(1 << NILFS_ROOT_INO) | NILFS_MDT_INO_BITS) |
#define | NILFS_FIRST_INO(sb) (((struct the_nilfs *)sb->s_fs_info)->ns_first_ino) |
#define | NILFS_MDT_INODE(sb, ino) ((ino) < NILFS_FIRST_INO(sb) && (NILFS_MDT_INO_BITS & (1 << (ino)))) |
#define | NILFS_VALID_INODE(sb, ino) ((ino) >= NILFS_FIRST_INO(sb) || (NILFS_SYS_INO_BITS & (1 << (ino)))) |
#define | NILFS_TI_MAGIC 0xd9e392fb |
#define | NILFS_TI_DYNAMIC_ALLOC 0x0001 /* Allocated from slab */ |
#define | NILFS_TI_SYNC |
#define | NILFS_TI_GC 0x0004 /* GC context */ |
#define | NILFS_TI_COMMIT 0x0008 /* Change happened or not */ |
#define | NILFS_TI_WRITER 0x0010 /* Constructor context */ |
#define | NILFS_ATIME_DISABLE |
#define | NILFS_FL_INHERITED |
Enumerations | |
enum | { NILFS_I_NEW = 0, NILFS_I_DIRTY, NILFS_I_QUEUED, NILFS_I_BUSY, NILFS_I_COLLECTED, NILFS_I_UPDATED, NILFS_I_INODE_DIRTY, NILFS_I_BMAP, NILFS_I_GCINODE } |
enum | { NILFS_SB_COMMIT = 0, NILFS_SB_COMMIT_ALL } |
#define NILFS_FL_INHERITED |
#define NILFS_MDT_INO_BITS |
#define NILFS_MDT_INODE | ( | sb, | |
ino | |||
) | ((ino) < NILFS_FIRST_INO(sb) && (NILFS_MDT_INO_BITS & (1 << (ino)))) |
#define NILFS_SYS_INO_BITS ((unsigned int)(1 << NILFS_ROOT_INO) | NILFS_MDT_INO_BITS) |
#define NILFS_TI_DYNAMIC_ALLOC 0x0001 /* Allocated from slab */ |
#define NILFS_TI_SYNC |
#define NILFS_VALID_INODE | ( | sb, | |
ino | |||
) | ((ino) >= NILFS_FIRST_INO(sb) || (NILFS_SYS_INO_BITS & (1 << (ino)))) |
anonymous enum |
anonymous enum |
__printf | ( | 3 | , |
4 | |||
) |
|
read |
int nilfs_attach_checkpoint | ( | struct super_block * | sb, |
__u64 | cno, | ||
int | curr_mnt, | ||
struct nilfs_root ** | root | ||
) |
int nilfs_check_feature_compatibility | ( | struct super_block * | , |
struct nilfs_super_block * | |||
) |
int nilfs_checkpoint_is_mounted | ( | struct super_block * | sb, |
__u64 | cno | ||
) |
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.
int nilfs_commit_super | ( | struct super_block * | sb, |
int | flag | ||
) |
int nilfs_delete_entry | ( | struct nilfs_dir_entry * | , |
struct page * | |||
) |
nilfs_dirty_inode - reflect changes on given inode to an inode block. : inode of the file to be registered.
nilfs_dirty_inode() loads a inode block containing the specified and copies data from a nilfs_inode to a corresponding inode entry in the inode block. This operation is excluded from the segment construction. This function can be called both as a single operation and as a part of indivisible file operations.
int nilfs_get_block | ( | struct inode * | inode, |
sector_t | blkoff, | ||
struct buffer_head * | bh_result, | ||
int | create | ||
) |
nilfs_get_block() - get a file block on the filesystem (callback function) - inode struct of the target file - file block number - buffer head to be mapped on - indicate whether allocating the block or not when it has not been allocated yet.
This function does not issue actual read request of the specified data block. It is done by VFS.
|
read |
|
read |
|
read |
|
read |
int nilfs_read_inode_common | ( | struct inode * | , |
struct nilfs_inode * | |||
) |
nilfs_remove_all_gcinodes() - remove all unprocessed gc inodes
int nilfs_resize_fs | ( | struct super_block * | sb, |
__u64 | newsize | ||
) |
void nilfs_set_log_cursor | ( | struct nilfs_super_block * | , |
struct the_nilfs * | |||
) |
int nilfs_store_magic_and_option | ( | struct super_block * | , |
struct nilfs_super_block * | , | ||
char * | |||
) |
void nilfs_transaction_abort | ( | struct super_block * | ) |
int nilfs_transaction_begin | ( | struct super_block * | sb, |
struct nilfs_transaction_info * | ti, | ||
int | vacancy_check | ||
) |
nilfs_transaction_begin - start indivisible file operations. : super block : nilfs_transaction_info : flags for vacancy rate checks
nilfs_transaction_begin() acquires a reader/writer semaphore, called the segment semaphore, to make a segment construction and write tasks exclusive. The function is used with nilfs_transaction_commit() in pairs. The region enclosed by these two functions can be nested. To avoid a deadlock, the semaphore is only acquired or released in the outermost call.
This function allocates a nilfs_transaction_info struct to keep context information on it. It is initialized and hooked onto the current task in the outermost call. If a pre-allocated struct is given to , it is used instead; otherwise a new struct is assigned from a slab.
When flag is set, this function will check the amount of free space, and will wait for the GC to reclaim disk space if low capacity.
Return Value: On success, 0 is returned. On error, one of the following negative error code is returned.
%-ENOMEM - Insufficient memory available.
%-ENOSPC - No space left on device
int nilfs_transaction_commit | ( | struct super_block * | sb | ) |
nilfs_transaction_commit - commit indivisible file operations. : super block
nilfs_transaction_commit() releases the read semaphore which is acquired by nilfs_transaction_begin(). This is only performed in outermost call of this function. If a commit flag is set, nilfs_transaction_commit() sets a timer to start the segment constructor. If a sync flag is set, it starts construction directly.
struct address_space_operations nilfs_aops |
struct inode_operations nilfs_dir_inode_operations |
struct file_operations nilfs_dir_operations |
struct inode_operations nilfs_file_inode_operations |
struct file_operations nilfs_file_operations |
struct file_system_type nilfs_fs_type |
struct inode_operations nilfs_special_inode_operations |
struct inode_operations nilfs_symlink_inode_operations |