Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
jfs_xtree.c File Reference
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/quotaops.h>
#include <linux/seq_file.h>
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_dmap.h"
#include "jfs_dinode.h"
#include "jfs_superblock.h"
#include "jfs_debug.h"

Go to the source code of this file.

Data Structures

struct  xtsplit
 

Macros

#define XT_INSERT   0x00000001
 
#define XT_CMP(CMP, K, X, OFFSET64)
 
#define XT_PUTENTRY(XAD, FLAG, OFF, LEN, ADDR)
 
#define XT_PAGE(IP, MP)   BT_PAGE(IP, MP, xtpage_t, i_xtroot)
 
#define XT_GETPAGE(IP, BN, MP, SIZE, P, RC)
 
#define XT_PUTPAGE(MP)   BT_PUTPAGE(MP)
 
#define XT_GETSEARCH(IP, LEAF, BN, MP, P, INDEX)   BT_GETSEARCH(IP, LEAF, BN, MP, xtpage_t, P, INDEX, i_xtroot)
 
#define MAX_TRUNCATE_LEAVES   50
 

Functions

int xtLookup (struct inode *ip, s64 lstart, s64 llen, int *pflag, s64 *paddr, s32 *plen, int no_check)
 
int xtInsert (tid_t tid, struct inode *ip, int xflag, s64 xoff, s32 xlen, s64 *xaddrp, int flag)
 
int xtExtend (tid_t tid, struct inode *ip, s64 xoff, s32 xlen, int flag)
 
int xtUpdate (tid_t tid, struct inode *ip, xad_t *nxad)
 
int xtAppend (tid_t tid, struct inode *ip, int xflag, s64 xoff, s32 maxblocks, s32 *xlenp, s64 *xaddrp, int flag)
 
void xtInitRoot (tid_t tid, struct inode *ip)
 
s64 xtTruncate (tid_t tid, struct inode *ip, s64 newsize, int flag)
 
s64 xtTruncate_pmap (tid_t tid, struct inode *ip, s64 committed_size)
 

Macro Definition Documentation

#define MAX_TRUNCATE_LEAVES   50

Definition at line 3114 of file jfs_xtree.c.

#define XT_CMP (   CMP,
  K,
  X,
  OFFSET64 
)
Value:
{\
OFFSET64 = offsetXAD(X);\
(CMP) = ((K) >= OFFSET64 + lengthXAD(X)) ? 1 :\
((K) < OFFSET64) ? -1 : 0;\
}

Definition at line 47 of file jfs_xtree.c.

#define XT_GETPAGE (   IP,
  BN,
  MP,
  SIZE,
  P,
  RC 
)
Value:
{\
BT_GETPAGE(IP, BN, MP, xtpage_t, SIZE, P, RC, i_xtroot)\
if (!(RC))\
{\
if ((le16_to_cpu((P)->header.nextindex) < XTENTRYSTART) ||\
(le16_to_cpu((P)->header.nextindex) > le16_to_cpu((P)->header.maxentry)) ||\
(le16_to_cpu((P)->header.maxentry) > (((BN)==0)?XTROOTMAXSLOT:PSIZE>>L2XTSLOTSIZE)))\
{\
jfs_error((IP)->i_sb, "XT_GETPAGE: xtree page corrupt");\
BT_PUTPAGE(MP);\
MP = NULL;\
RC = -EIO;\
}\
}\
}

Definition at line 67 of file jfs_xtree.c.

#define XT_GETSEARCH (   IP,
  LEAF,
  BN,
  MP,
  P,
  INDEX 
)    BT_GETSEARCH(IP, LEAF, BN, MP, xtpage_t, P, INDEX, i_xtroot)

Definition at line 87 of file jfs_xtree.c.

#define XT_INSERT   0x00000001

Definition at line 37 of file jfs_xtree.c.

#define XT_PAGE (   IP,
  MP 
)    BT_PAGE(IP, MP, xtpage_t, i_xtroot)

Definition at line 63 of file jfs_xtree.c.

#define XT_PUTENTRY (   XAD,
  FLAG,
  OFF,
  LEN,
  ADDR 
)
Value:
{\
(XAD)->flag = (FLAG);\
XADoffset((XAD), (OFF));\
XADlength((XAD), (LEN));\
XADaddress((XAD), (ADDR));\
}

Definition at line 55 of file jfs_xtree.c.

#define XT_PUTPAGE (   MP)    BT_PUTPAGE(MP)

Definition at line 85 of file jfs_xtree.c.

Function Documentation

int xtAppend ( tid_t  tid,
struct inode ip,
int  xflag,
s64  xoff,
s32  maxblocks,
s32 xlenp,
s64 xaddrp,
int  flag 
)

Definition at line 2170 of file jfs_xtree.c.

int xtExtend ( tid_t  tid,
struct inode ip,
s64  xoff,
s32  xlen,
int  flag 
)

Definition at line 1359 of file jfs_xtree.c.

void xtInitRoot ( tid_t  tid,
struct inode ip 
)

Definition at line 3074 of file jfs_xtree.c.

int xtInsert ( tid_t  tid,
struct inode ip,
int  xflag,
s64  xoff,
s32  xlen,
s64 xaddrp,
int  flag 
)

Definition at line 536 of file jfs_xtree.c.

int xtLookup ( struct inode ip,
s64  lstart,
s64  llen,
int pflag,
s64 paddr,
s32 plen,
int  no_check 
)

Definition at line 145 of file jfs_xtree.c.

s64 xtTruncate ( tid_t  tid,
struct inode ip,
s64  newsize,
int  flag 
)

Definition at line 3163 of file jfs_xtree.c.

s64 xtTruncate_pmap ( tid_t  tid,
struct inode ip,
s64  committed_size 
)

Definition at line 3719 of file jfs_xtree.c.

int xtUpdate ( tid_t  tid,
struct inode ip,
xad_t nxad 
)

Definition at line 1705 of file jfs_xtree.c.