Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
volumes.c File Reference
#include <linux/sched.h>
#include <linux/bio.h>
#include <linux/slab.h>
#include <linux/buffer_head.h>
#include <linux/blkdev.h>
#include <linux/random.h>
#include <linux/iocontext.h>
#include <linux/capability.h>
#include <linux/ratelimit.h>
#include <linux/kthread.h>
#include <asm/div64.h>
#include "compat.h"
#include "ctree.h"
#include "extent_map.h"
#include "disk-io.h"
#include "transaction.h"
#include "print-tree.h"
#include "volumes.h"
#include "async-thread.h"
#include "check-integrity.h"
#include "rcu-string.h"

Go to the source code of this file.

Data Structures

struct  async_sched
 

Functions

void btrfs_cleanup_fs_uuids (void)
 
void btrfs_close_extra_devices (struct btrfs_fs_devices *fs_devices)
 
int btrfs_close_devices (struct btrfs_fs_devices *fs_devices)
 
int btrfs_open_devices (struct btrfs_fs_devices *fs_devices, fmode_t flags, void *holder)
 
int btrfs_scan_one_device (const char *path, fmode_t flags, void *holder, struct btrfs_fs_devices **fs_devices_ret)
 
int btrfs_account_dev_extents_size (struct btrfs_device *device, u64 start, u64 end, u64 *length)
 
int find_free_dev_extent (struct btrfs_device *device, u64 num_bytes, u64 *start, u64 *len)
 
int btrfs_alloc_dev_extent (struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 start, u64 num_bytes)
 
int btrfs_add_device (struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_device *device)
 
int btrfs_rm_device (struct btrfs_root *root, char *device_path)
 
int btrfs_init_new_device (struct btrfs_root *root, char *device_path)
 
int btrfs_grow_device (struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 new_size)
 
void update_ioctl_balance_args (struct btrfs_fs_info *fs_info, int lock, struct btrfs_ioctl_balance_args *bargs)
 
int btrfs_balance (struct btrfs_balance_control *bctl, struct btrfs_ioctl_balance_args *bargs)
 
int btrfs_resume_balance_async (struct btrfs_fs_info *fs_info)
 
int btrfs_recover_balance (struct btrfs_fs_info *fs_info)
 
int btrfs_pause_balance (struct btrfs_fs_info *fs_info)
 
int btrfs_cancel_balance (struct btrfs_fs_info *fs_info)
 
int btrfs_shrink_device (struct btrfs_device *device, u64 new_size)
 
int btrfs_alloc_chunk (struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 type)
 
int btrfs_chunk_readonly (struct btrfs_root *root, u64 chunk_offset)
 
void btrfs_mapping_init (struct btrfs_mapping_tree *tree)
 
void btrfs_mapping_tree_free (struct btrfs_mapping_tree *tree)
 
int btrfs_num_copies (struct btrfs_mapping_tree *map_tree, u64 logical, u64 len)
 
int btrfs_map_block (struct btrfs_mapping_tree *map_tree, int rw, u64 logical, u64 *length, struct btrfs_bio **bbio_ret, int mirror_num)
 
int btrfs_rmap_block (struct btrfs_mapping_tree *map_tree, u64 chunk_start, u64 physical, u64 devid, u64 **logical, int *naddrs, int *stripe_len)
 
int btrfs_map_bio (struct btrfs_root *root, int rw, struct bio *bio, int mirror_num, int async_submit)
 
struct btrfs_devicebtrfs_find_device (struct btrfs_root *root, u64 devid, u8 *uuid, u8 *fsid)
 
int btrfs_read_sys_array (struct btrfs_root *root)
 
int btrfs_read_chunk_tree (struct btrfs_root *root)
 
int btrfs_init_dev_stats (struct btrfs_fs_info *fs_info)
 
int btrfs_run_dev_stats (struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info)
 
void btrfs_dev_stat_inc_and_print (struct btrfs_device *dev, int index)
 
void btrfs_dev_stat_print_on_error (struct btrfs_device *dev)
 
int btrfs_get_dev_stats (struct btrfs_root *root, struct btrfs_ioctl_get_dev_stats *stats)
 

Function Documentation

int btrfs_account_dev_extents_size ( struct btrfs_device device,
u64  start,
u64  end,
u64 length 
)

Definition at line 785 of file volumes.c.

int btrfs_add_device ( struct btrfs_trans_handle trans,
struct btrfs_root root,
struct btrfs_device device 
)

Definition at line 1215 of file volumes.c.

int btrfs_alloc_chunk ( struct btrfs_trans_handle trans,
struct btrfs_root extent_root,
u64  type 
)

Definition at line 3586 of file volumes.c.

int btrfs_alloc_dev_extent ( struct btrfs_trans_handle trans,
struct btrfs_device device,
u64  chunk_tree,
u64  chunk_objectid,
u64  chunk_offset,
u64  start,
u64  num_bytes 
)

Definition at line 1086 of file volumes.c.

int btrfs_balance ( struct btrfs_balance_control bctl,
struct btrfs_ioctl_balance_args bargs 
)

Definition at line 2724 of file volumes.c.

int btrfs_cancel_balance ( struct btrfs_fs_info fs_info)

Definition at line 3021 of file volumes.c.

int btrfs_chunk_readonly ( struct btrfs_root root,
u64  chunk_offset 
)

Definition at line 3688 of file volumes.c.

void btrfs_cleanup_fs_uuids ( void  )

Definition at line 74 of file volumes.c.

int btrfs_close_devices ( struct btrfs_fs_devices fs_devices)

Definition at line 594 of file volumes.c.

void btrfs_close_extra_devices ( struct btrfs_fs_devices fs_devices)

Definition at line 470 of file volumes.c.

void btrfs_dev_stat_inc_and_print ( struct btrfs_device dev,
int  index 
)

Definition at line 4884 of file volumes.c.

void btrfs_dev_stat_print_on_error ( struct btrfs_device dev)

Definition at line 4890 of file volumes.c.

struct btrfs_device* btrfs_find_device ( struct btrfs_root root,
u64  devid,
u8 uuid,
u8 fsid 
)
read

Definition at line 4318 of file volumes.c.

int btrfs_get_dev_stats ( struct btrfs_root root,
struct btrfs_ioctl_get_dev_stats stats 
)

Definition at line 4925 of file volumes.c.

int btrfs_grow_device ( struct btrfs_trans_handle trans,
struct btrfs_device device,
u64  new_size 
)

Definition at line 1916 of file volumes.c.

int btrfs_init_dev_stats ( struct btrfs_fs_info fs_info)

Definition at line 4738 of file volumes.c.

int btrfs_init_new_device ( struct btrfs_root root,
char device_path 
)

Definition at line 1651 of file volumes.c.

int btrfs_map_bio ( struct btrfs_root root,
int  rw,
struct bio *  bio,
int  mirror_num,
int  async_submit 
)

Definition at line 4241 of file volumes.c.

int btrfs_map_block ( struct btrfs_mapping_tree map_tree,
int  rw,
u64  logical,
u64 length,
struct btrfs_bio **  bbio_ret,
int  mirror_num 
)

Definition at line 4018 of file volumes.c.

void btrfs_mapping_init ( struct btrfs_mapping_tree tree)

Definition at line 3718 of file volumes.c.

void btrfs_mapping_tree_free ( struct btrfs_mapping_tree tree)

Definition at line 3723 of file volumes.c.

int btrfs_num_copies ( struct btrfs_mapping_tree map_tree,
u64  logical,
u64  len 
)

Definition at line 3743 of file volumes.c.

int btrfs_open_devices ( struct btrfs_fs_devices fs_devices,
fmode_t  flags,
void holder 
)

Definition at line 719 of file volumes.c.

int btrfs_pause_balance ( struct btrfs_fs_info fs_info)

Definition at line 2992 of file volumes.c.

int btrfs_read_chunk_tree ( struct btrfs_root root)

Definition at line 4655 of file volumes.c.

int btrfs_read_sys_array ( struct btrfs_root root)

Definition at line 4585 of file volumes.c.

int btrfs_recover_balance ( struct btrfs_fs_info fs_info)

Definition at line 2934 of file volumes.c.

int btrfs_resume_balance_async ( struct btrfs_fs_info fs_info)

Definition at line 2911 of file volumes.c.

int btrfs_rm_device ( struct btrfs_root root,
char device_path 
)

Definition at line 1312 of file volumes.c.

int btrfs_rmap_block ( struct btrfs_mapping_tree map_tree,
u64  chunk_start,
u64  physical,
u64  devid,
u64 **  logical,
int naddrs,
int stripe_len 
)

Definition at line 4026 of file volumes.c.

int btrfs_run_dev_stats ( struct btrfs_trans_handle trans,
struct btrfs_fs_info fs_info 
)

Definition at line 4862 of file volumes.c.

int btrfs_scan_one_device ( const char path,
fmode_t  flags,
void holder,
struct btrfs_fs_devices **  fs_devices_ret 
)

Definition at line 735 of file volumes.c.

int btrfs_shrink_device ( struct btrfs_device device,
u64  new_size 
)

Definition at line 3062 of file volumes.c.

int find_free_dev_extent ( struct btrfs_device device,
u64  num_bytes,
u64 start,
u64 len 
)

Definition at line 888 of file volumes.c.

void update_ioctl_balance_args ( struct btrfs_fs_info fs_info,
int  lock,
struct btrfs_ioctl_balance_args bargs 
)

Definition at line 3284 of file ioctl.c.