Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
logfs.h File Reference
#include <linux/btree.h>
#include <linux/crc32.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/mempool.h>
#include <linux/pagemap.h>
#include <linux/mtd/mtd.h>
#include "logfs_abi.h"

Go to the source code of this file.

Data Structures

struct  logfs_area
 
struct  logfs_area_ops
 
struct  logfs_device_ops
 
struct  candidate_list
 
struct  gc_candidate
 
struct  logfs_journal_entry
 
struct  logfs_transaction
 
struct  logfs_shadow
 
struct  shadow_tree
 
struct  object_alias_item
 
struct  logfs_block
 
struct  logfs_block_ops
 
struct  logfs_super
 
struct  logfs_inode
 

Macros

#define __CHECK_ENDIAN__
 
#define LOGFS_DEBUG_SUPER   (0x0001)
 
#define LOGFS_DEBUG_SEGMENT   (0x0002)
 
#define LOGFS_DEBUG_JOURNAL   (0x0004)
 
#define LOGFS_DEBUG_DIR   (0x0008)
 
#define LOGFS_DEBUG_FILE   (0x0010)
 
#define LOGFS_DEBUG_INODE   (0x0020)
 
#define LOGFS_DEBUG_READWRITE   (0x0040)
 
#define LOGFS_DEBUG_GC   (0x0080)
 
#define LOGFS_DEBUG_GC_NOISY   (0x0100)
 
#define LOGFS_DEBUG_ALIASES   (0x0200)
 
#define LOGFS_DEBUG_BLOCKMOVE   (0x0400)
 
#define LOGFS_DEBUG_ALL   (0xffffffff)
 
#define LOGFS_DEBUG   (0x01)
 
#define log_cond(cond, fmt, arg...)
 
#define log_super(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_SUPER, fmt, ##arg)
 
#define log_segment(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_SEGMENT, fmt, ##arg)
 
#define log_journal(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_JOURNAL, fmt, ##arg)
 
#define log_dir(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_DIR, fmt, ##arg)
 
#define log_file(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_FILE, fmt, ##arg)
 
#define log_inode(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_INODE, fmt, ##arg)
 
#define log_readwrite(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_READWRITE, fmt, ##arg)
 
#define log_gc(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_GC, fmt, ##arg)
 
#define log_gc_noisy(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_GC_NOISY, fmt, ##arg)
 
#define log_aliases(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_ALIASES, fmt, ##arg)
 
#define log_blockmove(fmt, arg...)   log_cond(LOGFS_DEBUG & LOGFS_DEBUG_BLOCKMOVE, fmt, ##arg)
 
#define PG_pre_locked   PG_owner_priv_1
 
#define PagePreLocked(page)   test_bit(PG_pre_locked, &(page)->flags)
 
#define SetPagePreLocked(page)   set_bit(PG_pre_locked, &(page)->flags)
 
#define ClearPagePreLocked(page)   clear_bit(PG_pre_locked, &(page)->flags)
 
#define LOGFS_LINK_MAX   (1<<30)
 
#define LOGFS_SB_FLAG_RO   0x0001
 
#define LOGFS_SB_FLAG_DIRTY   0x0002
 
#define LOGFS_SB_FLAG_OBJ_ALIAS   0x0004
 
#define LOGFS_SB_FLAG_SHUTDOWN   0x0008
 
#define WF_LOCK   0x01 /* take write lock */
 
#define WF_WRITE   0x02 /* write block */
 
#define WF_DELETE   0x04 /* delete old block */
 
#define LEVEL(level)   ((__force level_t)(level))
 
#define GC_LEVEL(gc_level)   ((__force gc_level_t)(gc_level))
 
#define SUBLEVEL(level)
 
#define BLOCK_INDIRECT   1 /* Indirect block */
 
#define BLOCK_INODE   2 /* Inode */
 
#define MAX_JOURNAL_ENTRIES   256
 
#define journal_for_each(__i)   for (__i = 0; __i < LOGFS_JOURNAL_SEGS; __i++)
 
#define for_each_area(__i)   for (__i = 0; __i < LOGFS_NO_AREAS; __i++)
 
#define for_each_area_down(__i)   for (__i = LOGFS_NO_AREAS - 1; __i >= 0; __i--)
 
#define LOGFS_BUG(sb)
 
#define LOGFS_BUG_ON(condition, sb)   do { if (unlikely(condition)) LOGFS_BUG((sb)); } while (0)
 

Typedefs

typedef u8 __bitwise level_t
 
typedef u8 __bitwise gc_level_t
 
typedef int write_alias_t (struct super_block *sb, u64 ino, u64 bix, level_t level, int child_no, __be64 val)
 

Enumerations

enum  transaction_state {
  CREATE_1 = 1, CREATE_2, UNLINK_1, UNLINK_2,
  CROSS_RENAME_1, CROSS_RENAME_2, TARGET_RENAME_1, TARGET_RENAME_2,
  TARGET_RENAME_3
}
 

Functions

int logfs_compress (void *in, void *out, size_t inlen, size_t outlen)
 
int logfs_uncompress (void *in, void *out, size_t inlen, size_t outlen)
 
int __init logfs_compr_init (void)
 
void logfs_compr_exit (void)
 
int logfs_replay_journal (struct super_block *sb)
 
int logfs_readpage (struct file *file, struct page *page)
 
long logfs_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
 
int logfs_fsync (struct file *file, loff_t start, loff_t end, int datasync)
 
u32 get_best_cand (struct super_block *sb, struct candidate_list *list, u32 *ec)
 
void logfs_gc_pass (struct super_block *sb)
 
int logfs_check_areas (struct super_block *sb)
 
int logfs_init_gc (struct super_block *sb)
 
void logfs_cleanup_gc (struct super_block *sb)
 
struct inodelogfs_iget (struct super_block *sb, ino_t ino)
 
struct inodelogfs_safe_iget (struct super_block *sb, ino_t ino, int *cookie)
 
void logfs_safe_iput (struct inode *inode, int cookie)
 
struct inodelogfs_new_inode (struct inode *dir, umode_t mode)
 
struct inodelogfs_new_meta_inode (struct super_block *sb, u64 ino)
 
struct inodelogfs_read_meta_inode (struct super_block *sb, u64 ino)
 
int logfs_init_inode_cache (void)
 
void logfs_destroy_inode_cache (void)
 
void logfs_set_blocks (struct inode *inode, u64 no)
 
int logfs_read_inode (struct inode *inode)
 
int __logfs_write_inode (struct inode *inode, struct page *, long flags)
 
void logfs_evict_inode (struct inode *inode)
 
void logfs_write_anchor (struct super_block *sb)
 
int logfs_init_journal (struct super_block *sb)
 
void logfs_cleanup_journal (struct super_block *sb)
 
int write_alias_journal (struct super_block *sb, u64 ino, u64 bix, level_t level, int child_no, __be64 val)
 
void do_logfs_journal_wl_pass (struct super_block *sb)
 
pgoff_t logfs_pack_index (u64 bix, level_t level)
 
void logfs_unpack_index (pgoff_t index, u64 *bix, level_t *level)
 
int logfs_inode_write (struct inode *inode, const void *buf, size_t count, loff_t bix, long flags, struct shadow_tree *shadow_tree)
 
int logfs_readpage_nolock (struct page *page)
 
int logfs_write_buf (struct inode *inode, struct page *page, long flags)
 
int logfs_delete (struct inode *inode, pgoff_t index, struct shadow_tree *shadow_tree)
 
int logfs_rewrite_block (struct inode *inode, u64 bix, u64 ofs, gc_level_t gc_level, long flags)
 
int logfs_is_valid_block (struct super_block *sb, u64 ofs, u64 ino, u64 bix, gc_level_t gc_level)
 
int logfs_truncate (struct inode *inode, u64 size)
 
u64 logfs_seek_hole (struct inode *inode, u64 bix)
 
u64 logfs_seek_data (struct inode *inode, u64 bix)
 
int logfs_open_segfile (struct super_block *sb)
 
int logfs_init_rw (struct super_block *sb)
 
void logfs_cleanup_rw (struct super_block *sb)
 
void logfs_add_transaction (struct inode *inode, struct logfs_transaction *ta)
 
void logfs_del_transaction (struct inode *inode, struct logfs_transaction *ta)
 
void logfs_write_block (struct logfs_block *block, long flags)
 
int logfs_write_obj_aliases_pagecache (struct super_block *sb)
 
void logfs_get_segment_entry (struct super_block *sb, u32 segno, struct logfs_segment_entry *se)
 
void logfs_set_segment_used (struct super_block *sb, u64 ofs, int increment)
 
void logfs_set_segment_erased (struct super_block *sb, u32 segno, u32 ec, gc_level_t gc_level)
 
void logfs_set_segment_reserved (struct super_block *sb, u32 segno)
 
void logfs_set_segment_unreserved (struct super_block *sb, u32 segno, u32 ec)
 
struct logfs_block__alloc_block (struct super_block *sb, u64 ino, u64 bix, level_t level)
 
void __free_block (struct super_block *sb, struct logfs_block *block)
 
void btree_write_block (struct logfs_block *block)
 
void initialize_block_counters (struct page *page, struct logfs_block *block, __be64 *array, int page_is_empty)
 
int logfs_exist_block (struct inode *inode, u64 bix)
 
int get_page_reserve (struct inode *inode, struct page *page)
 
void logfs_get_wblocks (struct super_block *sb, struct page *page, int lock)
 
void logfs_put_wblocks (struct super_block *sb, struct page *page, int lock)
 
int logfs_erase_segment (struct super_block *sb, u32 ofs, int ensure_erase)
 
int wbuf_read (struct super_block *sb, u64 ofs, size_t len, void *buf)
 
int logfs_segment_read (struct inode *inode, struct page *page, u64 ofs, u64 bix, level_t level)
 
int logfs_segment_write (struct inode *inode, struct page *page, struct logfs_shadow *shadow)
 
int logfs_segment_delete (struct inode *inode, struct logfs_shadow *shadow)
 
int logfs_load_object_aliases (struct super_block *sb, struct logfs_obj_alias *oa, int count)
 
void move_page_to_btree (struct page *page)
 
int logfs_init_mapping (struct super_block *sb)
 
void logfs_sync_area (struct logfs_area *area)
 
void logfs_sync_segments (struct super_block *sb)
 
void freeseg (struct super_block *sb, u32 segno)
 
void free_areas (struct super_block *sb)
 
int logfs_init_areas (struct super_block *sb)
 
void logfs_cleanup_areas (struct super_block *sb)
 
int logfs_open_area (struct logfs_area *area, size_t bytes)
 
int __logfs_buf_write (struct logfs_area *area, u64 ofs, void *buf, size_t len, int use_filler)
 
struct pageemergency_read_begin (struct address_space *mapping, pgoff_t index)
 
void emergency_read_end (struct page *page)
 
void logfs_crash_dump (struct super_block *sb)
 
int logfs_statfs (struct dentry *dentry, struct kstatfs *stats)
 
int logfs_check_ds (struct logfs_disk_super *ds)
 
int logfs_write_sb (struct super_block *sb)
 

Variables

struct inode_operations logfs_symlink_iops
 
struct inode_operations logfs_dir_iops
 
struct file_operations logfs_dir_fops
 
struct inode_operations logfs_reg_iops
 
struct file_operations logfs_reg_fops
 
struct address_space_operations logfs_reg_aops
 
struct super_operations logfs_super_operations
 
struct logfs_block_ops indirect_block_ops
 

Macro Definition Documentation

#define __CHECK_ENDIAN__

Definition at line 14 of file logfs.h.

#define BLOCK_INDIRECT   1 /* Indirect block */

struct logfs_block - contains any block state : indirect block or inode : number of fully populated children : number of partially populated children

Most blocks are directly represented by page cache pages. But when a block becomes dirty, is part of a transaction, contains aliases or is otherwise special, a struct logfs_block is allocated to track the additional state. Inodes are very similar to indirect blocks, so they can also get one of these structures added when appropriate.

Definition at line 291 of file logfs.h.

#define BLOCK_INODE   2 /* Inode */

Definition at line 292 of file logfs.h.

#define ClearPagePreLocked (   page)    clear_bit(PG_pre_locked, &(page)->flags)

Definition at line 78 of file logfs.h.

#define for_each_area (   __i)    for (__i = 0; __i < LOGFS_NO_AREAS; __i++)

Definition at line 464 of file logfs.h.

#define for_each_area_down (   __i)    for (__i = LOGFS_NO_AREAS - 1; __i >= 0; __i--)

Definition at line 465 of file logfs.h.

#define GC_LEVEL (   gc_level)    ((__force gc_level_t)(gc_level))

Definition at line 98 of file logfs.h.

#define journal_for_each (   __i)    for (__i = 0; __i < LOGFS_JOURNAL_SEGS; __i++)

Definition at line 463 of file logfs.h.

#define LEVEL (   level)    ((__force level_t)(level))

Definition at line 97 of file logfs.h.

#define log_aliases (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_ALIASES, fmt, ##arg)

Definition at line 70 of file logfs.h.

#define log_blockmove (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_BLOCKMOVE, fmt, ##arg)

Definition at line 72 of file logfs.h.

#define log_cond (   cond,
  fmt,
  arg... 
)
Value:
do { \
if (cond) \
printk(KERN_DEBUG fmt, ##arg); \
} while (0)

Definition at line 47 of file logfs.h.

#define log_dir (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_DIR, fmt, ##arg)

Definition at line 58 of file logfs.h.

#define log_file (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_FILE, fmt, ##arg)

Definition at line 60 of file logfs.h.

#define log_gc (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_GC, fmt, ##arg)

Definition at line 66 of file logfs.h.

#define log_gc_noisy (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_GC_NOISY, fmt, ##arg)

Definition at line 68 of file logfs.h.

#define log_inode (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_INODE, fmt, ##arg)

Definition at line 62 of file logfs.h.

#define log_journal (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_JOURNAL, fmt, ##arg)

Definition at line 56 of file logfs.h.

#define log_readwrite (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_READWRITE, fmt, ##arg)

Definition at line 64 of file logfs.h.

#define log_segment (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_SEGMENT, fmt, ##arg)

Definition at line 54 of file logfs.h.

#define log_super (   fmt,
  arg... 
)    log_cond(LOGFS_DEBUG & LOGFS_DEBUG_SUPER, fmt, ##arg)

Definition at line 52 of file logfs.h.

#define LOGFS_BUG (   sb)
Value:
do { \
logfs_crash_dump(__sb); \
BUG(); \
} while (0)

Definition at line 643 of file logfs.h.

#define LOGFS_BUG_ON (   condition,
  sb 
)    do { if (unlikely(condition)) LOGFS_BUG((sb)); } while (0)

Definition at line 650 of file logfs.h.

#define LOGFS_DEBUG   (0x01)

Definition at line 38 of file logfs.h.

#define LOGFS_DEBUG_ALIASES   (0x0200)

Definition at line 34 of file logfs.h.

#define LOGFS_DEBUG_ALL   (0xffffffff)

Definition at line 36 of file logfs.h.

#define LOGFS_DEBUG_BLOCKMOVE   (0x0400)

Definition at line 35 of file logfs.h.

#define LOGFS_DEBUG_DIR   (0x0008)

Definition at line 28 of file logfs.h.

#define LOGFS_DEBUG_FILE   (0x0010)

Definition at line 29 of file logfs.h.

#define LOGFS_DEBUG_GC   (0x0080)

Definition at line 32 of file logfs.h.

#define LOGFS_DEBUG_GC_NOISY   (0x0100)

Definition at line 33 of file logfs.h.

#define LOGFS_DEBUG_INODE   (0x0020)

Definition at line 30 of file logfs.h.

#define LOGFS_DEBUG_JOURNAL   (0x0004)

Definition at line 27 of file logfs.h.

#define LOGFS_DEBUG_READWRITE   (0x0040)

Definition at line 31 of file logfs.h.

#define LOGFS_DEBUG_SEGMENT   (0x0002)

Definition at line 26 of file logfs.h.

#define LOGFS_DEBUG_SUPER   (0x0001)

Definition at line 25 of file logfs.h.

#define LOGFS_LINK_MAX   (1<<30)

Definition at line 81 of file logfs.h.

#define LOGFS_SB_FLAG_DIRTY   0x0002

Definition at line 85 of file logfs.h.

#define LOGFS_SB_FLAG_OBJ_ALIAS   0x0004

Definition at line 86 of file logfs.h.

#define LOGFS_SB_FLAG_RO   0x0001

Definition at line 84 of file logfs.h.

#define LOGFS_SB_FLAG_SHUTDOWN   0x0008

Definition at line 87 of file logfs.h.

#define MAX_JOURNAL_ENTRIES   256

Definition at line 321 of file logfs.h.

#define PagePreLocked (   page)    test_bit(PG_pre_locked, &(page)->flags)

Definition at line 76 of file logfs.h.

#define PG_pre_locked   PG_owner_priv_1

Definition at line 75 of file logfs.h.

#define SetPagePreLocked (   page)    set_bit(PG_pre_locked, &(page)->flags)

Definition at line 77 of file logfs.h.

#define SUBLEVEL (   level)
Value:
( (void)((level) == LEVEL(1)), \

Definition at line 100 of file logfs.h.

#define WF_DELETE   0x04 /* delete old block */

Definition at line 92 of file logfs.h.

#define WF_LOCK   0x01 /* take write lock */

Definition at line 90 of file logfs.h.

#define WF_WRITE   0x02 /* write block */

Definition at line 91 of file logfs.h.

Typedef Documentation

Definition at line 95 of file logfs.h.

typedef u8 __bitwise level_t

Definition at line 94 of file logfs.h.

typedef int write_alias_t(struct super_block *sb, u64 ino, u64 bix, level_t level, int child_no, __be64 val)

Definition at line 311 of file logfs.h.

Enumeration Type Documentation

Enumerator:
CREATE_1 
CREATE_2 
UNLINK_1 
UNLINK_2 
CROSS_RENAME_1 
CROSS_RENAME_2 
TARGET_RENAME_1 
TARGET_RENAME_2 
TARGET_RENAME_3 

Definition at line 213 of file logfs.h.

Function Documentation

struct logfs_block* __alloc_block ( struct super_block sb,
u64  ino,
u64  bix,
level_t  level 
)
read

Definition at line 584 of file readwrite.c.

void __free_block ( struct super_block sb,
struct logfs_block block 
)

Definition at line 543 of file readwrite.c.

int __logfs_buf_write ( struct logfs_area area,
u64  ofs,
void buf,
size_t  len,
int  use_filler 
)

Definition at line 70 of file segment.c.

int __logfs_write_inode ( struct inode inode,
struct page ,
long  flags 
)

Definition at line 2126 of file readwrite.c.

void btree_write_block ( struct logfs_block block)

Definition at line 2197 of file readwrite.c.

void do_logfs_journal_wl_pass ( struct super_block sb)

Definition at line 805 of file journal.c.

struct page* emergency_read_begin ( struct address_space mapping,
pgoff_t  index 
)
read

Definition at line 24 of file super.c.

void emergency_read_end ( struct page page)

Definition at line 46 of file super.c.

void free_areas ( struct super_block sb)

Definition at line 865 of file segment.c.

void freeseg ( struct super_block sb,
u32  segno 
)

Definition at line 710 of file segment.c.

u32 get_best_cand ( struct super_block sb,
struct candidate_list list,
u32 ec 
)

Definition at line 234 of file gc.c.

int get_page_reserve ( struct inode inode,
struct page page 
)

Definition at line 1101 of file readwrite.c.

void initialize_block_counters ( struct page page,
struct logfs_block block,
__be64 array,
int  page_is_empty 
)

Definition at line 615 of file readwrite.c.

void logfs_add_transaction ( struct inode inode,
struct logfs_transaction ta 
)

Definition at line 1495 of file readwrite.c.

int logfs_check_areas ( struct super_block sb)

Definition at line 663 of file gc.c.

int logfs_check_ds ( struct logfs_disk_super ds)

Definition at line 345 of file super.c.

void logfs_cleanup_areas ( struct super_block sb)

Definition at line 954 of file segment.c.

void logfs_cleanup_gc ( struct super_block sb)

Definition at line 713 of file gc.c.

void logfs_cleanup_journal ( struct super_block sb)

Definition at line 886 of file journal.c.

void logfs_cleanup_rw ( struct super_block sb)

Definition at line 2287 of file readwrite.c.

void logfs_compr_exit ( void  )

Definition at line 92 of file compr.c.

int __init logfs_compr_init ( void  )

Definition at line 82 of file compr.c.

int logfs_compress ( void in,
void out,
size_t  inlen,
size_t  outlen 
)

Definition at line 17 of file compr.c.

void logfs_crash_dump ( struct super_block sb)

Definition at line 89 of file super.c.

void logfs_del_transaction ( struct inode inode,
struct logfs_transaction ta 
)

Definition at line 1501 of file readwrite.c.

int logfs_delete ( struct inode inode,
pgoff_t  index,
struct shadow_tree shadow_tree 
)

Definition at line 1591 of file readwrite.c.

void logfs_destroy_inode_cache ( void  )

Definition at line 418 of file inode.c.

int logfs_erase_segment ( struct super_block sb,
u32  ofs,
int  ensure_erase 
)

Definition at line 29 of file segment.c.

void logfs_evict_inode ( struct inode inode)

Definition at line 2162 of file readwrite.c.

int logfs_exist_block ( struct inode inode,
u64  bix 
)

Definition at line 810 of file readwrite.c.

int logfs_fsync ( struct file file,
loff_t  start,
loff_t  end,
int  datasync 
)

Definition at line 222 of file file.c.

void logfs_gc_pass ( struct super_block sb)

Definition at line 615 of file gc.c.

void logfs_get_segment_entry ( struct super_block sb,
u32  segno,
struct logfs_segment_entry se 
)

Definition at line 2062 of file readwrite.c.

void logfs_get_wblocks ( struct super_block sb,
struct page page,
int  lock 
)

Definition at line 247 of file readwrite.c.

struct inode* logfs_iget ( struct super_block sb,
ino_t  ino 
)
read

Definition at line 109 of file inode.c.

int logfs_init_areas ( struct super_block sb)

Definition at line 921 of file segment.c.

int logfs_init_gc ( struct super_block sb)

Definition at line 684 of file gc.c.

int logfs_init_inode_cache ( void  )

Definition at line 408 of file inode.c.

int logfs_init_journal ( struct super_block sb)

Definition at line 853 of file journal.c.

int logfs_init_mapping ( struct super_block sb)

Definition at line 904 of file segment.c.

int logfs_init_rw ( struct super_block sb)

Definition at line 2272 of file readwrite.c.

int logfs_inode_write ( struct inode inode,
const void buf,
size_t  count,
loff_t  bix,
long  flags,
struct shadow_tree shadow_tree 
)

logfs_inode_write - write inode or dentry objects

: parent inode (ifile or directory) : object to write (inode or dentry)
: object size : object number (file position in blocks/objects) : write flags : 0 if write lock is already taken, 1 otherwise : shadow below this inode

FIXME: All caller of this put a 200-300 byte variable on the stack, only to call here and do a memcpy from that stack variable. A good example of wasted performance and stack space.

Definition at line 2233 of file readwrite.c.

long logfs_ioctl ( struct file file,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 184 of file file.c.

int logfs_is_valid_block ( struct super_block sb,
u64  ofs,
u64  ino,
u64  bix,
gc_level_t  gc_level 
)

logfs_is_valid_block - check whether this block is still valid

- superblock - block physical offset - block inode number - block index - block level

Returns 0 if the block is invalid, 1 if it is valid and 2 if it will become invalid once the journal is written.

Definition at line 1031 of file readwrite.c.

int logfs_load_object_aliases ( struct super_block sb,
struct logfs_obj_alias oa,
int  count 
)

Definition at line 205 of file segment.c.

struct inode* logfs_new_inode ( struct inode dir,
umode_t  mode 
)
read

Definition at line 342 of file inode.c.

struct inode* logfs_new_meta_inode ( struct super_block sb,
u64  ino 
)
read

Definition at line 262 of file inode.c.

int logfs_open_area ( struct logfs_area area,
size_t  bytes 
)

Definition at line 731 of file segment.c.

int logfs_open_segfile ( struct super_block sb)

Definition at line 2260 of file readwrite.c.

pgoff_t logfs_pack_index ( u64  bix,
level_t  level 
)

Definition at line 67 of file readwrite.c.

void logfs_put_wblocks ( struct super_block sb,
struct page page,
int  lock 
)

Definition at line 262 of file readwrite.c.

int logfs_read_inode ( struct inode inode)

Definition at line 1945 of file readwrite.c.

struct inode* logfs_read_meta_inode ( struct super_block sb,
u64  ino 
)
read

Definition at line 278 of file inode.c.

int logfs_readpage ( struct file file,
struct page page 
)

Definition at line 82 of file file.c.

int logfs_readpage_nolock ( struct page page)

Definition at line 1063 of file readwrite.c.

int logfs_replay_journal ( struct super_block sb)

Definition at line 748 of file dir.c.

int logfs_rewrite_block ( struct inode inode,
u64  bix,
u64  ofs,
gc_level_t  gc_level,
long  flags 
)

Definition at line 1611 of file readwrite.c.

struct inode* logfs_safe_iget ( struct super_block sb,
ino_t  ino,
int cookie 
)
read

Definition at line 120 of file inode.c.

void logfs_safe_iput ( struct inode inode,
int  cookie 
)

Definition at line 187 of file inode.c.

u64 logfs_seek_data ( struct inode inode,
u64  bix 
)

logfs_seek_data - find next data block after a given block index : inode to search in : block index to start searching

Returns next data block. If the file doesn't contain any further data blocks, the last block in the file is returned instead.

Definition at line 944 of file readwrite.c.

u64 logfs_seek_hole ( struct inode inode,
u64  bix 
)

logfs_seek_hole - find next hole starting at a given block index : inode to search in : block index to start searching

Returns next hole. If the file doesn't contain any further holes, the block address next to eof is returned instead.

Definition at line 887 of file readwrite.c.

int logfs_segment_delete ( struct inode inode,
struct logfs_shadow shadow 
)

Definition at line 678 of file segment.c.

int logfs_segment_read ( struct inode inode,
struct page page,
u64  ofs,
u64  bix,
level_t  level 
)

logfs_segment_read - read data block from object store : inode containing data : data buffer : physical data offset : block index : block level

Returns 0 on success or a negative errno.

Definition at line 655 of file segment.c.

int logfs_segment_write ( struct inode inode,
struct page page,
struct logfs_shadow shadow 
)

logfs_segment_write - write data block to object store : inode containing data

Returns an errno or zero.

Definition at line 362 of file segment.c.

void logfs_set_blocks ( struct inode inode,
u64  no 
)

Definition at line 197 of file readwrite.c.

void logfs_set_segment_erased ( struct super_block sb,
u32  segno,
u32  ec,
gc_level_t  gc_level 
)

Definition at line 2093 of file readwrite.c.

void logfs_set_segment_reserved ( struct super_block sb,
u32  segno 
)

Definition at line 2106 of file readwrite.c.

void logfs_set_segment_unreserved ( struct super_block sb,
u32  segno,
u32  ec 
)

Definition at line 2118 of file readwrite.c.

void logfs_set_segment_used ( struct super_block sb,
u64  ofs,
int  increment 
)

Definition at line 2077 of file readwrite.c.

int logfs_statfs ( struct dentry dentry,
struct kstatfs stats 
)

Definition at line 97 of file super.c.

void logfs_sync_area ( struct logfs_area area)

Definition at line 769 of file segment.c.

void logfs_sync_segments ( struct super_block sb)

Definition at line 785 of file segment.c.

int logfs_truncate ( struct inode inode,
u64  size 
)

Definition at line 1868 of file readwrite.c.

int logfs_uncompress ( void in,
void out,
size_t  inlen,
size_t  outlen 
)

Definition at line 51 of file compr.c.

void logfs_unpack_index ( pgoff_t  index,
u64 bix,
level_t level 
)

Definition at line 81 of file readwrite.c.

void logfs_write_anchor ( struct super_block sb)

Definition at line 734 of file journal.c.

void logfs_write_block ( struct logfs_block block,
long  flags 
)
int logfs_write_buf ( struct inode inode,
struct page page,
long  flags 
)

Definition at line 1565 of file readwrite.c.

int logfs_write_obj_aliases_pagecache ( struct super_block sb)

Definition at line 529 of file readwrite.c.

int logfs_write_sb ( struct super_block sb)

Definition at line 213 of file super.c.

void move_page_to_btree ( struct page page)

Definition at line 519 of file segment.c.

int wbuf_read ( struct super_block sb,
u64  ofs,
size_t  len,
void buf 
)

Definition at line 399 of file segment.c.

int write_alias_journal ( struct super_block sb,
u64  ino,
u64  bix,
level_t  level,
int  child_no,
__be64  val 
)

Definition at line 685 of file journal.c.

Variable Documentation

struct logfs_block_ops indirect_block_ops

Definition at line 578 of file readwrite.c.

struct file_operations logfs_dir_fops

Definition at line 814 of file dir.c.

struct inode_operations logfs_dir_iops

Definition at line 803 of file dir.c.

Definition at line 277 of file file.c.

struct file_operations logfs_reg_fops

Definition at line 265 of file file.c.

struct inode_operations logfs_reg_iops

Definition at line 261 of file file.c.

struct super_operations logfs_super_operations

Definition at line 397 of file inode.c.

struct inode_operations logfs_symlink_iops

Definition at line 798 of file dir.c.