Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
volumes.h File Reference
#include <linux/bio.h>
#include <linux/sort.h>
#include "async-thread.h"
#include "ioctl.h"

Go to the source code of this file.

Data Structures

struct  btrfs_pending_bios
 
struct  btrfs_device
 
struct  btrfs_fs_devices
 
struct  btrfs_bio_stripe
 
struct  btrfs_bio
 
struct  btrfs_device_info
 
struct  map_lookup
 
struct  btrfs_balance_control
 

Macros

#define BTRFS_STRIPE_LEN   (64 * 1024)
 
#define map_lookup_size(n)
 
#define BTRFS_BALANCE_DATA   (1ULL << 0)
 
#define BTRFS_BALANCE_SYSTEM   (1ULL << 1)
 
#define BTRFS_BALANCE_METADATA   (1ULL << 2)
 
#define BTRFS_BALANCE_TYPE_MASK
 
#define BTRFS_BALANCE_FORCE   (1ULL << 3)
 
#define BTRFS_BALANCE_RESUME   (1ULL << 4)
 
#define BTRFS_BALANCE_ARGS_PROFILES   (1ULL << 0)
 
#define BTRFS_BALANCE_ARGS_USAGE   (1ULL << 1)
 
#define BTRFS_BALANCE_ARGS_DEVID   (1ULL << 2)
 
#define BTRFS_BALANCE_ARGS_DRANGE   (1ULL << 3)
 
#define BTRFS_BALANCE_ARGS_VRANGE   (1ULL << 4)
 
#define BTRFS_BALANCE_ARGS_CONVERT   (1ULL << 8)
 
#define BTRFS_BALANCE_ARGS_SOFT   (1ULL << 9)
 
#define btrfs_bio_size(n)
 

Typedefs

typedef voidbtrfs_bio_end_io_t )(struct btrfs_bio *bio, int err)
 

Functions

int btrfs_account_dev_extents_size (struct btrfs_device *device, u64 start, u64 end, u64 *length)
 
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_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_read_sys_array (struct btrfs_root *root)
 
int btrfs_read_chunk_tree (struct btrfs_root *root)
 
int btrfs_alloc_chunk (struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 type)
 
void btrfs_mapping_init (struct btrfs_mapping_tree *tree)
 
void btrfs_mapping_tree_free (struct btrfs_mapping_tree *tree)
 
int btrfs_map_bio (struct btrfs_root *root, int rw, struct bio *bio, int mirror_num, int async_submit)
 
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_close_devices (struct btrfs_fs_devices *fs_devices)
 
void btrfs_close_extra_devices (struct btrfs_fs_devices *fs_devices)
 
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)
 
void btrfs_cleanup_fs_uuids (void)
 
int btrfs_num_copies (struct btrfs_mapping_tree *map_tree, u64 logical, u64 len)
 
int btrfs_grow_device (struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 new_size)
 
struct btrfs_devicebtrfs_find_device (struct btrfs_root *root, u64 devid, u8 *uuid, u8 *fsid)
 
int btrfs_shrink_device (struct btrfs_device *device, u64 new_size)
 
int btrfs_init_new_device (struct btrfs_root *root, char *path)
 
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_chunk_readonly (struct btrfs_root *root, u64 chunk_offset)
 
int find_free_dev_extent (struct btrfs_device *device, u64 num_bytes, u64 *start, u64 *max_avail)
 
void btrfs_dev_stat_print_on_error (struct btrfs_device *device)
 
void btrfs_dev_stat_inc_and_print (struct btrfs_device *dev, int index)
 
int btrfs_get_dev_stats (struct btrfs_root *root, struct btrfs_ioctl_get_dev_stats *stats)
 
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)
 

Macro Definition Documentation

#define BTRFS_BALANCE_ARGS_CONVERT   (1ULL << 8)

Definition at line 224 of file volumes.h.

#define BTRFS_BALANCE_ARGS_DEVID   (1ULL << 2)

Definition at line 215 of file volumes.h.

#define BTRFS_BALANCE_ARGS_DRANGE   (1ULL << 3)

Definition at line 216 of file volumes.h.

#define BTRFS_BALANCE_ARGS_PROFILES   (1ULL << 0)

Definition at line 213 of file volumes.h.

#define BTRFS_BALANCE_ARGS_SOFT   (1ULL << 9)

Definition at line 225 of file volumes.h.

#define BTRFS_BALANCE_ARGS_USAGE   (1ULL << 1)

Definition at line 214 of file volumes.h.

#define BTRFS_BALANCE_ARGS_VRANGE   (1ULL << 4)

Definition at line 217 of file volumes.h.

#define BTRFS_BALANCE_DATA   (1ULL << 0)

Definition at line 199 of file volumes.h.

#define BTRFS_BALANCE_FORCE   (1ULL << 3)

Definition at line 207 of file volumes.h.

#define BTRFS_BALANCE_METADATA   (1ULL << 2)

Definition at line 201 of file volumes.h.

#define BTRFS_BALANCE_RESUME   (1ULL << 4)

Definition at line 208 of file volumes.h.

#define BTRFS_BALANCE_SYSTEM   (1ULL << 1)

Definition at line 200 of file volumes.h.

#define BTRFS_BALANCE_TYPE_MASK
Value:
BTRFS_BALANCE_SYSTEM | \
BTRFS_BALANCE_METADATA)

Definition at line 203 of file volumes.h.

#define btrfs_bio_size (   n)
Value:
(sizeof(struct btrfs_bio) + \

Definition at line 244 of file volumes.h.

#define BTRFS_STRIPE_LEN   (64 * 1024)

Definition at line 27 of file volumes.h.

#define map_lookup_size (   n)
Value:
(sizeof(struct map_lookup) + \

Definition at line 193 of file volumes.h.

Typedef Documentation

typedef void( btrfs_bio_end_io_t)(struct btrfs_bio *bio, int err)

Definition at line 161 of file volumes.h.

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 device)

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 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 max_avail 
)

Definition at line 888 of file volumes.c.