Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
bmap.h File Reference
#include "inode.h"

Go to the source code of this file.

Functions

int gfs2_unstuff_dinode (struct gfs2_inode *ip, struct page *page)
 
int gfs2_block_map (struct inode *inode, sector_t lblock, struct buffer_head *bh, int create)
 
int gfs2_extent_map (struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen)
 
int gfs2_setattr_size (struct inode *inode, u64 size)
 
void gfs2_trim_blocks (struct inode *inode)
 
int gfs2_truncatei_resume (struct gfs2_inode *ip)
 
int gfs2_file_dealloc (struct gfs2_inode *ip)
 
int gfs2_write_alloc_required (struct gfs2_inode *ip, u64 offset, unsigned int len)
 

Function Documentation

int gfs2_block_map ( struct inode inode,
sector_t  lblock,
struct buffer_head *  bh_map,
int  create 
)

gfs2_block_map - Map a block from an inode to a disk block : The inode : The logical block number : The bh to be mapped : True if its ok to alloc blocks to satify the request

Sets buffer_mapped() if successful, sets buffer_boundary() if a read of metadata will be required before the next block can be mapped. Sets buffer_new() if new blocks were allocated.

Returns: errno

Definition at line 601 of file bmap.c.

int gfs2_extent_map ( struct inode inode,
u64  lblock,
int new,
u64 dblock,
unsigned *  extlen 
)

Definition at line 680 of file bmap.c.

int gfs2_file_dealloc ( struct gfs2_inode ip)

Definition at line 1259 of file bmap.c.

int gfs2_setattr_size ( struct inode inode,
u64  newsize 
)

gfs2_setattr_size - make a file a given size : the inode : the size to make the file

The file size can grow, shrink, or stay the same size. This is called holding i_mutex and an exclusive glock on the inode in question.

Returns: errno

Definition at line 1230 of file bmap.c.

void gfs2_trim_blocks ( struct inode inode)

Definition at line 1138 of file bmap.c.

int gfs2_truncatei_resume ( struct gfs2_inode ip)

Definition at line 1250 of file bmap.c.

int gfs2_unstuff_dinode ( struct gfs2_inode ip,
struct page page 
)

Definition at line 117 of file bmap.c.

int gfs2_write_alloc_required ( struct gfs2_inode ip,
u64  offset,
unsigned int  len 
)

gfs2_write_alloc_required - figure out if a write will require an allocation : the file being written to : the offset to write to : the number of bytes being written

Returns: 1 if an alloc is required, 0 otherwise

Definition at line 1273 of file bmap.c.