Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include <linux/nilfs2_fs.h>
#include "nilfs.h"
Go to the source code of this file.
Data Structures | |
struct | nilfs_recovery_info |
struct | nilfs_cstage |
struct | nilfs_segsum_pointer |
struct | nilfs_sc_info |
Macros | |
#define | NILFS_RECOVERY_SR_UPDATED 1 /* The super root was updated */ |
#define | NILFS_RECOVERY_ROLLFORWARD_DONE 2 /* Rollforward was carried out */ |
#define | NILFS_SEGCTOR_QUIT 0x0001 /* segctord is being destroyed */ |
#define | NILFS_SEGCTOR_COMMIT 0x0004 /* committed transaction exists */ |
#define | NILFS_SC_CLEANUP_RETRY |
#define | NILFS_SC_DEFAULT_TIMEOUT |
#define | NILFS_SC_DEFAULT_SR_FREQ |
#define | NILFS_SC_DEFAULT_WATERMARK 3600 |
Enumerations | |
enum | { NILFS_SC_DIRTY, NILFS_SC_UNCLOSED, NILFS_SC_SUPER_ROOT, NILFS_SC_PRIOR_FLUSH, NILFS_SC_HAVE_DELTA } |
Functions | |
void | nilfs_relax_pressure_in_lock (struct super_block *) |
int | nilfs_construct_segment (struct super_block *) |
int | nilfs_construct_dsync_segment (struct super_block *, struct inode *, loff_t, loff_t) |
void | nilfs_flush_segment (struct super_block *, ino_t) |
int | nilfs_clean_segments (struct super_block *, struct nilfs_argv *, void **) |
int | nilfs_attach_log_writer (struct super_block *sb, struct nilfs_root *root) |
void | nilfs_detach_log_writer (struct super_block *sb) |
int | nilfs_read_super_root_block (struct the_nilfs *, sector_t, struct buffer_head **, int) |
int | nilfs_search_super_root (struct the_nilfs *, struct nilfs_recovery_info *) |
int | nilfs_salvage_orphan_logs (struct the_nilfs *nilfs, struct super_block *sb, struct nilfs_recovery_info *ri) |
void | nilfs_dispose_segment_list (struct list_head *) |
Variables | |
struct kmem_cache * | nilfs_transaction_cachep |
#define NILFS_RECOVERY_ROLLFORWARD_DONE 2 /* Rollforward was carried out */ |
#define NILFS_SC_CLEANUP_RETRY |
#define NILFS_SC_DEFAULT_SR_FREQ |
#define NILFS_SC_DEFAULT_TIMEOUT |
#define NILFS_SEGCTOR_COMMIT 0x0004 /* committed transaction exists */ |
#define NILFS_SEGCTOR_QUIT 0x0001 /* segctord is being destroyed */ |
anonymous enum |
int nilfs_attach_log_writer | ( | struct super_block * | sb, |
struct nilfs_root * | root | ||
) |
nilfs_attach_log_writer - attach log writer : super block instance : root object of the current filesystem tree
This allocates a log writer object, initializes it, and starts the log writer.
Return Value: On success, 0 is returned. On error, one of the following negative error code is returned.
%-ENOMEM - Insufficient memory available.
int nilfs_clean_segments | ( | struct super_block * | , |
struct nilfs_argv * | , | ||
void ** | |||
) |
int nilfs_construct_dsync_segment | ( | struct super_block * | sb, |
struct inode * | inode, | ||
loff_t | start, | ||
loff_t | end | ||
) |
nilfs_construct_dsync_segment - construct a data-only logical segment : super block : inode whose data blocks should be written out : start byte offset : end byte offset (inclusive)
Return Value: On success, 0 is retured. On errors, one of the following negative error code is returned.
%-EROFS - Read only filesystem.
%-EIO - I/O error
%-ENOSPC - No space left on device (only in a panic state).
%-ERESTARTSYS - Interrupted.
%-ENOMEM - Insufficient memory available.
int nilfs_construct_segment | ( | struct super_block * | sb | ) |
nilfs_construct_segment - construct a logical segment : super block
Return Value: On success, 0 is retured. On errors, one of the following negative error code is returned.
%-EROFS - Read only filesystem.
%-EIO - I/O error
%-ENOSPC - No space left on device (only in a panic state).
%-ERESTARTSYS - Interrupted.
%-ENOMEM - Insufficient memory available.
void nilfs_detach_log_writer | ( | struct super_block * | sb | ) |
Definition at line 416 of file recovery.c.
void nilfs_flush_segment | ( | struct super_block * | sb, |
ino_t | ino | ||
) |
int nilfs_read_super_root_block | ( | struct the_nilfs * | nilfs, |
sector_t | sr_block, | ||
struct buffer_head ** | pbh, | ||
int | check | ||
) |
nilfs_read_super_root_block - read super root block : nilfs object : disk block number of the super root block : address of a buffer_head pointer to return super root buffer : CRC check flag
Definition at line 142 of file recovery.c.
void nilfs_relax_pressure_in_lock | ( | struct super_block * | ) |
int nilfs_salvage_orphan_logs | ( | struct the_nilfs * | nilfs, |
struct super_block * | sb, | ||
struct nilfs_recovery_info * | ri | ||
) |
nilfs_salvage_orphan_logs - salvage logs written after the latest checkpoint : nilfs object : super block instance : pointer to a nilfs_recovery_info struct to store search results.
Return Value: On success, 0 is returned. On error, one of the following negative error code is returned.
%-EINVAL - Inconsistent filesystem state.
%-EIO - I/O error
%-ENOSPC - No space left on device (only in a panic state).
%-ERESTARTSYS - Interrupted.
%-ENOMEM - Insufficient memory available.
Definition at line 743 of file recovery.c.
int nilfs_search_super_root | ( | struct the_nilfs * | nilfs, |
struct nilfs_recovery_info * | ri | ||
) |
nilfs_search_super_root - search the latest valid super root : the_nilfs : pointer to a nilfs_recovery_info struct to store search results.
nilfs_search_super_root() looks for the latest super-root from a partial segment pointed by the superblock. It sets up struct the_nilfs through this search. It fills nilfs_recovery_info (ri) required for recovery.
Return Value: On success, 0 is returned. On error, one of the following negative error code is returned.
%-EINVAL - No valid segment found
%-EIO - I/O error
%-ENOMEM - Insufficient memory available.
Definition at line 812 of file recovery.c.
struct kmem_cache* nilfs_transaction_cachep |