#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/buffer_head.h>
#include <linux/sort.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
#include <linux/vmalloc.h>
#include "gfs2.h"
#include "incore.h"
#include "dir.h"
#include "glock.h"
#include "inode.h"
#include "meta_io.h"
#include "quota.h"
#include "rgrp.h"
#include "trans.h"
#include "bmap.h"
#include "util.h"
Go to the source code of this file.
|
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) |
|
int | gfs2_dir_read (struct inode *inode, u64 *offset, void *opaque, filldir_t filldir, struct file_ra_state *f_ra) |
|
struct inode * | gfs2_dir_search (struct inode *dir, const struct qstr *name) |
|
int | gfs2_dir_check (struct inode *dir, const struct qstr *name, const struct gfs2_inode *ip) |
|
int | gfs2_dir_add (struct inode *inode, const struct qstr *name, const struct gfs2_inode *nip) |
|
int | gfs2_dir_del (struct gfs2_inode *dip, const struct dentry *dentry) |
|
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 *inode, const struct qstr *name) |
|
#define gfs2_dir_offset2hash |
( |
|
p | ) |
((u32)(((u64)(p)) << 1)) |
Definition at line 82 of file dir.c.
#define gfs2_disk_hash2offset |
( |
|
h | ) |
(((u64)(h)) >> 1) |
Definition at line 81 of file dir.c.
#define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ |
Definition at line 77 of file dir.c.
#define IS_LEAF 1 /* Hashed (leaf) directory */ |
Definition at line 76 of file dir.c.
#define MAX_RA_BLOCKS 32 /* max read-ahead blocks */ |
Definition at line 79 of file dir.c.
Definition at line 87 of file dir.c.
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.
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.
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.
Definition at line 90 of file dir.c.
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.
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.
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.
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.
Definition at line 84 of file dir.c.