Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mballoc.c File Reference
#include "ext4_jbd2.h"
#include "mballoc.h"
#include <linux/debugfs.h>
#include <linux/log2.h>
#include <linux/slab.h>
#include <trace/events/ext4.h>

Go to the source code of this file.

Macros

#define NR_GRPINFO_CACHES   8
 
#define mb_check_buddy(e4b)
 
#define NRL_CHECK_SIZE(req, size, max, chunk_size)   (req <= (size) || max <= (chunk_size))
 

Functions

void ext4_set_bits (void *bm, int cur, int len)
 
int ext4_mb_alloc_groupinfo (struct super_block *sb, ext4_group_t ngroups)
 
int ext4_mb_add_groupinfo (struct super_block *sb, ext4_group_t group, struct ext4_group_desc *desc)
 
int ext4_mb_init (struct super_block *sb)
 
int ext4_mb_release (struct super_block *sb)
 
int __init ext4_init_mballoc (void)
 
void ext4_exit_mballoc (void)
 
void ext4_discard_preallocations (struct inode *inode)
 
ext4_fsblk_t ext4_mb_new_blocks (handle_t *handle, struct ext4_allocation_request *ar, int *errp)
 
void ext4_free_blocks (handle_t *handle, struct inode *inode, struct buffer_head *bh, ext4_fsblk_t block, unsigned long count, int flags)
 
int ext4_group_add_blocks (handle_t *handle, struct super_block *sb, ext4_fsblk_t block, unsigned long count)
 
int ext4_trim_fs (struct super_block *sb, struct fstrim_range *range)
 

Macro Definition Documentation

#define mb_check_buddy (   e4b)

Definition at line 641 of file mballoc.c.

#define NR_GRPINFO_CACHES   8

Definition at line 349 of file mballoc.c.

#define NRL_CHECK_SIZE (   req,
  size,
  max,
  chunk_size 
)    (req <= (size) || max <= (chunk_size))

Function Documentation

void ext4_discard_preallocations ( struct inode inode)

Definition at line 3759 of file mballoc.c.

void ext4_exit_mballoc ( void  )

Definition at line 2710 of file mballoc.c.

void ext4_free_blocks ( handle_t *  handle,
struct inode inode,
struct buffer_head *  bh,
ext4_fsblk_t  block,
unsigned long  count,
int  flags 
)

ext4_free_blocks() – Free given blocks and update quota : handle for this transaction : inode : start physical block to free : number of blocks to count : flags used by ext4_free_blocks

Definition at line 4474 of file mballoc.c.

int ext4_group_add_blocks ( handle_t *  handle,
struct super_block sb,
ext4_fsblk_t  block,
unsigned long  count 
)

ext4_group_add_blocks() – Add given blocks to an existing group : handle to this transaction : super block : start physical block to add to the block group : number of blocks to free

This marks the blocks as free in the bitmap and buddy.

Definition at line 4717 of file mballoc.c.

int __init ext4_init_mballoc ( void  )

Definition at line 2685 of file mballoc.c.

int ext4_mb_add_groupinfo ( struct super_block sb,
ext4_group_t  group,
struct ext4_group_desc desc 
)

Definition at line 2204 of file mballoc.c.

int ext4_mb_alloc_groupinfo ( struct super_block sb,
ext4_group_t  ngroups 
)

Definition at line 2174 of file mballoc.c.

int ext4_mb_init ( struct super_block sb)

Definition at line 2385 of file mballoc.c.

ext4_fsblk_t ext4_mb_new_blocks ( handle_t *  handle,
struct ext4_allocation_request ar,
int errp 
)

Definition at line 4230 of file mballoc.c.

int ext4_mb_release ( struct super_block sb)

Definition at line 2518 of file mballoc.c.

void ext4_set_bits ( void bm,
int  cur,
int  len 
)

Definition at line 1240 of file mballoc.c.

int ext4_trim_fs ( struct super_block sb,
struct fstrim_range range 
)

ext4_trim_fs() – trim ioctl handle function : superblock for filesystem : fstrim_range structure

start: First Byte to trim len: number of Bytes to trim from start minlen: minimum extent length in Bytes ext4_trim_fs goes through all allocation groups containing Bytes from start to start+len. For each such a group ext4_trim_all_free function is invoked to trim all free space.

Definition at line 4977 of file mballoc.c.