Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
stree.c File Reference
#include <linux/time.h>
#include <linux/string.h>
#include <linux/pagemap.h>
#include "reiserfs.h"
#include <linux/buffer_head.h>
#include <linux/quotaops.h>

Go to the source code of this file.

Macros

#define SEARCH_BY_KEY_READA   16
 
#define held_by_others(bh)   (atomic_read(&(bh)->b_count) > 1)
 
#define block_in_use(bh)   (buffer_locked(bh) || (held_by_others(bh)))
 
#define JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD   (2 * JOURNAL_PER_BALANCE_CNT + 1)
 

Functions

int B_IS_IN_TREE (const struct buffer_head *bh)
 
void copy_item_head (struct item_head *to, const struct item_head *from)
 
int comp_short_keys (const struct reiserfs_key *le_key, const struct cpu_key *cpu_key)
 
int comp_short_le_keys (const struct reiserfs_key *key1, const struct reiserfs_key *key2)
 
void le_key2cpu_key (struct cpu_key *to, const struct reiserfs_key *from)
 
int comp_le_keys (const struct reiserfs_key *k1, const struct reiserfs_key *k2)
 
struct reiserfs_keyget_rkey (const struct treepath *chk_path, const struct super_block *sb)
 
int reiserfs_check_path (struct treepath *p)
 
void pathrelse_and_restore (struct super_block *sb, struct treepath *search_path)
 
void pathrelse (struct treepath *search_path)
 
int search_by_key (struct super_block *sb, const struct cpu_key *key, struct treepath *search_path, int stop_level)
 
int search_for_position_by_key (struct super_block *sb, const struct cpu_key *p_cpu_key, struct treepath *search_path)
 
int comp_items (const struct item_head *stored_ih, const struct treepath *path)
 
void padd_item (char *item, int total_length, int length)
 
int reiserfs_delete_item (struct reiserfs_transaction_handle *th, struct treepath *path, const struct cpu_key *item_key, struct inode *inode, struct buffer_head *un_bh)
 
void reiserfs_delete_solid_item (struct reiserfs_transaction_handle *th, struct inode *inode, struct reiserfs_key *key)
 
int reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode *inode)
 
int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, struct treepath *path, struct cpu_key *item_key, struct inode *inode, struct page *page, loff_t new_file_size)
 
int reiserfs_do_truncate (struct reiserfs_transaction_handle *th, struct inode *inode, struct page *page, int update_timestamps)
 
int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, struct treepath *search_path, const struct cpu_key *key, struct inode *inode, const char *body, int pasted_size)
 
int reiserfs_insert_item (struct reiserfs_transaction_handle *th, struct treepath *path, const struct cpu_key *key, struct item_head *ih, struct inode *inode, const char *body)
 

Variables

struct reiserfs_key MIN_KEY = { 0, 0, {{0, 0},} }
 

Macro Definition Documentation

#define block_in_use (   bh)    (buffer_locked(bh) || (held_by_others(bh)))

Definition at line 907 of file stree.c.

#define held_by_others (   bh)    (atomic_read(&(bh)->b_count) > 1)

Definition at line 904 of file stree.c.

#define JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD   (2 * JOURNAL_PER_BALANCE_CNT + 1)

Definition at line 979 of file stree.c.

#define SEARCH_BY_KEY_READA   16

Definition at line 517 of file stree.c.

Function Documentation

int B_IS_IN_TREE ( const struct buffer_head *  bh)
inline

Definition at line 59 of file stree.c.

int comp_items ( const struct item_head stored_ih,
const struct treepath path 
)

Definition at line 883 of file stree.c.

int comp_le_keys ( const struct reiserfs_key k1,
const struct reiserfs_key k2 
)
inline

Definition at line 167 of file stree.c.

int comp_short_keys ( const struct reiserfs_key le_key,
const struct cpu_key cpu_key 
)
inline

Definition at line 83 of file stree.c.

int comp_short_le_keys ( const struct reiserfs_key key1,
const struct reiserfs_key key2 
)
inline

Definition at line 135 of file stree.c.

void copy_item_head ( struct item_head to,
const struct item_head from 
)
inline

Definition at line 71 of file stree.c.

struct reiserfs_key* get_rkey ( const struct treepath chk_path,
const struct super_block sb 
)
read

Definition at line 285 of file stree.c.

void le_key2cpu_key ( struct cpu_key to,
const struct reiserfs_key from 
)
inline

Definition at line 152 of file stree.c.

void padd_item ( char item,
int  total_length,
int  length 
)

Definition at line 1140 of file stree.c.

void pathrelse ( struct treepath search_path)

Definition at line 383 of file stree.c.

void pathrelse_and_restore ( struct super_block sb,
struct treepath search_path 
)

Definition at line 365 of file stree.c.

int reiserfs_check_path ( struct treepath p)

Definition at line 355 of file stree.c.

int reiserfs_cut_from_item ( struct reiserfs_transaction_handle th,
struct treepath path,
struct cpu_key item_key,
struct inode inode,
struct page page,
loff_t  new_file_size 
)

Definition at line 1544 of file stree.c.

int reiserfs_delete_item ( struct reiserfs_transaction_handle th,
struct treepath path,
const struct cpu_key item_key,
struct inode inode,
struct buffer_head *  un_bh 
)

Definition at line 1183 of file stree.c.

int reiserfs_delete_object ( struct reiserfs_transaction_handle th,
struct inode inode 
)

Definition at line 1402 of file stree.c.

void reiserfs_delete_solid_item ( struct reiserfs_transaction_handle th,
struct inode inode,
struct reiserfs_key key 
)

Definition at line 1325 of file stree.c.

int reiserfs_do_truncate ( struct reiserfs_transaction_handle th,
struct inode inode,
struct page page,
int  update_timestamps 
)

Definition at line 1757 of file stree.c.

int reiserfs_insert_item ( struct reiserfs_transaction_handle th,
struct treepath path,
const struct cpu_key key,
struct item_head ih,
struct inode inode,
const char body 
)

Definition at line 2040 of file stree.c.

int reiserfs_paste_into_item ( struct reiserfs_transaction_handle th,
struct treepath search_path,
const struct cpu_key key,
struct inode inode,
const char body,
int  pasted_size 
)

Definition at line 1950 of file stree.c.

int search_by_key ( struct super_block sb,
const struct cpu_key key,
struct treepath search_path,
int  stop_level 
)

Definition at line 586 of file stree.c.

int search_for_position_by_key ( struct super_block sb,
const struct cpu_key p_cpu_key,
struct treepath search_path 
)

Definition at line 810 of file stree.c.

Variable Documentation

struct reiserfs_key MIN_KEY = { 0, 0, {{0, 0},} }

Definition at line 227 of file stree.c.