Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
jfs_dmap.c File Reference
#include <linux/fs.h>
#include <linux/slab.h>
#include "jfs_incore.h"
#include "jfs_superblock.h"
#include "jfs_dmap.h"
#include "jfs_imap.h"
#include "jfs_lock.h"
#include "jfs_metapage.h"
#include "jfs_debug.h"
#include "jfs_discard.h"

Go to the source code of this file.

Macros

#define BMAP_LOCK_INIT(bmp)   mutex_init(&bmp->db_bmaplock)
 
#define BMAP_LOCK(bmp)   mutex_lock(&bmp->db_bmaplock)
 
#define BMAP_UNLOCK(bmp)   mutex_unlock(&bmp->db_bmaplock)
 
#define MAXL0PAGES   (1 + LPERCTL)
 
#define MAXL1PAGES   (1 + LPERCTL * MAXL0PAGES)
 
#define MAXL2PAGES   (1 + LPERCTL * MAXL1PAGES)
 
#define BMAPPGTOLEV(npages)
 

Functions

int dbMount (struct inode *ipbmap)
 
int dbUnmount (struct inode *ipbmap, int mounterror)
 
int dbSync (struct inode *ipbmap)
 
int dbFree (struct inode *ip, s64 blkno, s64 nblocks)
 
int dbUpdatePMap (struct inode *ipbmap, int free, s64 blkno, s64 nblocks, struct tblock *tblk)
 
int dbNextAG (struct inode *ipbmap)
 
int dbAlloc (struct inode *ip, s64 hint, s64 nblocks, s64 *results)
 
int dbReAlloc (struct inode *ip, s64 blkno, s64 nblocks, s64 addnblocks, s64 *results)
 
s64 dbDiscardAG (struct inode *ip, int agno, s64 minlen)
 
int dbAllocBottomUp (struct inode *ip, s64 blkno, s64 nblocks)
 
int dbExtendFS (struct inode *ipbmap, s64 blkno, s64 nblocks)
 
void dbFinalizeBmap (struct inode *ipbmap)
 
s64 dbMapFileSizeToMapSize (struct inode *ipbmap)
 

Macro Definition Documentation

#define BMAP_LOCK (   bmp)    mutex_lock(&bmp->db_bmaplock)

Definition at line 71 of file jfs_dmap.c.

#define BMAP_LOCK_INIT (   bmp)    mutex_init(&bmp->db_bmaplock)

Definition at line 70 of file jfs_dmap.c.

#define BMAP_UNLOCK (   bmp)    mutex_unlock(&bmp->db_bmaplock)

Definition at line 72 of file jfs_dmap.c.

#define BMAPPGTOLEV (   npages)
Value:
(((npages) <= 3 + MAXL0PAGES) ? 0 : \
((npages) <= 2 + MAXL1PAGES) ? 1 : 2)

Definition at line 4063 of file jfs_dmap.c.

#define MAXL0PAGES   (1 + LPERCTL)

Definition at line 4056 of file jfs_dmap.c.

#define MAXL1PAGES   (1 + LPERCTL * MAXL0PAGES)

Definition at line 4057 of file jfs_dmap.c.

#define MAXL2PAGES   (1 + LPERCTL * MAXL1PAGES)

Definition at line 4058 of file jfs_dmap.c.

Function Documentation

int dbAlloc ( struct inode ip,
s64  hint,
s64  nblocks,
s64 results 
)

Definition at line 702 of file jfs_dmap.c.

int dbAllocBottomUp ( struct inode ip,
s64  blkno,
s64  nblocks 
)

Definition at line 3222 of file jfs_dmap.c.

s64 dbDiscardAG ( struct inode ip,
int  agno,
s64  minlen 
)

Definition at line 1628 of file jfs_dmap.c.

int dbExtendFS ( struct inode ipbmap,
s64  blkno,
s64  nblocks 
)

Definition at line 3398 of file jfs_dmap.c.

void dbFinalizeBmap ( struct inode ipbmap)

Definition at line 3671 of file jfs_dmap.c.

int dbFree ( struct inode ip,
s64  blkno,
s64  nblocks 
)

TRIM the blocks, when mounted with discard option

Definition at line 331 of file jfs_dmap.c.

s64 dbMapFileSizeToMapSize ( struct inode ipbmap)

Definition at line 4067 of file jfs_dmap.c.

int dbMount ( struct inode ipbmap)

Definition at line 165 of file jfs_dmap.c.

int dbNextAG ( struct inode ipbmap)

Definition at line 605 of file jfs_dmap.c.

int dbReAlloc ( struct inode ip,
s64  blkno,
s64  nblocks,
s64  addnblocks,
s64 results 
)

Definition at line 980 of file jfs_dmap.c.

int dbSync ( struct inode ipbmap)

Definition at line 263 of file jfs_dmap.c.

int dbUnmount ( struct inode ipbmap,
int  mounterror 
)

Definition at line 242 of file jfs_dmap.c.

int dbUpdatePMap ( struct inode ipbmap,
int  free,
s64  blkno,
s64  nblocks,
struct tblock tblk 
)

Definition at line 425 of file jfs_dmap.c.