Linux Kernel
3.7.1
|
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/fs.h>
#include <linux/gfs2_ondisk.h>
#include <linux/prefetch.h>
#include <linux/blkdev.h>
#include <linux/rbtree.h>
#include "gfs2.h"
#include "incore.h"
#include "glock.h"
#include "glops.h"
#include "lops.h"
#include "meta_io.h"
#include "quota.h"
#include "rgrp.h"
#include "super.h"
#include "trans.h"
#include "util.h"
#include "log.h"
#include "inode.h"
#include "trace_gfs2.h"
Go to the source code of this file.
Macros | |
#define | BFITNOENT ((u32)~0) |
#define | NO_BLOCK ((u64)~0) |
#define | LBITMASK (0x5555555555555555UL) |
#define | LBITSKIP55 (0x5555555555555555UL) |
#define | LBITSKIP00 (0x0000000000000000UL) |
int gfs2_alloc_blocks | ( | struct gfs2_inode * | ip, |
u64 * | bn, | ||
unsigned int * | nblocks, | ||
bool | dinode, | ||
u64 * | generation | ||
) |
gfs2_alloc_blocks - Allocate one or more blocks of data and/or a dinode : the inode to allocate the block for : Used to return the starting block number : requested number of blocks/extent length (value/result) : 1 if we're allocating a dinode block, else 0 : the generation number of the inode
Returns: 0 or error
void gfs2_free_clones | ( | struct gfs2_rgrpd * | rgd | ) |
void gfs2_free_di | ( | struct gfs2_rgrpd * | rgd, |
struct gfs2_inode * | ip | ||
) |
void gfs2_free_meta | ( | struct gfs2_inode * | ip, |
u64 | bstart, | ||
u32 | blen | ||
) |
void gfs2_inplace_release | ( | struct gfs2_inode * | ip | ) |
gfs2_inplace_release - release an inplace reservation : the inode the reservation was taken out on
Release a reservation made by gfs2_inplace_reserve().
int gfs2_inplace_reserve | ( | struct gfs2_inode * | ip, |
u32 | requested | ||
) |
int gfs2_rgrp_bh_get | ( | struct gfs2_rgrpd * | rgd | ) |
int gfs2_rgrp_go_lock | ( | struct gfs2_holder * | gh | ) |
void gfs2_rgrp_go_unlock | ( | struct gfs2_holder * | gh | ) |
gfs2_rgrp_go_unlock - Release RG bitmaps read in with gfs2_rgrp_bh_get() : The glock holder for the resource group
void gfs2_rgrp_verify | ( | struct gfs2_rgrpd * | rgd | ) |
|
read |
|
read |
gfs2_rindex_update - Update the rindex if required : The GFS2 superblock
We grab a lock on the rindex inode to make sure that it doesn't change whilst we are performing an operation. We keep this lock for quite long periods of time compared to other locks. This doesn't matter, since it is shared and it is very, very rarely accessed in the exclusive mode (i.e. only when expanding the filesystem).
This makes sure that we're using the latest copy of the resource index special file, which might have been updated if someone expanded the filesystem (via gfs2_grow utility), which adds new resource groups.
Returns: 0 on succeess, error code otherwise
void gfs2_rlist_add | ( | struct gfs2_inode * | ip, |
struct gfs2_rgrp_list * | rlist, | ||
u64 | block | ||
) |
void gfs2_rlist_alloc | ( | struct gfs2_rgrp_list * | rlist, |
unsigned int | state | ||
) |
void gfs2_rlist_free | ( | struct gfs2_rgrp_list * | rlist | ) |
int gfs2_rs_alloc | ( | struct gfs2_inode * | ip | ) |
void gfs2_rs_delete | ( | struct gfs2_inode * | ip | ) |
void gfs2_rs_deltree | ( | struct gfs2_inode * | ip, |
struct gfs2_blkreserv * | rs | ||
) |
int update_rgrp_lvb | ( | struct gfs2_rgrpd * | rgd | ) |