Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
dir.h File Reference
#include <linux/dcache.h>
#include <linux/crc32.h>

Go to the source code of this file.

Functions

struct inodegfs2_dir_search (struct inode *dir, const struct qstr *filename)
 
int gfs2_dir_check (struct inode *dir, const struct qstr *filename, const struct gfs2_inode *ip)
 
int gfs2_dir_add (struct inode *inode, const struct qstr *filename, const struct gfs2_inode *ip)
 
int gfs2_dir_del (struct gfs2_inode *dip, const struct dentry *dentry)
 
int gfs2_dir_read (struct inode *inode, u64 *offset, void *opaque, filldir_t filldir, struct file_ra_state *f_ra)
 
int gfs2_dir_mvino (struct gfs2_inode *dip, const struct qstr *filename, const struct gfs2_inode *nip, unsigned int new_type)
 
int gfs2_dir_exhash_dealloc (struct gfs2_inode *dip)
 
int gfs2_diradd_alloc_required (struct inode *dir, const struct qstr *filename)
 
int gfs2_dir_get_new_buffer (struct gfs2_inode *ip, u64 block, struct buffer_head **bhp)
 
void gfs2_dir_hash_inval (struct gfs2_inode *ip)
 

Variables

struct qstr gfs2_qdot
 
struct qstr gfs2_qdotdot
 

Function Documentation

int gfs2_dir_add ( struct inode inode,
const struct qstr name,
const struct gfs2_inode nip 
)

gfs2_dir_add - Add new filename into directory : The GFS2 inode : The new name : The inode number of the entry : The type of the entry

Returns: 0 on success, error code on failure

Definition at line 1656 of file dir.c.

int gfs2_dir_check ( struct inode dir,
const struct qstr filename,
const struct gfs2_inode ip 
)

Definition at line 1570 of file dir.c.

int gfs2_dir_del ( struct gfs2_inode dip,
const struct dentry dentry 
)

gfs2_dir_del - Delete a directory entry : The GFS2 inode : The filename

Returns: 0 on success, error code on failure

Definition at line 1731 of file dir.c.

int gfs2_dir_exhash_dealloc ( struct gfs2_inode dip)

gfs2_dir_exhash_dealloc - free all the leaf blocks in a directory : the directory

Dealloc all on-disk directory leaves to FREEMETA state Change on-disk inode type to "regular file"

Returns: errno

Definition at line 1955 of file dir.c.

int gfs2_dir_get_new_buffer ( struct gfs2_inode ip,
u64  block,
struct buffer_head **  bhp 
)

Definition at line 90 of file dir.c.

void gfs2_dir_hash_inval ( struct gfs2_inode ip)

gfs2_dir_hash_inval - Invalidate dir hash : The directory inode

Must be called with an exclusive glock, or during glock invalidation.

Definition at line 384 of file dir.c.

int gfs2_dir_mvino ( struct gfs2_inode dip,
const struct qstr filename,
const struct gfs2_inode nip,
unsigned int  new_type 
)

gfs2_dir_mvino - Change inode number of directory entry : The GFS2 inode : :

This routine changes the inode number of a directory entry. It's used by rename to change ".." when a directory is moved. Assumes a glock is held on dvp.

Returns: errno

Definition at line 1788 of file dir.c.

int gfs2_dir_read ( struct inode inode,
u64 offset,
void opaque,
filldir_t  filldir,
struct file_ra_state f_ra 
)

Definition at line 1477 of file dir.c.

struct inode* gfs2_dir_search ( struct inode dir,
const struct qstr name 
)
read

gfs2_dir_search - Search a directory : The GFS2 inode : :

This routine searches a directory for a file or another directory. Assumes a glock is held on dip.

Returns: errno

Definition at line 1550 of file dir.c.

int gfs2_diradd_alloc_required ( struct inode inode,
const struct qstr name 
)

gfs2_diradd_alloc_required - find if adding entry will require an allocation : the file being written to : the filename that's going to be added

Returns: 1 if alloc required, 0 if not, -ve on error

Definition at line 2010 of file dir.c.

Variable Documentation

struct qstr gfs2_qdot
struct qstr gfs2_qdotdot