Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
file-item.c File Reference
#include <linux/bio.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
#include "print-tree.h"

Go to the source code of this file.

Macros

#define __MAX_CSUM_ITEMS(r, size)
 
#define MAX_CSUM_ITEMS(r, size)
 
#define MAX_ORDERED_SUM_BYTES(r)
 

Functions

int btrfs_insert_file_extent (struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, u64 pos, u64 disk_offset, u64 disk_num_bytes, u64 num_bytes, u64 offset, u64 ram_bytes, u8 compression, u8 encryption, u16 other_encoding)
 
struct btrfs_csum_itembtrfs_lookup_csum (struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, int cow)
 
int btrfs_lookup_file_extent (struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 objectid, u64 offset, int mod)
 
int btrfs_lookup_bio_sums (struct btrfs_root *root, struct inode *inode, struct bio *bio, u32 *dst)
 
int btrfs_lookup_bio_sums_dio (struct btrfs_root *root, struct inode *inode, struct bio *bio, u64 offset)
 
int btrfs_lookup_csums_range (struct btrfs_root *root, u64 start, u64 end, struct list_head *list, int search_commit)
 
int btrfs_csum_one_bio (struct btrfs_root *root, struct inode *inode, struct bio *bio, u64 file_start, int contig)
 
int btrfs_del_csums (struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 len)
 
int btrfs_csum_file_blocks (struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_ordered_sum *sums)
 

Macro Definition Documentation

#define __MAX_CSUM_ITEMS (   r,
  size 
)
Value:
((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
sizeof(struct btrfs_item) * 2) / \
size) - 1))

Definition at line 28 of file file-item.c.

#define MAX_CSUM_ITEMS (   r,
  size 
)
Value:

Definition at line 32 of file file-item.c.

#define MAX_ORDERED_SUM_BYTES (   r)
Value:
((PAGE_SIZE - \
sizeof(struct btrfs_ordered_sum)) / \
sizeof(struct btrfs_sector_sum) * \
(r)->sectorsize - (r)->sectorsize)

Definition at line 35 of file file-item.c.

Function Documentation

int btrfs_csum_file_blocks ( struct btrfs_trans_handle trans,
struct btrfs_root root,
struct btrfs_ordered_sum sums 
)

Definition at line 668 of file file-item.c.

int btrfs_csum_one_bio ( struct btrfs_root root,
struct inode inode,
struct bio *  bio,
u64  file_start,
int  contig 
)

Definition at line 407 of file file-item.c.

int btrfs_del_csums ( struct btrfs_trans_handle trans,
struct btrfs_root root,
u64  bytenr,
u64  len 
)

Definition at line 551 of file file-item.c.

int btrfs_insert_file_extent ( struct btrfs_trans_handle trans,
struct btrfs_root root,
u64  objectid,
u64  pos,
u64  disk_offset,
u64  disk_num_bytes,
u64  num_bytes,
u64  offset,
u64  ram_bytes,
u8  compression,
u8  encryption,
u16  other_encoding 
)

Definition at line 40 of file file-item.c.

int btrfs_lookup_bio_sums ( struct btrfs_root root,
struct inode inode,
struct bio *  bio,
u32 dst 
)

Definition at line 269 of file file-item.c.

int btrfs_lookup_bio_sums_dio ( struct btrfs_root root,
struct inode inode,
struct bio *  bio,
u64  offset 
)

Definition at line 275 of file file-item.c.

struct btrfs_csum_item* btrfs_lookup_csum ( struct btrfs_trans_handle trans,
struct btrfs_root root,
struct btrfs_path path,
u64  bytenr,
int  cow 
)
read

Definition at line 86 of file file-item.c.

int btrfs_lookup_csums_range ( struct btrfs_root root,
u64  start,
u64  end,
struct list_head list,
int  search_commit 
)

Definition at line 281 of file file-item.c.

int btrfs_lookup_file_extent ( struct btrfs_trans_handle trans,
struct btrfs_root root,
struct btrfs_path path,
u64  objectid,
u64  offset,
int  mod 
)

Definition at line 137 of file file-item.c.