Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
xfs_buf.c File Reference
#include "xfs.h"
#include <linux/stddef.h>
#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/pagemap.h>
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/bio.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <linux/percpu.h>
#include <linux/blkdev.h>
#include <linux/hash.h>
#include <linux/kthread.h>
#include <linux/migrate.h>
#include <linux/backing-dev.h>
#include <linux/freezer.h>
#include "xfs_sb.h"
#include "xfs_log.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_trace.h"

Go to the source code of this file.

Macros

#define XB_SET_OWNER(bp)   do { } while (0)
 
#define XB_CLEAR_OWNER(bp)   do { } while (0)
 
#define XB_GET_OWNER(bp)   do { } while (0)
 
#define xb_to_gfp(flags)   ((((flags) & XBF_READ_AHEAD) ? __GFP_NORETRY : GFP_NOFS) | __GFP_NOWARN)
 

Functions

STATIC void xfs_buf_lru_add (struct xfs_buf *bp)
 
STATIC void xfs_buf_lru_del (struct xfs_buf *bp)
 
void xfs_buf_stale (struct xfs_buf *bp)
 
struct xfs_buf_xfs_buf_alloc (struct xfs_buftarg *target, struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags)
 
STATIC int _xfs_buf_get_pages (xfs_buf_t *bp, int page_count, xfs_buf_flags_t flags)
 
STATIC void _xfs_buf_free_pages (xfs_buf_t *bp)
 
void xfs_buf_free (xfs_buf_t *bp)
 
STATIC int xfs_buf_allocate_memory (xfs_buf_t *bp, uint flags)
 
STATIC int _xfs_buf_map_pages (xfs_buf_t *bp, uint flags)
 
xfs_buf_t_xfs_buf_find (struct xfs_buftarg *btp, struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags, xfs_buf_t *new_bp)
 
struct xfs_bufxfs_buf_get_map (struct xfs_buftarg *target, struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags)
 
STATIC int _xfs_buf_read (xfs_buf_t *bp, xfs_buf_flags_t flags)
 
xfs_buf_txfs_buf_read_map (struct xfs_buftarg *target, struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags)
 
void xfs_buf_readahead_map (struct xfs_buftarg *target, struct xfs_buf_map *map, int nmaps)
 
struct xfs_bufxfs_buf_read_uncached (struct xfs_buftarg *target, xfs_daddr_t daddr, size_t numblks, int flags)
 
void xfs_buf_set_empty (struct xfs_buf *bp, size_t numblks)
 
int xfs_buf_associate_memory (xfs_buf_t *bp, void *mem, size_t len)
 
xfs_buf_txfs_buf_get_uncached (struct xfs_buftarg *target, size_t numblks, int flags)
 
void xfs_buf_hold (xfs_buf_t *bp)
 
void xfs_buf_rele (xfs_buf_t *bp)
 
int xfs_buf_trylock (struct xfs_buf *bp)
 
void xfs_buf_lock (struct xfs_buf *bp)
 
void xfs_buf_unlock (struct xfs_buf *bp)
 
STATIC void xfs_buf_wait_unpin (xfs_buf_t *bp)
 
STATIC void xfs_buf_iodone_work (struct work_struct *work)
 
void xfs_buf_ioend (xfs_buf_t *bp, int schedule)
 
void xfs_buf_ioerror (xfs_buf_t *bp, int error)
 
void xfs_buf_ioerror_alert (struct xfs_buf *bp, const char *func)
 
STATIC int xfs_bioerror (xfs_buf_t *bp)
 
STATIC int xfs_bioerror_relse (struct xfs_buf *bp)
 
STATIC int xfs_bdstrat_cb (struct xfs_buf *bp)
 
int xfs_bwrite (struct xfs_buf *bp)
 
void xfsbdstrat (struct xfs_mount *mp, struct xfs_buf *bp)
 
STATIC void _xfs_buf_ioend (xfs_buf_t *bp, int schedule)
 
STATIC void xfs_buf_bio_end_io (struct bio *bio, int error)
 
STATIC void _xfs_buf_ioapply (struct xfs_buf *bp)
 
void xfs_buf_iorequest (xfs_buf_t *bp)
 
int xfs_buf_iowait (xfs_buf_t *bp)
 
xfs_caddr_t xfs_buf_offset (xfs_buf_t *bp, size_t offset)
 
void xfs_buf_iomove (xfs_buf_t *bp, size_t boff, size_t bsize, void *data, xfs_buf_rw_t mode)
 
void xfs_wait_buftarg (struct xfs_buftarg *btp)
 
int xfs_buftarg_shrink (struct shrinker *shrink, struct shrink_control *sc)
 
void xfs_free_buftarg (struct xfs_mount *mp, struct xfs_buftarg *btp)
 
STATIC int xfs_setsize_buftarg_flags (xfs_buftarg_t *btp, unsigned int blocksize, unsigned int sectorsize, int verbose)
 
STATIC int xfs_setsize_buftarg_early (xfs_buftarg_t *btp, struct block_device *bdev)
 
int xfs_setsize_buftarg (xfs_buftarg_t *btp, unsigned int blocksize, unsigned int sectorsize)
 
xfs_buftarg_txfs_alloc_buftarg (struct xfs_mount *mp, struct block_device *bdev, int external, const char *fsname)
 
bool xfs_buf_delwri_queue (struct xfs_buf *bp, struct list_head *list)
 
int xfs_buf_delwri_submit_nowait (struct list_head *buffer_list)
 
int xfs_buf_delwri_submit (struct list_head *buffer_list)
 
int __init xfs_buf_init (void)
 
void xfs_buf_terminate (void)
 

Macro Definition Documentation

#define XB_CLEAR_OWNER (   bp)    do { } while (0)

Definition at line 53 of file xfs_buf.c.

#define XB_GET_OWNER (   bp)    do { } while (0)

Definition at line 54 of file xfs_buf.c.

#define XB_SET_OWNER (   bp)    do { } while (0)

Definition at line 52 of file xfs_buf.c.

#define xb_to_gfp (   flags)    ((((flags) & XBF_READ_AHEAD) ? __GFP_NORETRY : GFP_NOFS) | __GFP_NOWARN)

Definition at line 57 of file xfs_buf.c.

Function Documentation

struct xfs_buf* _xfs_buf_alloc ( struct xfs_buftarg target,
struct xfs_buf_map map,
int  nmaps,
xfs_buf_flags_t  flags 
)
read

Definition at line 203 of file xfs_buf.c.

xfs_buf_t* _xfs_buf_find ( struct xfs_buftarg btp,
struct xfs_buf_map map,
int  nmaps,
xfs_buf_flags_t  flags,
xfs_buf_t new_bp 
)
read

Definition at line 477 of file xfs_buf.c.

STATIC void _xfs_buf_free_pages ( xfs_buf_t bp)

Definition at line 293 of file xfs_buf.c.

STATIC int _xfs_buf_get_pages ( xfs_buf_t bp,
int  page_count,
xfs_buf_flags_t  flags 
)

Definition at line 268 of file xfs_buf.c.

STATIC void _xfs_buf_ioapply ( struct xfs_buf bp)

Definition at line 1299 of file xfs_buf.c.

STATIC void _xfs_buf_ioend ( xfs_buf_t bp,
int  schedule 
)

Definition at line 1185 of file xfs_buf.c.

STATIC int _xfs_buf_map_pages ( xfs_buf_t bp,
uint  flags 
)

Definition at line 438 of file xfs_buf.c.

STATIC int _xfs_buf_read ( xfs_buf_t bp,
xfs_buf_flags_t  flags 
)

Definition at line 636 of file xfs_buf.c.

xfs_buftarg_t* xfs_alloc_buftarg ( struct xfs_mount *  mp,
struct block_device bdev,
int  external,
const char fsname 
)

Definition at line 1591 of file xfs_buf.c.

STATIC int xfs_bdstrat_cb ( struct xfs_buf bp)

Definition at line 1124 of file xfs_buf.c.

STATIC int xfs_bioerror ( xfs_buf_t bp)

Definition at line 1060 of file xfs_buf.c.

STATIC int xfs_bioerror_relse ( struct xfs_buf bp)

Definition at line 1091 of file xfs_buf.c.

STATIC int xfs_buf_allocate_memory ( xfs_buf_t bp,
uint  flags 
)

Definition at line 340 of file xfs_buf.c.

int xfs_buf_associate_memory ( xfs_buf_t bp,
void mem,
size_t  len 
)

Definition at line 772 of file xfs_buf.c.

STATIC void xfs_buf_bio_end_io ( struct bio *  bio,
int  error 
)

Definition at line 1194 of file xfs_buf.c.

bool xfs_buf_delwri_queue ( struct xfs_buf bp,
struct list_head list 
)

Definition at line 1634 of file xfs_buf.c.

int xfs_buf_delwri_submit ( struct list_head buffer_list)

Definition at line 1775 of file xfs_buf.c.

int xfs_buf_delwri_submit_nowait ( struct list_head buffer_list)

Definition at line 1759 of file xfs_buf.c.

void xfs_buf_free ( xfs_buf_t bp)

Definition at line 310 of file xfs_buf.c.

struct xfs_buf* xfs_buf_get_map ( struct xfs_buftarg target,
struct xfs_buf_map map,
int  nmaps,
xfs_buf_flags_t  flags 
)
read

Definition at line 586 of file xfs_buf.c.

xfs_buf_t* xfs_buf_get_uncached ( struct xfs_buftarg target,
size_t  numblks,
int  flags 
)
read

Definition at line 814 of file xfs_buf.c.

void xfs_buf_hold ( xfs_buf_t bp)

Definition at line 867 of file xfs_buf.c.

int __init xfs_buf_init ( void  )

Definition at line 1799 of file xfs_buf.c.

STATIC void xfs_buf_iodone_work ( struct work_struct work)

Definition at line 999 of file xfs_buf.c.

void xfs_buf_ioend ( xfs_buf_t bp,
int  schedule 
)

Definition at line 1012 of file xfs_buf.c.

void xfs_buf_ioerror ( xfs_buf_t bp,
int  error 
)

Definition at line 1035 of file xfs_buf.c.

void xfs_buf_ioerror_alert ( struct xfs_buf bp,
const char func 
)

Definition at line 1045 of file xfs_buf.c.

void xfs_buf_iomove ( xfs_buf_t bp,
size_t  boff,
size_t  bsize,
void data,
xfs_buf_rw_t  mode 
)

Definition at line 1405 of file xfs_buf.c.

void xfs_buf_iorequest ( xfs_buf_t bp)

Definition at line 1346 of file xfs_buf.c.

int xfs_buf_iowait ( xfs_buf_t bp)

Definition at line 1374 of file xfs_buf.c.

void xfs_buf_lock ( struct xfs_buf bp)

Definition at line 951 of file xfs_buf.c.

STATIC void xfs_buf_lru_add ( struct xfs_buf bp)

Definition at line 89 of file xfs_buf.c.

STATIC void xfs_buf_lru_del ( struct xfs_buf bp)

Definition at line 114 of file xfs_buf.c.

xfs_caddr_t xfs_buf_offset ( xfs_buf_t bp,
size_t  offset 
)

Definition at line 1387 of file xfs_buf.c.

xfs_buf_t* xfs_buf_read_map ( struct xfs_buftarg target,
struct xfs_buf_map map,
int  nmaps,
xfs_buf_flags_t  flags 
)
read

Definition at line 653 of file xfs_buf.c.

struct xfs_buf* xfs_buf_read_uncached ( struct xfs_buftarg target,
xfs_daddr_t  daddr,
size_t  numblks,
int  flags 
)
read

Definition at line 708 of file xfs_buf.c.

void xfs_buf_readahead_map ( struct xfs_buftarg target,
struct xfs_buf_map map,
int  nmaps 
)

Definition at line 691 of file xfs_buf.c.

void xfs_buf_rele ( xfs_buf_t bp)

Definition at line 879 of file xfs_buf.c.

void xfs_buf_set_empty ( struct xfs_buf bp,
size_t  numblks 
)

Definition at line 741 of file xfs_buf.c.

void xfs_buf_stale ( struct xfs_buf bp)

Definition at line 139 of file xfs_buf.c.

void xfs_buf_terminate ( void  )

Definition at line 1820 of file xfs_buf.c.

int xfs_buf_trylock ( struct xfs_buf bp)

Definition at line 926 of file xfs_buf.c.

void xfs_buf_unlock ( struct xfs_buf bp)

Definition at line 965 of file xfs_buf.c.

STATIC void xfs_buf_wait_unpin ( xfs_buf_t bp)

Definition at line 975 of file xfs_buf.c.

int xfs_buftarg_shrink ( struct shrinker shrink,
struct shrink_control sc 
)

Definition at line 1480 of file xfs_buf.c.

int xfs_bwrite ( struct xfs_buf bp)

Definition at line 1145 of file xfs_buf.c.

void xfs_free_buftarg ( struct xfs_mount *  mp,
struct xfs_buftarg btp 
)

Definition at line 1530 of file xfs_buf.c.

int xfs_setsize_buftarg ( xfs_buftarg_t btp,
unsigned int  blocksize,
unsigned int  sectorsize 
)

Definition at line 1582 of file xfs_buf.c.

STATIC int xfs_setsize_buftarg_early ( xfs_buftarg_t btp,
struct block_device bdev 
)

Definition at line 1573 of file xfs_buf.c.

STATIC int xfs_setsize_buftarg_flags ( xfs_buftarg_t btp,
unsigned int  blocksize,
unsigned int  sectorsize,
int  verbose 
)

Definition at line 1543 of file xfs_buf.c.

void xfs_wait_buftarg ( struct xfs_buftarg btp)

Definition at line 1453 of file xfs_buf.c.

void xfsbdstrat ( struct xfs_mount *  mp,
struct xfs_buf bp 
)

Definition at line 1171 of file xfs_buf.c.