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

Go to the source code of this file.

Macros

#define PREALLOCATION_SIZE   9
 
#define SB_ALLOC_OPTS(s)   (REISERFS_SB(s)->s_alloc_options.bits)
 
#define _ALLOC_concentrating_formatted_nodes   0
 
#define _ALLOC_displacing_large_files   1
 
#define _ALLOC_displacing_new_packing_localities   2
 
#define _ALLOC_old_hashed_relocation   3
 
#define _ALLOC_new_hashed_relocation   4
 
#define _ALLOC_skip_busy   5
 
#define _ALLOC_displace_based_on_dirid   6
 
#define _ALLOC_hashed_formatted_nodes   7
 
#define _ALLOC_old_way   8
 
#define _ALLOC_hundredth_slices   9
 
#define _ALLOC_dirid_groups   10
 
#define _ALLOC_oid_groups   11
 
#define _ALLOC_packing_groups   12
 
#define concentrating_formatted_nodes(s)   test_bit(_ALLOC_concentrating_formatted_nodes, &SB_ALLOC_OPTS(s))
 
#define displacing_large_files(s)   test_bit(_ALLOC_displacing_large_files, &SB_ALLOC_OPTS(s))
 
#define displacing_new_packing_localities(s)   test_bit(_ALLOC_displacing_new_packing_localities, &SB_ALLOC_OPTS(s))
 
#define SET_OPTION(optname)
 
#define TEST_OPTION(optname, s)   test_bit(_ALLOC_ ## optname , &SB_ALLOC_OPTS(s))
 

Functions

int is_reusable (struct super_block *s, b_blocknr_t block, int bit_value)
 
__le32 reiserfs_choose_packing (struct inode *dir)
 
void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *inode, b_blocknr_t block, int for_unformatted)
 
void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th, struct inode *inode)
 
void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th)
 
void reiserfs_init_alloc_options (struct super_block *s)
 
int reiserfs_parse_alloc_options (struct super_block *s, char *options)
 
void show_alloc_options (struct seq_file *seq, struct super_block *s)
 
int reiserfs_allocate_blocknrs (reiserfs_blocknr_hint_t *hint, b_blocknr_t *new_blocknrs, int amount_needed, int reserved_by_us)
 
void reiserfs_cache_bitmap_metadata (struct super_block *sb, struct buffer_head *bh, struct reiserfs_bitmap_info *info)
 
struct buffer_head * reiserfs_read_bitmap_block (struct super_block *sb, unsigned int bitmap)
 
int reiserfs_init_bitmap_cache (struct super_block *sb)
 
void reiserfs_free_bitmap_cache (struct super_block *sb)
 

Macro Definition Documentation

#define _ALLOC_concentrating_formatted_nodes   0

Definition at line 22 of file bitmap.c.

#define _ALLOC_dirid_groups   10

Definition at line 32 of file bitmap.c.

#define _ALLOC_displace_based_on_dirid   6

Definition at line 28 of file bitmap.c.

#define _ALLOC_displacing_large_files   1

Definition at line 23 of file bitmap.c.

#define _ALLOC_displacing_new_packing_localities   2

Definition at line 24 of file bitmap.c.

#define _ALLOC_hashed_formatted_nodes   7

Definition at line 29 of file bitmap.c.

#define _ALLOC_hundredth_slices   9

Definition at line 31 of file bitmap.c.

#define _ALLOC_new_hashed_relocation   4

Definition at line 26 of file bitmap.c.

#define _ALLOC_oid_groups   11

Definition at line 33 of file bitmap.c.

#define _ALLOC_old_hashed_relocation   3

Definition at line 25 of file bitmap.c.

#define _ALLOC_old_way   8

Definition at line 30 of file bitmap.c.

#define _ALLOC_packing_groups   12

Definition at line 34 of file bitmap.c.

#define _ALLOC_skip_busy   5

Definition at line 27 of file bitmap.c.

#define concentrating_formatted_nodes (   s)    test_bit(_ALLOC_concentrating_formatted_nodes, &SB_ALLOC_OPTS(s))

Definition at line 36 of file bitmap.c.

#define displacing_large_files (   s)    test_bit(_ALLOC_displacing_large_files, &SB_ALLOC_OPTS(s))

Definition at line 37 of file bitmap.c.

#define displacing_new_packing_localities (   s)    test_bit(_ALLOC_displacing_new_packing_localities, &SB_ALLOC_OPTS(s))

Definition at line 38 of file bitmap.c.

#define PREALLOCATION_SIZE   9

Definition at line 16 of file bitmap.c.

#define SB_ALLOC_OPTS (   s)    (REISERFS_SB(s)->s_alloc_options.bits)

Definition at line 20 of file bitmap.c.

#define SET_OPTION (   optname)
Value:
do { \
reiserfs_info(s, "block allocator option \"%s\" is set", #optname); \
set_bit(_ALLOC_ ## optname , &SB_ALLOC_OPTS(s)); \
} while(0)

Definition at line 40 of file bitmap.c.

#define TEST_OPTION (   optname,
  s 
)    test_bit(_ALLOC_ ## optname , &SB_ALLOC_OPTS(s))

Definition at line 45 of file bitmap.c.

Function Documentation

int is_reusable ( struct super_block s,
b_blocknr_t  block,
int  bit_value 
)

Definition at line 60 of file bitmap.c.

int reiserfs_allocate_blocknrs ( reiserfs_blocknr_hint_t hint,
b_blocknr_t new_blocknrs,
int  amount_needed,
int  reserved_by_us 
)

Definition at line 1252 of file bitmap.c.

void reiserfs_cache_bitmap_metadata ( struct super_block sb,
struct buffer_head *  bh,
struct reiserfs_bitmap_info info 
)

Definition at line 1300 of file bitmap.c.

__le32 reiserfs_choose_packing ( struct inode dir)

Definition at line 290 of file bitmap.c.

void reiserfs_discard_all_prealloc ( struct reiserfs_transaction_handle th)

Definition at line 499 of file bitmap.c.

void reiserfs_discard_prealloc ( struct reiserfs_transaction_handle th,
struct inode inode 
)

Definition at line 490 of file bitmap.c.

void reiserfs_free_bitmap_cache ( struct super_block sb)

Definition at line 1374 of file bitmap.c.

void reiserfs_free_block ( struct reiserfs_transaction_handle th,
struct inode inode,
b_blocknr_t  block,
int  for_unformatted 
)

Definition at line 430 of file bitmap.c.

void reiserfs_init_alloc_options ( struct super_block s)

Definition at line 520 of file bitmap.c.

int reiserfs_init_bitmap_cache ( struct super_block sb)

Definition at line 1358 of file bitmap.c.

int reiserfs_parse_alloc_options ( struct super_block s,
char options 
)

Definition at line 528 of file bitmap.c.

struct buffer_head* reiserfs_read_bitmap_block ( struct super_block sb,
unsigned int  bitmap 
)
read

Definition at line 1322 of file bitmap.c.

void show_alloc_options ( struct seq_file seq,
struct super_block s 
)

Definition at line 644 of file bitmap.c.