Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | write_control |
Macros | |
#define | ARCH_SHIFT (BITS_PER_LONG - 32) |
#define | INDIRECT_BIT (0x80000000UL << ARCH_SHIFT) |
#define | LEVEL_SHIFT (28 + ARCH_SHIFT) |
#define | TRUNCATE_STEP (8 * 1024 * 1024) |
Variables | |
struct logfs_block_ops | indirect_block_ops |
#define ARCH_SHIFT (BITS_PER_LONG - 32) |
The inode address space is cut in two halves. Lower half belongs to data pages, upper half to indirect blocks. If the high bit (INDIRECT_BIT) is set, the actual block index (bix) and level can be derived from the page index.
The lowest three bits of the block index are set to 0 after packing and unpacking. Since the lowest n bits (9 for 4KiB blocksize) are ignored anyway this is harmless.
Definition at line 59 of file readwrite.c.
#define INDIRECT_BIT (0x80000000UL << ARCH_SHIFT) |
Definition at line 60 of file readwrite.c.
#define LEVEL_SHIFT (28 + ARCH_SHIFT) |
Definition at line 61 of file readwrite.c.
#define TRUNCATE_STEP (8 * 1024 * 1024) |
Definition at line 1867 of file readwrite.c.
|
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.
Definition at line 2126 of file readwrite.c.
void btree_write_block | ( | struct logfs_block * | block | ) |
Definition at line 2197 of file readwrite.c.
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.
void logfs_cleanup_rw | ( | struct super_block * | sb | ) |
Definition at line 2287 of file readwrite.c.
void logfs_del_transaction | ( | struct inode * | inode, |
struct logfs_transaction * | ta | ||
) |
Definition at line 1501 of file readwrite.c.
Definition at line 1591 of file readwrite.c.
Definition at line 2162 of file readwrite.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.
Definition at line 247 of file readwrite.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.
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_open_segfile | ( | struct super_block * | sb | ) |
Definition at line 2260 of file readwrite.c.
Definition at line 67 of file readwrite.c.
Definition at line 262 of file readwrite.c.
Definition at line 1945 of file readwrite.c.
Definition at line 1063 of file readwrite.c.
Definition at line 1611 of file readwrite.c.
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.
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.
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.
Definition at line 1868 of file readwrite.c.
Definition at line 81 of file readwrite.c.
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.
struct logfs_block_ops indirect_block_ops |
Definition at line 578 of file readwrite.c.