Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c157257b
Commit
c157257b
authored
Nov 07, 2004
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux.bkbits.net/linux-2.5
into bkbits.net:/repos/j/jfs/linux-2.5
parents
f199195e
03a18ce4
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
315 additions
and
265 deletions
+315
-265
fs/jfs/jfs_dinode.h
fs/jfs/jfs_dinode.h
+14
-14
fs/jfs/jfs_dmap.c
fs/jfs/jfs_dmap.c
+5
-5
fs/jfs/jfs_dmap.h
fs/jfs/jfs_dmap.h
+46
-29
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+15
-11
fs/jfs/jfs_dtree.h
fs/jfs/jfs_dtree.h
+9
-9
fs/jfs/jfs_imap.c
fs/jfs/jfs_imap.c
+33
-32
fs/jfs/jfs_imap.h
fs/jfs/jfs_imap.h
+46
-28
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+6
-4
fs/jfs/jfs_logmgr.h
fs/jfs/jfs_logmgr.h
+48
-48
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.c
+5
-5
fs/jfs/jfs_mount.c
fs/jfs/jfs_mount.c
+1
-1
fs/jfs/jfs_superblock.h
fs/jfs/jfs_superblock.h
+16
-16
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+2
-2
fs/jfs/jfs_types.h
fs/jfs/jfs_types.h
+8
-8
fs/jfs/jfs_unicode.c
fs/jfs/jfs_unicode.c
+1
-1
fs/jfs/jfs_unicode.h
fs/jfs/jfs_unicode.h
+24
-8
fs/jfs/jfs_xattr.h
fs/jfs/jfs_xattr.h
+2
-2
fs/jfs/jfs_xtree.c
fs/jfs/jfs_xtree.c
+27
-35
fs/jfs/jfs_xtree.h
fs/jfs/jfs_xtree.h
+7
-7
No files found.
fs/jfs/jfs_dinode.h
View file @
c157257b
...
...
@@ -39,22 +39,22 @@ struct dinode {
*
* define generic/POSIX attributes
*/
u
32
di_inostamp
;
/* 4: stamp to show inode belongs to fileset */
s32
di_fileset
;
/* 4: fileset number */
u32
di_number
;
/* 4: inode number, aka file serial number */
u
32
di_gen
;
/* 4: inode generation number */
__le
32
di_inostamp
;
/* 4: stamp to show inode belongs to fileset */
__le32
di_fileset
;
/* 4: fileset number */
__le32
di_number
;
/* 4: inode number, aka file serial number */
__le
32
di_gen
;
/* 4: inode generation number */
pxd_t
di_ixpxd
;
/* 8: inode extent descriptor */
s
64
di_size
;
/* 8: size */
s64
di_nblocks
;
/* 8: number of blocks allocated */
__le
64
di_size
;
/* 8: size */
__le64
di_nblocks
;
/* 8: number of blocks allocated */
u32
di_nlink
;
/* 4: number of links to the object */
__le32
di_nlink
;
/* 4: number of links to the object */
u
32
di_uid
;
/* 4: user id of owner */
u
32
di_gid
;
/* 4: group id of owner */
__le
32
di_uid
;
/* 4: user id of owner */
__le
32
di_gid
;
/* 4: group id of owner */
u
32
di_mode
;
/* 4: attribute, format and permission */
__le
32
di_mode
;
/* 4: attribute, format and permission */
struct
timestruc_t
di_atime
;
/* 8: time last data accessed */
struct
timestruc_t
di_ctime
;
/* 8: time last status changed */
...
...
@@ -65,9 +65,9 @@ struct dinode {
dxd_t
di_ea
;
/* 16: ea descriptor */
u
32
di_next_index
;
/* 4: Next available dir_table index */
__le
32
di_next_index
;
/* 4: Next available dir_table index */
s32
di_acltype
;
/* 4: Type of ACL */
__le32
di_acltype
;
/* 4: Type of ACL */
/*
* Extension Areas.
...
...
@@ -103,7 +103,7 @@ struct dinode {
u8
_data
[
96
];
/* 96: unused */
struct
{
void
*
_imap
;
/* 4: unused */
u
32
_gengen
;
/* 4: generator */
__le
32
_gengen
;
/* 4: generator */
}
_imap
;
}
_u1
;
/* 96: */
#define di_gengen u._file._u1._imap._gengen
...
...
@@ -114,7 +114,7 @@ struct dinode {
u8
unused
[
16
];
/* 16: */
dxd_t
_dxd
;
/* 16: */
union
{
u
32
_rdev
;
/* 4: */
__le
32
_rdev
;
/* 4: */
u8
_fastsymlink
[
128
];
}
_u
;
u8
_inlineea
[
128
];
...
...
fs/jfs/jfs_dmap.c
View file @
c157257b
...
...
@@ -194,7 +194,7 @@ static s8 budtab[256] = {
int
dbMount
(
struct
inode
*
ipbmap
)
{
struct
bmap
*
bmp
;
struct
dbmap
*
dbmp_le
;
struct
dbmap
_disk
*
dbmp_le
;
struct
metapage
*
mp
;
int
i
;
...
...
@@ -216,7 +216,7 @@ int dbMount(struct inode *ipbmap)
}
/* copy the on-disk bmap descriptor to its in-memory version. */
dbmp_le
=
(
struct
dbmap
*
)
mp
->
data
;
dbmp_le
=
(
struct
dbmap
_disk
*
)
mp
->
data
;
bmp
->
db_mapsize
=
le64_to_cpu
(
dbmp_le
->
dn_mapsize
);
bmp
->
db_nfree
=
le64_to_cpu
(
dbmp_le
->
dn_nfree
);
bmp
->
db_l2nbperpage
=
le32_to_cpu
(
dbmp_le
->
dn_l2nbperpage
);
...
...
@@ -301,7 +301,7 @@ int dbUnmount(struct inode *ipbmap, int mounterror)
*/
int
dbSync
(
struct
inode
*
ipbmap
)
{
struct
dbmap
*
dbmp_le
;
struct
dbmap
_disk
*
dbmp_le
;
struct
bmap
*
bmp
=
JFS_SBI
(
ipbmap
->
i_sb
)
->
bmap
;
struct
metapage
*
mp
;
int
i
;
...
...
@@ -318,7 +318,7 @@ int dbSync(struct inode *ipbmap)
return
-
EIO
;
}
/* copy the in-memory version of the bmap to the on-disk version */
dbmp_le
=
(
struct
dbmap
*
)
mp
->
data
;
dbmp_le
=
(
struct
dbmap
_disk
*
)
mp
->
data
;
dbmp_le
->
dn_mapsize
=
cpu_to_le64
(
bmp
->
db_mapsize
);
dbmp_le
->
dn_nfree
=
cpu_to_le64
(
bmp
->
db_nfree
);
dbmp_le
->
dn_l2nbperpage
=
cpu_to_le32
(
bmp
->
db_l2nbperpage
);
...
...
@@ -3782,7 +3782,7 @@ static int dbInitDmap(struct dmap * dp, s64 Blkno, int nblocks)
/* set the rest of the words in the page to allocated (ONES) */
for
(
i
=
w
;
i
<
LPERDMAP
;
i
++
)
dp
->
pmap
[
i
]
=
dp
->
wmap
[
i
]
=
ONES
;
dp
->
pmap
[
i
]
=
dp
->
wmap
[
i
]
=
cpu_to_le32
(
ONES
)
;
/*
* init tree
...
...
fs/jfs/jfs_dmap.h
View file @
c157257b
...
...
@@ -145,10 +145,10 @@ static __inline signed char TREEMAX(signed char *cp)
* dmaptree must be consistent with dmapctl.
*/
struct
dmaptree
{
s
32
nleafs
;
/* 4: number of tree leafs */
s32
l2nleafs
;
/* 4: l2 number of tree leafs */
s
32
leafidx
;
/* 4: index of first tree leaf */
s
32
height
;
/* 4: height of the tree */
__le
32
nleafs
;
/* 4: number of tree leafs */
__le32
l2nleafs
;
/* 4: l2 number of tree leafs */
__le
32
leafidx
;
/* 4: index of first tree leaf */
__le
32
height
;
/* 4: height of the tree */
s8
budmin
;
/* 1: min l2 tree leaf value to combine */
s8
stree
[
TREESIZE
];
/* TREESIZE: tree */
u8
pad
[
2
];
/* 2: pad to word boundary */
...
...
@@ -158,13 +158,13 @@ struct dmaptree {
* dmap page per 8K blocks bitmap
*/
struct
dmap
{
s
32
nblocks
;
/* 4: num blks covered by this dmap */
s
32
nfree
;
/* 4: num of free blks in this dmap */
s
64
start
;
/* 8: starting blkno for this dmap */
__le
32
nblocks
;
/* 4: num blks covered by this dmap */
__le
32
nfree
;
/* 4: num of free blks in this dmap */
__le
64
start
;
/* 8: starting blkno for this dmap */
struct
dmaptree
tree
;
/* 360: dmap tree */
u8
pad
[
1672
];
/* 1672: pad to 2048 bytes */
u
32
wmap
[
LPERDMAP
];
/* 1024: bits of the working map */
u
32
pmap
[
LPERDMAP
];
/* 1024: bits of the persistent map */
__le
32
wmap
[
LPERDMAP
];
/* 1024: bits of the working map */
__le
32
pmap
[
LPERDMAP
];
/* 1024: bits of the persistent map */
};
/* - 4096 - */
/*
...
...
@@ -173,10 +173,10 @@ struct dmap {
* dmapctl must be consistent with dmaptree.
*/
struct
dmapctl
{
s
32
nleafs
;
/* 4: number of tree leafs */
s32
l2nleafs
;
/* 4: l2 number of tree leafs */
s
32
leafidx
;
/* 4: index of the first tree leaf */
s
32
height
;
/* 4: height of tree */
__le
32
nleafs
;
/* 4: number of tree leafs */
__le32
l2nleafs
;
/* 4: l2 number of tree leafs */
__le
32
leafidx
;
/* 4: index of the first tree leaf */
__le
32
height
;
/* 4: height of tree */
s8
budmin
;
/* 1: minimum l2 tree leaf value */
s8
stree
[
CTLTREESIZE
];
/* CTLTREESIZE: dmapctl tree */
u8
pad
[
2714
];
/* 2714: pad to 4096 */
...
...
@@ -201,30 +201,47 @@ typedef union dmtree {
/*
* on-disk aggregate disk allocation map descriptor.
*/
struct
dbmap
{
s64
dn_mapsize
;
/* 8: number of blocks in aggregate */
s64
dn_nfree
;
/* 8: num free blks in aggregate map */
s
32
dn_l2nbperpage
;
/* 4: number of blks per page */
s32
dn_numag
;
/* 4: total number of ags */
s
32
dn_maxlevel
;
/* 4: number of active ags */
s32
dn_maxag
;
/* 4: max active alloc group number */
s32
dn_agpref
;
/* 4: preferred alloc group (hint) */
s32
dn_aglevel
;
/* 4: dmapctl level holding the AG */
s
32
dn_agheigth
;
/* 4: height in dmapctl of the AG */
s32
dn_agwidth
;
/* 4: width in dmapctl of the AG */
s32
dn_agstart
;
/* 4: start tree index at AG height */
s
32
dn_agl2size
;
/* 4: l2 num of blks per alloc group */
s64
dn_agfree
[
MAXAG
];
/* 8*MAXAG: per AG free count */
s64
dn_agsize
;
/* 8: num of blks per alloc group */
struct
dbmap
_disk
{
__le64
dn_mapsize
;
/* 8: number of blocks in aggregate */
__le64
dn_nfree
;
/* 8: num free blks in aggregate map */
__le
32
dn_l2nbperpage
;
/* 4: number of blks per page */
__le32
dn_numag
;
/* 4: total number of ags */
__le
32
dn_maxlevel
;
/* 4: number of active ags */
__le32
dn_maxag
;
/* 4: max active alloc group number */
__le32
dn_agpref
;
/* 4: preferred alloc group (hint) */
__le32
dn_aglevel
;
/* 4: dmapctl level holding the AG */
__le
32
dn_agheigth
;
/* 4: height in dmapctl of the AG */
__le32
dn_agwidth
;
/* 4: width in dmapctl of the AG */
__le32
dn_agstart
;
/* 4: start tree index at AG height */
__le
32
dn_agl2size
;
/* 4: l2 num of blks per alloc group */
__le64
dn_agfree
[
MAXAG
];
/* 8*MAXAG: per AG free count */
__le64
dn_agsize
;
/* 8: num of blks per alloc group */
s8
dn_maxfreebud
;
/* 1: max free buddy system */
u8
pad
[
3007
];
/* 3007: pad to 4096 */
};
/* - 4096 - */
struct
dbmap
{
s64
dn_mapsize
;
/* number of blocks in aggregate */
s64
dn_nfree
;
/* num free blks in aggregate map */
int
dn_l2nbperpage
;
/* number of blks per page */
int
dn_numag
;
/* total number of ags */
int
dn_maxlevel
;
/* number of active ags */
int
dn_maxag
;
/* max active alloc group number */
int
dn_agpref
;
/* preferred alloc group (hint) */
int
dn_aglevel
;
/* dmapctl level holding the AG */
int
dn_agheigth
;
/* height in dmapctl of the AG */
int
dn_agwidth
;
/* width in dmapctl of the AG */
int
dn_agstart
;
/* start tree index at AG height */
int
dn_agl2size
;
/* l2 num of blks per alloc group */
s64
dn_agfree
[
MAXAG
];
/* per AG free count */
s64
dn_agsize
;
/* num of blks per alloc group */
signed
char
dn_maxfreebud
;
/* max free buddy system */
};
/* - 4096 - */
/*
* in-memory aggregate disk allocation map descriptor.
*/
struct
bmap
{
struct
dbmap
db_bmap
;
/* on-disk aggregate map descriptor */
struct
dbmap
db_bmap
;
/* on-disk aggregate map descriptor */
struct
inode
*
db_ipbmap
;
/* ptr to aggregate map incore inode */
struct
semaphore
db_bmaplock
;
/* aggregate map lock */
atomic_t
db_active
[
MAXAG
];
/* count of active, open files in AG */
...
...
fs/jfs/jfs_dtree.c
View file @
c157257b
...
...
@@ -852,7 +852,7 @@ int dtInsert(tid_t tid, struct inode *ip,
n
=
NDTLEAF_LEGACY
(
name
->
namlen
);
data
.
leaf
.
ip
=
NULL
;
/* signifies legacy directory format */
}
data
.
leaf
.
ino
=
cpu_to_le32
(
*
fsn
)
;
data
.
leaf
.
ino
=
*
fsn
;
/*
* leaf page does not have enough room for new entry:
...
...
@@ -3570,7 +3570,8 @@ static int dtCompare(struct component_name * key, /* search key */
dtpage_t
*
p
,
/* directory page */
int
si
)
{
/* entry slot index */
wchar_t
*
kname
,
*
name
;
wchar_t
*
kname
;
__le16
*
name
;
int
klen
,
namlen
,
len
,
rc
;
struct
idtentry
*
ih
;
struct
dtslot
*
t
;
...
...
@@ -3646,7 +3647,8 @@ static int ciCompare(struct component_name * key, /* search key */
int
si
,
/* entry slot index */
int
flag
)
{
wchar_t
*
kname
,
*
name
,
x
;
wchar_t
*
kname
,
x
;
__le16
*
name
;
int
klen
,
namlen
,
len
,
rc
;
struct
ldtentry
*
lh
;
struct
idtentry
*
ih
;
...
...
@@ -3824,7 +3826,8 @@ static void dtGetKey(dtpage_t * p, int i, /* entry index */
struct
idtentry
*
ih
;
struct
dtslot
*
t
;
int
namlen
,
len
;
wchar_t
*
name
,
*
kname
;
wchar_t
*
kname
;
__le16
*
name
;
/* get entry */
stbl
=
DT_GETSTBL
(
p
);
...
...
@@ -3852,7 +3855,7 @@ static void dtGetKey(dtpage_t * p, int i, /* entry index */
/*
* move head/only segment
*/
UniStrncpy_le
(
kname
,
name
,
len
);
UniStrncpy_
from_
le
(
kname
,
name
,
len
);
/*
* move additional segment(s)
...
...
@@ -3863,7 +3866,7 @@ static void dtGetKey(dtpage_t * p, int i, /* entry index */
kname
+=
len
;
namlen
-=
len
;
len
=
min
(
namlen
,
DTSLOTDATALEN
);
UniStrncpy_le
(
kname
,
t
->
name
,
len
);
UniStrncpy_
from_
le
(
kname
,
t
->
name
,
len
);
si
=
t
->
next
;
}
...
...
@@ -3885,7 +3888,8 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
struct
ldtentry
*
lh
=
NULL
;
struct
idtentry
*
ih
=
NULL
;
int
hsi
,
fsi
,
klen
,
len
,
nextindex
;
wchar_t
*
kname
,
*
name
;
wchar_t
*
kname
;
__le16
*
name
;
s8
*
stbl
;
pxd_t
*
xd
;
struct
dt_lock
*
dtlck
=
*
dtlock
;
...
...
@@ -3914,7 +3918,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
if
(
p
->
header
.
flag
&
BT_LEAF
)
{
lh
=
(
struct
ldtentry
*
)
h
;
lh
->
next
=
h
->
next
;
lh
->
inumber
=
data
->
leaf
.
ino
;
/* little-endian */
lh
->
inumber
=
cpu_to_le32
(
data
->
leaf
.
ino
);
lh
->
namlen
=
klen
;
name
=
lh
->
name
;
if
(
data
->
leaf
.
ip
)
{
...
...
@@ -3936,7 +3940,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
len
=
min
(
klen
,
DTIHDRDATALEN
);
}
UniStrncpy_le
(
name
,
kname
,
len
);
UniStrncpy_
to_
le
(
name
,
kname
,
len
);
n
=
1
;
xsi
=
hsi
;
...
...
@@ -3971,7 +3975,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
kname
+=
len
;
len
=
min
(
klen
,
DTSLOTDATALEN
);
UniStrncpy_le
(
t
->
name
,
kname
,
len
);
UniStrncpy_
to_
le
(
t
->
name
,
kname
,
len
);
n
++
;
xsi
=
fsi
;
...
...
@@ -4174,7 +4178,7 @@ static void dtMoveEntry(dtpage_t * sp, int si, dtpage_t * dp,
d
++
;
len
=
min
(
snamlen
,
DTSLOTDATALEN
);
UniStrncpy
(
d
->
name
,
s
->
name
,
len
);
UniStrncpy
_le
(
d
->
name
,
s
->
name
,
len
);
ns
++
;
nd
++
;
...
...
fs/jfs/jfs_dtree.h
View file @
c157257b
...
...
@@ -47,7 +47,7 @@ typedef union {
struct
dtslot
{
s8
next
;
/* 1: */
s8
cnt
;
/* 1: */
wchar_t
name
[
15
];
/* 30: */
__le16
name
[
15
];
/* 30: */
};
/* (32) */
...
...
@@ -67,7 +67,7 @@ struct idtentry {
s8
next
;
/* 1: */
u8
namlen
;
/* 1: */
wchar_t
name
[
11
];
/* 22: 2-byte aligned */
__le16
name
[
11
];
/* 22: 2-byte aligned */
};
/* (32) */
#define DTIHDRSIZE 10
...
...
@@ -83,11 +83,11 @@ struct idtentry {
* For legacy filesystems, name contains 13 wchars -- no index field
*/
struct
ldtentry
{
u
32
inumber
;
/* 4: 4-byte aligned */
__le
32
inumber
;
/* 4: 4-byte aligned */
s8
next
;
/* 1: */
u8
namlen
;
/* 1: */
wchar_t
name
[
11
];
/* 22: 2-byte aligned */
u
32
index
;
/* 4: index into dir_table */
__le16
name
[
11
];
/* 22: 2-byte aligned */
__le
32
index
;
/* 4: index into dir_table */
};
/* (32) */
#define DTLHDRSIZE 6
...
...
@@ -113,7 +113,7 @@ struct dir_table_slot {
u8
flag
;
/* 1: 0 if free */
u8
slot
;
/* 1: slot within leaf page of entry */
u8
addr1
;
/* 1: upper 8 bits of leaf page address */
u
32
addr2
;
/* 4: lower 32 bits of leaf page address -OR-
__le
32
addr2
;
/* 4: lower 32 bits of leaf page address -OR-
index of next entry when this entry was deleted */
};
/* (8) */
...
...
@@ -151,7 +151,7 @@ typedef union {
s8
freecnt
;
/* 1: free count */
s8
freelist
;
/* 1: freelist header */
u
32
idotdot
;
/* 4: parent inode number */
__le
32
idotdot
;
/* 4: parent inode number */
s8
stbl
[
8
];
/* 8: sorted entry index table */
}
header
;
/* (32) */
...
...
@@ -192,8 +192,8 @@ typedef union {
*/
typedef
union
{
struct
{
s
64
next
;
/* 8: next sibling */
s
64
prev
;
/* 8: previous sibling */
__le
64
next
;
/* 8: next sibling */
__le
64
prev
;
/* 8: previous sibling */
u8
flag
;
/* 1: */
u8
nextindex
;
/* 1: next entry index in stbl */
...
...
fs/jfs/jfs_imap.c
View file @
c157257b
...
...
@@ -131,7 +131,7 @@ int diMount(struct inode *ipimap)
struct
inomap
*
imap
;
struct
metapage
*
mp
;
int
index
;
struct
dinomap
*
dinom_le
;
struct
dinomap
_disk
*
dinom_le
;
/*
* allocate/initialize the in-memory inode map control structure
...
...
@@ -154,7 +154,7 @@ int diMount(struct inode *ipimap)
}
/* copy the on-disk version to the in-memory version. */
dinom_le
=
(
struct
dinomap
*
)
mp
->
data
;
dinom_le
=
(
struct
dinomap
_disk
*
)
mp
->
data
;
imap
->
im_freeiag
=
le32_to_cpu
(
dinom_le
->
in_freeiag
);
imap
->
im_nextiag
=
le32_to_cpu
(
dinom_le
->
in_nextiag
);
atomic_set
(
&
imap
->
im_numinos
,
le32_to_cpu
(
dinom_le
->
in_numinos
));
...
...
@@ -242,7 +242,7 @@ int diUnmount(struct inode *ipimap, int mounterror)
*/
int
diSync
(
struct
inode
*
ipimap
)
{
struct
dinomap
*
dinom_le
;
struct
dinomap
_disk
*
dinom_le
;
struct
inomap
*
imp
=
JFS_IP
(
ipimap
)
->
i_imap
;
struct
metapage
*
mp
;
int
index
;
...
...
@@ -260,7 +260,7 @@ int diSync(struct inode *ipimap)
}
/* copy the in-memory version to the on-disk version */
dinom_le
=
(
struct
dinomap
*
)
mp
->
data
;
dinom_le
=
(
struct
dinomap
_disk
*
)
mp
->
data
;
dinom_le
->
in_freeiag
=
cpu_to_le32
(
imp
->
im_freeiag
);
dinom_le
->
in_nextiag
=
cpu_to_le32
(
imp
->
im_nextiag
);
dinom_le
->
in_numinos
=
cpu_to_le32
(
atomic_read
(
&
imp
->
im_numinos
));
...
...
@@ -1027,7 +1027,7 @@ int diFree(struct inode *ip)
*/
iagp
->
inofreefwd
=
cpu_to_le32
(
imap
->
im_agctl
[
agno
].
inofree
);
iagp
->
inofreeback
=
-
1
;
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
imap
->
im_agctl
[
agno
].
inofree
=
iagno
;
}
IREAD_UNLOCK
(
ipimap
);
...
...
@@ -1037,7 +1037,7 @@ int diFree(struct inode *ip)
* inodes (i.e., the inode being freed is the first free
* inode of extent),
*/
if
(
iagp
->
wmap
[
extno
]
==
ONES
)
{
if
(
iagp
->
wmap
[
extno
]
==
cpu_to_le32
(
ONES
)
)
{
sword
=
extno
>>
L2EXTSPERSUM
;
bitno
=
extno
&
(
EXTSPERSUM
-
1
);
iagp
->
inosmap
[
sword
]
&=
...
...
@@ -1185,7 +1185,7 @@ int diFree(struct inode *ip)
iagp
->
extfreefwd
=
cpu_to_le32
(
imap
->
im_agctl
[
agno
].
extfree
);
iagp
->
extfreeback
=
-
1
;
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
imap
->
im_agctl
[
agno
].
extfree
=
iagno
;
}
else
{
/* remove the iag from the ag extent list if all extents
...
...
@@ -1201,7 +1201,7 @@ int diFree(struct inode *ip)
imap
->
im_agctl
[
agno
].
extfree
=
le32_to_cpu
(
iagp
->
extfreefwd
);
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
-
1
;
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
IAGFREE_LOCK
(
imap
);
iagp
->
iagfree
=
cpu_to_le32
(
imap
->
im_freeiag
);
...
...
@@ -1223,7 +1223,7 @@ int diFree(struct inode *ip)
imap
->
im_agctl
[
agno
].
inofree
=
le32_to_cpu
(
iagp
->
inofreefwd
);
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
-
1
;
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
}
/* update the inode extent address and working map
...
...
@@ -2131,7 +2131,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
* allocated. if so, update the free inode summary
* map to reflect this.
*/
if
(
iagp
->
wmap
[
extno
]
==
ONES
)
{
if
(
iagp
->
wmap
[
extno
]
==
cpu_to_le32
(
ONES
)
)
{
sword
=
extno
>>
L2EXTSPERSUM
;
bitno
=
extno
&
(
EXTSPERSUM
-
1
);
iagp
->
inosmap
[
sword
]
|=
cpu_to_le32
(
HIGHORDER
>>
bitno
);
...
...
@@ -2153,7 +2153,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
imap
->
im_agctl
[
agno
].
inofree
=
le32_to_cpu
(
iagp
->
inofreefwd
);
}
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
-
1
;
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
}
/* update the free inode count at the iag, ag, inode
...
...
@@ -2362,7 +2362,7 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
imap
->
im_agctl
[
agno
].
extfree
=
le32_to_cpu
(
iagp
->
extfreefwd
);
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
-
1
;
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
}
else
{
/* if the iag has all free extents (newly allocated iag),
* add the iag to the ag free extent list.
...
...
@@ -2372,7 +2372,7 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
aiagp
->
extfreeback
=
cpu_to_le32
(
iagno
);
iagp
->
extfreefwd
=
cpu_to_le32
(
fwd
);
iagp
->
extfreeback
=
-
1
;
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
imap
->
im_agctl
[
agno
].
extfree
=
iagno
;
}
}
...
...
@@ -2386,7 +2386,7 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
iagp
->
inofreefwd
=
cpu_to_le32
(
imap
->
im_agctl
[
agno
].
inofree
);
iagp
->
inofreeback
=
-
1
;
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
imap
->
im_agctl
[
agno
].
inofree
=
iagno
;
}
...
...
@@ -2592,9 +2592,9 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
/* init the iag */
memset
(
iagp
,
0
,
sizeof
(
struct
iag
));
iagp
->
iagnum
=
cpu_to_le32
(
iagno
);
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
-
1
;
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
-
1
;
iagp
->
iagfree
=
-
1
;
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
iagp
->
iagfree
=
cpu_to_le32
(
-
1
)
;
iagp
->
nfreeinos
=
0
;
iagp
->
nfreeexts
=
cpu_to_le32
(
EXTSPERIAG
);
...
...
@@ -2602,7 +2602,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
* summary map initialization handled by bzero).
*/
for
(
i
=
0
;
i
<
SMAPSZ
;
i
++
)
iagp
->
inosmap
[
i
]
=
ONES
;
iagp
->
inosmap
[
i
]
=
cpu_to_le32
(
ONES
)
;
flush_metapage
(
mp
);
...
...
@@ -2676,7 +2676,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
/* remove the iag from the iag free list */
imap
->
im_freeiag
=
le32_to_cpu
(
iagp
->
iagfree
);
iagp
->
iagfree
=
-
1
;
iagp
->
iagfree
=
cpu_to_le32
(
-
1
)
;
/* set the return iag number and buffer pointer */
*
iagnop
=
iagno
;
...
...
@@ -2924,8 +2924,8 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
/* init per AG control information im_agctl[] */
for
(
i
=
0
;
i
<
MAXAG
;
i
++
)
{
imap
->
im_agctl
[
i
].
inofree
=
-
1
;
/* free inode list */
imap
->
im_agctl
[
i
].
extfree
=
-
1
;
/* free extent list */
imap
->
im_agctl
[
i
].
inofree
=
-
1
;
imap
->
im_agctl
[
i
].
extfree
=
-
1
;
imap
->
im_agctl
[
i
].
numinos
=
0
;
/* number of backed inodes */
imap
->
im_agctl
[
i
].
numfree
=
0
;
/* number of free backed inodes */
}
...
...
@@ -2970,18 +2970,18 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
/* if any backed free inodes, insert at AG free inode list */
if
((
int
)
le32_to_cpu
(
iagp
->
nfreeinos
)
>
0
)
{
if
((
head
=
imap
->
im_agctl
[
n
].
inofree
)
==
-
1
)
iagp
->
inofreefwd
=
iagp
->
inofreeback
=
-
1
;
else
{
if
((
head
=
imap
->
im_agctl
[
n
].
inofree
)
==
-
1
)
{
iagp
->
inofreefwd
=
cpu_to_le32
(
-
1
);
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
);
}
else
{
if
((
rc
=
diIAGRead
(
imap
,
head
,
&
hbp
)))
{
rcx
=
rc
;
goto
nextiag
;
}
hiagp
=
(
struct
iag
*
)
hbp
->
data
;
hiagp
->
inofreeback
=
le32_to_cpu
(
iagp
->
iagnum
);
hiagp
->
inofreeback
=
iagp
->
iagnum
;
iagp
->
inofreefwd
=
cpu_to_le32
(
head
);
iagp
->
inofreeback
=
-
1
;
iagp
->
inofreeback
=
cpu_to_le32
(
-
1
)
;
write_metapage
(
hbp
);
}
...
...
@@ -2996,9 +2996,10 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
/* if any free extents, insert at AG free extent list */
if
(
le32_to_cpu
(
iagp
->
nfreeexts
)
>
0
)
{
if
((
head
=
imap
->
im_agctl
[
n
].
extfree
)
==
-
1
)
iagp
->
extfreefwd
=
iagp
->
extfreeback
=
-
1
;
else
{
if
((
head
=
imap
->
im_agctl
[
n
].
extfree
)
==
-
1
)
{
iagp
->
extfreefwd
=
cpu_to_le32
(
-
1
);
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
);
}
else
{
if
((
rc
=
diIAGRead
(
imap
,
head
,
&
hbp
)))
{
rcx
=
rc
;
goto
nextiag
;
...
...
@@ -3006,7 +3007,7 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
hiagp
=
(
struct
iag
*
)
hbp
->
data
;
hiagp
->
extfreeback
=
iagp
->
iagnum
;
iagp
->
extfreefwd
=
cpu_to_le32
(
head
);
iagp
->
extfreeback
=
-
1
;
iagp
->
extfreeback
=
cpu_to_le32
(
-
1
)
;
write_metapage
(
hbp
);
}
...
...
@@ -3053,7 +3054,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
if
(
readSuper
(
sb
,
&
bh
))
return
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
j_sb
->
s_flag
|=
JFS_BAD_SAIT
;
j_sb
->
s_flag
|=
cpu_to_le32
(
JFS_BAD_SAIT
)
;
mark_buffer_dirty
(
bh
);
sync_dirty_buffer
(
bh
);
...
...
fs/jfs/jfs_imap.h
View file @
c157257b
...
...
@@ -60,16 +60,16 @@
* inode allocation group page (per 4096 inodes of an AG)
*/
struct
iag
{
s
64
agstart
;
/* 8: starting block of ag */
s
32
iagnum
;
/* 4: inode allocation group number */
s32
inofreefwd
;
/* 4: ag inode free list forward */
s
32
inofreeback
;
/* 4: ag inode free list back */
s32
extfreefwd
;
/* 4: ag inode extent free list forward */
s
32
extfreeback
;
/* 4: ag inode extent free list back */
s
32
iagfree
;
/* 4: iag free list */
__le
64
agstart
;
/* 8: starting block of ag */
__le
32
iagnum
;
/* 4: inode allocation group number */
__le32
inofreefwd
;
/* 4: ag inode free list forward */
__le
32
inofreeback
;
/* 4: ag inode free list back */
__le32
extfreefwd
;
/* 4: ag inode extent free list forward */
__le
32
extfreeback
;
/* 4: ag inode extent free list back */
__le
32
iagfree
;
/* 4: iag free list */
/* summary map: 1 bit per inode extent */
s
32
inosmap
[
SMAPSZ
];
/* 16: sum map of mapwords w/ free inodes;
__le
32
inosmap
[
SMAPSZ
];
/* 16: sum map of mapwords w/ free inodes;
* note: this indicates free and backed
* inodes, if the extent is not backed the
* value will be 1. if the extent is
...
...
@@ -78,43 +78,61 @@ struct iag {
* backed but at least one of the inodes is
* free the value will be 0.
*/
s
32
extsmap
[
SMAPSZ
];
/* 16: sum map of mapwords w/ free extents */
s
32
nfreeinos
;
/* 4: number of free inodes */
s
32
nfreeexts
;
/* 4: number of free extents */
__le
32
extsmap
[
SMAPSZ
];
/* 16: sum map of mapwords w/ free extents */
__le
32
nfreeinos
;
/* 4: number of free inodes */
__le
32
nfreeexts
;
/* 4: number of free extents */
/* (72) */
u8
pad
[
1976
];
/* 1976: pad to 2048 bytes */
/* allocation bit map: 1 bit per inode (0 - free, 1 - allocated) */
u
32
wmap
[
EXTSPERIAG
];
/* 512: working allocation map */
u
32
pmap
[
EXTSPERIAG
];
/* 512: persistent allocation map */
__le
32
wmap
[
EXTSPERIAG
];
/* 512: working allocation map */
__le
32
pmap
[
EXTSPERIAG
];
/* 512: persistent allocation map */
pxd_t
inoext
[
EXTSPERIAG
];
/* 1024: inode extent addresses */
};
/* (4096) */
/*
* per AG control information (in inode map control page)
*/
struct
iagctl
{
s
32
inofree
;
/* 4: free inode list anchor */
s
32
extfree
;
/* 4: free extent list anchor */
s
32
numinos
;
/* 4: number of backed inodes */
s
32
numfree
;
/* 4: number of free inodes */
struct
iagctl
_disk
{
__le
32
inofree
;
/* 4: free inode list anchor */
__le
32
extfree
;
/* 4: free extent list anchor */
__le
32
numinos
;
/* 4: number of backed inodes */
__le
32
numfree
;
/* 4: number of free inodes */
};
/* (16) */
struct
iagctl
{
int
inofree
;
/* free inode list anchor */
int
extfree
;
/* free extent list anchor */
int
numinos
;
/* number of backed inodes */
int
numfree
;
/* number of free inodes */
};
/*
* per fileset/aggregate inode map control page
*/
struct
dinomap
{
s32
in_freeiag
;
/* 4: free iag list anchor */
s32
in_nextiag
;
/* 4: next free iag number */
s32
in_numinos
;
/* 4: num of backed inodes */
s32
in_numfree
;
/* 4: num of free backed inodes */
s
32
in_nbperiext
;
/* 4: num of blocks per inode extent */
s
32
in_l2nbperiext
;
/* 4: l2 of in_nbperiext */
s
32
in_diskblock
;
/* 4: for standalone test driver */
s32
in_maxag
;
/* 4: for standalone test driver */
struct
dinomap
_disk
{
__le32
in_freeiag
;
/* 4: free iag list anchor */
__le32
in_nextiag
;
/* 4: next free iag number */
__le32
in_numinos
;
/* 4: num of backed inodes */
__le32
in_numfree
;
/* 4: num of free backed inodes */
__le
32
in_nbperiext
;
/* 4: num of blocks per inode extent */
__le
32
in_l2nbperiext
;
/* 4: l2 of in_nbperiext */
__le
32
in_diskblock
;
/* 4: for standalone test driver */
__le32
in_maxag
;
/* 4: for standalone test driver */
u8
pad
[
2016
];
/* 2016: pad to 2048 */
struct
iagctl
in_agctl
[
MAXAG
];
/* 2048: AG control information */
struct
iagctl
_disk
in_agctl
[
MAXAG
];
/* 2048: AG control information */
};
/* (4096) */
struct
dinomap
{
int
in_freeiag
;
/* free iag list anchor */
int
in_nextiag
;
/* next free iag number */
int
in_numinos
;
/* num of backed inodes */
int
in_numfree
;
/* num of free backed inodes */
int
in_nbperiext
;
/* num of blocks per inode extent */
int
in_l2nbperiext
;
/* l2 of in_nbperiext */
int
in_diskblock
;
/* for standalone test driver */
int
in_maxag
;
/* for standalone test driver */
struct
iagctl
in_agctl
[
MAXAG
];
/* AG control information */
};
/*
* In-core inode map control page
...
...
fs/jfs/jfs_logmgr.c
View file @
c157257b
...
...
@@ -161,9 +161,9 @@ do { \
/*
* Global list of active external journals
*/
LIST_HEAD
(
jfs_external_logs
);
struct
jfs_log
*
dummy_log
=
NULL
;
DECLARE_MUTEX
(
jfs_log_sem
);
static
LIST_HEAD
(
jfs_external_logs
);
st
atic
st
ruct
jfs_log
*
dummy_log
=
NULL
;
static
DECLARE_MUTEX
(
jfs_log_sem
);
/*
* external references
...
...
@@ -205,7 +205,7 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait);
* statistics
*/
#ifdef CONFIG_JFS_STATISTICS
struct
lmStat
{
st
atic
st
ruct
lmStat
{
uint
commit
;
/* # of commit */
uint
pagedone
;
/* # of page written */
uint
submitted
;
/* # of pages submitted */
...
...
@@ -1435,6 +1435,8 @@ int lmLogInit(struct jfs_log * log)
* unwind on error
*/
errout30:
/* release log page */
log
->
wqueue
=
NULL
;
bp
->
l_wqnext
=
NULL
;
lbmFree
(
bp
);
errout20:
/* release log superblock */
...
...
fs/jfs/jfs_logmgr.h
View file @
c157257b
...
...
@@ -62,17 +62,17 @@
#define MAX_ACTIVE 128
/* Max active file systems sharing log */
struct
logsuper
{
u
32
magic
;
/* 4: log lv identifier */
s
32
version
;
/* 4: version number */
s
32
serial
;
/* 4: log open/mount counter */
s
32
size
;
/* 4: size in number of LOGPSIZE blocks */
s
32
bsize
;
/* 4: logical block size in byte */
s
32
l2bsize
;
/* 4: log2 of bsize */
__le
32
magic
;
/* 4: log lv identifier */
__le
32
version
;
/* 4: version number */
__le
32
serial
;
/* 4: log open/mount counter */
__le
32
size
;
/* 4: size in number of LOGPSIZE blocks */
__le
32
bsize
;
/* 4: logical block size in byte */
__le
32
l2bsize
;
/* 4: log2 of bsize */
u
32
flag
;
/* 4: option */
u
32
state
;
/* 4: state - see below */
__le
32
flag
;
/* 4: option */
__le
32
state
;
/* 4: state - see below */
s
32
end
;
/* 4: addr of last log record set by logredo */
__le
32
end
;
/* 4: addr of last log record set by logredo */
char
uuid
[
16
];
/* 16: 128-bit journal uuid */
char
label
[
16
];
/* 16: journal label */
struct
{
...
...
@@ -121,17 +121,17 @@ struct logsuper {
*/
struct
logpage
{
struct
{
/* header */
s
32
page
;
/* 4: log sequence page number */
s
16
rsrvd
;
/* 2: */
s
16
eor
;
/* 2: end-of-log offset of lasrt record write */
__le
32
page
;
/* 4: log sequence page number */
__le
16
rsrvd
;
/* 2: */
__le
16
eor
;
/* 2: end-of-log offset of lasrt record write */
}
h
;
s
32
data
[
LOGPSIZE
/
4
-
4
];
/* log record area */
__le
32
data
[
LOGPSIZE
/
4
-
4
];
/* log record area */
struct
{
/* trailer */
s
32
page
;
/* 4: normally the same as h.page */
s
16
rsrvd
;
/* 2: */
s
16
eor
;
/* 2: normally the same as h.eor */
__le
32
page
;
/* 4: normally the same as h.page */
__le
16
rsrvd
;
/* 2: */
__le
16
eor
;
/* 2: normally the same as h.eor */
}
t
;
};
...
...
@@ -202,11 +202,11 @@ struct lrd {
/*
* type independent area
*/
s
32
logtid
;
/* 4: log transaction identifier */
s32
backchain
;
/* 4: ptr to prev record of same transaction */
u
16
type
;
/* 2: record type */
s
16
length
;
/* 2: length of data in record (in byte) */
u32
aggregate
;
/* 4: file system lv/aggregate */
__le
32
logtid
;
/* 4: log transaction identifier */
__le32
backchain
;
/* 4: ptr to prev record of same transaction */
__le
16
type
;
/* 2: record type */
__le
16
length
;
/* 2: length of data in record (in byte) */
__le32
aggregate
;
/* 4: file system lv/aggregate */
/* (16) */
/*
...
...
@@ -228,10 +228,10 @@ struct lrd {
* N.B. REDOPAGE, NOREDOPAGE, and UPDATEMAP must be same format;
*/
struct
{
u
32
fileset
;
/* 4: fileset number */
u
32
inode
;
/* 4: inode number */
u
16
type
;
/* 2: REDOPAGE record type */
s
16
l2linesize
;
/* 2: log2 of line size */
__le
32
fileset
;
/* 4: fileset number */
__le
32
inode
;
/* 4: inode number */
__le
16
type
;
/* 2: REDOPAGE record type */
__le
16
l2linesize
;
/* 2: log2 of line size */
pxd_t
pxd
;
/* 8: on-disk page pxd */
}
redopage
;
/* (20) */
...
...
@@ -244,10 +244,10 @@ struct lrd {
* N.B. REDOPAGE, NOREDOPAGE, and UPDATEMAP must be same format;
*/
struct
{
s
32
fileset
;
/* 4: fileset number */
u
32
inode
;
/* 4: inode number */
u
16
type
;
/* 2: NOREDOPAGE record type */
s
16
rsrvd
;
/* 2: reserved */
__le
32
fileset
;
/* 4: fileset number */
__le
32
inode
;
/* 4: inode number */
__le
16
type
;
/* 2: NOREDOPAGE record type */
__le
16
rsrvd
;
/* 2: reserved */
pxd_t
pxd
;
/* 8: on-disk page pxd */
}
noredopage
;
/* (20) */
...
...
@@ -260,10 +260,10 @@ struct lrd {
* N.B. REDOPAGE, NOREDOPAGE, and UPDATEMAP must be same format;
*/
struct
{
u
32
fileset
;
/* 4: fileset number */
u
32
inode
;
/* 4: inode number */
u
16
type
;
/* 2: UPDATEMAP record type */
s
16
nxd
;
/* 2: number of extents */
__le
32
fileset
;
/* 4: fileset number */
__le
32
inode
;
/* 4: inode number */
__le
16
type
;
/* 2: UPDATEMAP record type */
__le
16
nxd
;
/* 2: number of extents */
pxd_t
pxd
;
/* 8: pxd */
}
updatemap
;
/* (20) */
...
...
@@ -279,9 +279,9 @@ struct lrd {
*
*/
struct
{
s
32
fileset
;
/* 4: fileset number */
s
32
iagnum
;
/* 4: IAG number */
s
32
inoext_idx
;
/* 4: inode extent index */
__le
32
fileset
;
/* 4: fileset number */
__le
32
iagnum
;
/* 4: IAG number */
__le
32
inoext_idx
;
/* 4: inode extent index */
pxd_t
pxd
;
/* 8: on-disk page pxd */
}
noredoinoext
;
/* (20) */
...
...
@@ -291,7 +291,7 @@ struct lrd {
* replay log upto syncpt address specified;
*/
struct
{
s
32
sync
;
/* 4: syncpt address (0 = here) */
__le
32
sync
;
/* 4: syncpt address (0 = here) */
}
syncpt
;
/*
...
...
@@ -307,8 +307,8 @@ struct lrd {
* N.B.: nextents should be length of data/sizeof(xad_t)
*/
struct
{
s
32
type
;
/* 4: FREEXTENT record type */
s
32
nextent
;
/* 4: number of extents */
__le
32
type
;
/* 4: FREEXTENT record type */
__le
32
nextent
;
/* 4: number of extents */
/* data: PXD or XAD list */
}
freextent
;
...
...
@@ -327,8 +327,8 @@ struct lrd {
* replay of the
*/
struct
{
s
32
fileset
;
/* 4: fileset number */
u
32
inode
;
/* 4: inode number */
__le
32
fileset
;
/* 4: fileset number */
__le
32
inode
;
/* 4: inode number */
}
noredofile
;
/*
...
...
@@ -337,9 +337,9 @@ struct lrd {
* metadata type dependent
*/
struct
{
s
32
fileset
;
/* 4: fileset number */
u
32
inode
;
/* 4: inode number */
s
32
type
;
/* 4: NEWPAGE record type */
__le
32
fileset
;
/* 4: fileset number */
__le
32
inode
;
/* 4: inode number */
__le
32
type
;
/* 4: NEWPAGE record type */
pxd_t
pxd
;
/* 8: on-disk page pxd */
}
newpage
;
...
...
@@ -357,8 +357,8 @@ struct lrd {
* line vector descriptor
*/
struct
lvd
{
s
16
offset
;
s
16
length
;
__le
16
offset
;
__le
16
length
;
};
...
...
@@ -372,7 +372,7 @@ struct jfs_log {
*/
struct
list_head
journal_list
;
/* Global list */
struct
block_device
*
bdev
;
/* 4: log lv pointer */
s32
serial
;
/* 4: log mount serial number */
int
serial
;
/* 4: log mount serial number */
s64
base
;
/* @8: log extent address (inline log ) */
int
size
;
/* 4: log size in log page (in page) */
...
...
@@ -398,7 +398,7 @@ struct jfs_log {
/* commit */
uint
cflag
;
/* 4: */
struct
list_head
cqueue
;
/* FIFO commit queue */
struct
list_head
cqueue
;
/* FIFO commit queue */
struct
tblock
*
flush_tblk
;
/* tblk we're waiting on for flush */
int
gcrtc
;
/* 4: GC_READY transaction count */
struct
tblock
*
gclrt
;
/* 4: latest GC_READY transaction */
...
...
fs/jfs/jfs_metapage.c
View file @
c157257b
...
...
@@ -31,7 +31,7 @@
static
spinlock_t
meta_lock
=
SPIN_LOCK_UNLOCKED
;
#ifdef CONFIG_JFS_STATISTICS
struct
{
st
atic
st
ruct
{
uint
pagealloc
;
/* # of page allocations */
uint
pagefree
;
/* # of page frees */
uint
lockwait
;
/* # of sleeping lock_metapage() calls */
...
...
@@ -108,9 +108,9 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
}
}
static
inline
struct
metapage
*
alloc_metapage
(
int
no_wait
)
static
inline
struct
metapage
*
alloc_metapage
(
int
gfp_mask
)
{
return
mempool_alloc
(
metapage_mempool
,
no_wait
?
GFP_ATOMIC
:
GFP_NOFS
);
return
mempool_alloc
(
metapage_mempool
,
gfp_mask
);
}
static
inline
void
free_metapage
(
struct
metapage
*
mp
)
...
...
@@ -289,7 +289,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
*/
mp
=
NULL
;
if
(
JFS_IP
(
inode
)
->
fileset
==
AGGREGATE_I
)
{
mp
=
mempool_alloc
(
metapage_mempool
,
GFP_ATOMIC
);
mp
=
alloc_metapage
(
GFP_ATOMIC
);
if
(
!
mp
)
{
/*
* mempool is supposed to protect us from
...
...
@@ -306,7 +306,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
struct
metapage
*
mp2
;
spin_unlock
(
&
meta_lock
);
mp
=
mempool_alloc
(
metapage_mempool
,
GFP_NOFS
);
mp
=
alloc_metapage
(
GFP_NOFS
);
spin_lock
(
&
meta_lock
);
/* we dropped the meta_lock, we need to search the
...
...
fs/jfs/jfs_mount.c
View file @
c157257b
...
...
@@ -324,7 +324,7 @@ static int chkSuper(struct super_block *sb)
*/
/* validate fs signature */
if
(
strncmp
(
j_sb
->
s_magic
,
JFS_MAGIC
,
4
)
||
j_sb
->
s_version
>
cpu_to_le32
(
JFS_VERSION
)
)
{
le32_to_cpu
(
j_sb
->
s_version
)
>
JFS_VERSION
)
{
rc
=
-
EINVAL
;
goto
out
;
}
...
...
fs/jfs/jfs_superblock.h
View file @
c157257b
...
...
@@ -35,29 +35,29 @@
*/
struct
jfs_superblock
{
char
s_magic
[
4
];
/* 4: magic number */
u32
s_version
;
/* 4: version number */
__le32
s_version
;
/* 4: version number */
s
64
s_size
;
/* 8: aggregate size in hardware/LVM blocks;
__le
64
s_size
;
/* 8: aggregate size in hardware/LVM blocks;
* VFS: number of blocks
*/
s
32
s_bsize
;
/* 4: aggregate block size in bytes;
__le
32
s_bsize
;
/* 4: aggregate block size in bytes;
* VFS: fragment size
*/
s16
s_l2bsize
;
/* 2: log2 of s_bsize */
s
16
s_l2bfactor
;
/* 2: log2(s_bsize/hardware block size) */
s32
s_pbsize
;
/* 4: hardware/LVM block size in bytes */
s16
s_l2pbsize
;
/* 2: log2 of s_pbsize */
s
16
pad
;
/* 2: padding necessary for alignment */
__le16
s_l2bsize
;
/* 2: log2 of s_bsize */
__le
16
s_l2bfactor
;
/* 2: log2(s_bsize/hardware block size) */
__le32
s_pbsize
;
/* 4: hardware/LVM block size in bytes */
__le16
s_l2pbsize
;
/* 2: log2 of s_pbsize */
__le
16
pad
;
/* 2: padding necessary for alignment */
u32
s_agsize
;
/* 4: allocation group size in aggr. blocks */
__le32
s_agsize
;
/* 4: allocation group size in aggr. blocks */
u
32
s_flag
;
/* 4: aggregate attributes:
__le
32
s_flag
;
/* 4: aggregate attributes:
* see jfs_filsys.h
*/
u
32
s_state
;
/* 4: mount/unmount/recovery state:
__le
32
s_state
;
/* 4: mount/unmount/recovery state:
* see jfs_filsys.h
*/
s
32
s_compress
;
/* 4: > 0 if data compression */
__le
32
s_compress
;
/* 4: > 0 if data compression */
pxd_t
s_ait2
;
/* 8: first extent of secondary
* aggregate inode table
...
...
@@ -66,15 +66,15 @@ struct jfs_superblock {
pxd_t
s_aim2
;
/* 8: first extent of secondary
* aggregate inode map
*/
u
32
s_logdev
;
/* 4: device address of log */
s
32
s_logserial
;
/* 4: log serial number at aggregate mount */
__le
32
s_logdev
;
/* 4: device address of log */
__le
32
s_logserial
;
/* 4: log serial number at aggregate mount */
pxd_t
s_logpxd
;
/* 8: inline log extent */
pxd_t
s_fsckpxd
;
/* 8: inline fsck work space extent */
struct
timestruc_t
s_time
;
/* 8: time last updated */
s
32
s_fsckloglen
;
/* 4: Number of filesystem blocks reserved for
__le
32
s_fsckloglen
;
/* 4: Number of filesystem blocks reserved for
* the fsck service log.
* N.B. These blocks are divided among the
* versions kept. This is not a per
...
...
@@ -95,7 +95,7 @@ struct jfs_superblock {
*/
/* extendfs() parameter under s_state & FM_EXTENDFS */
s
64
s_xsize
;
/* 8: extendfs s_size */
__le
64
s_xsize
;
/* 8: extendfs s_size */
pxd_t
s_xfsckpxd
;
/* 8: extendfs fsckpxd */
pxd_t
s_xlogpxd
;
/* 8: extendfs logpxd */
/* - 128 byte boundary - */
...
...
fs/jfs/jfs_txnmgr.c
View file @
c157257b
...
...
@@ -80,7 +80,7 @@ static struct {
int
jfs_tlocks_low
;
/* Indicates low number of available tlocks */
#ifdef CONFIG_JFS_STATISTICS
struct
{
st
atic
st
ruct
{
uint
txBegin
;
uint
txBegin_barrier
;
uint
txBegin_lockslow
;
...
...
@@ -152,7 +152,7 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
/*
* statistics
*/
struct
{
st
atic
st
ruct
{
tid_t
maxtid
;
/* 4: biggest tid ever used */
lid_t
maxlid
;
/* 4: biggest lid ever used */
int
ntid
;
/* 4: # of transactions performed */
...
...
fs/jfs/jfs_types.h
View file @
c157257b
...
...
@@ -45,8 +45,8 @@ typedef u16 lid_t;
* Almost identical to Linux's timespec, but not quite
*/
struct
timestruc_t
{
u
32
tv_sec
;
u
32
tv_nsec
;
__le
32
tv_sec
;
__le
32
tv_nsec
;
};
/*
...
...
@@ -96,7 +96,7 @@ struct lxdlist {
typedef
struct
{
unsigned
len
:
24
;
unsigned
addr1
:
8
;
u
32
addr2
;
__le
32
addr2
;
}
pxd_t
;
/* xd_t field construction */
...
...
@@ -127,11 +127,11 @@ struct pxdlist {
*/
typedef
struct
{
unsigned
flag
:
8
;
/* 1: flags */
unsigned
rsrvd
:
24
;
/* 3: */
u
32
size
;
/* 4: size in byte */
unsigned
rsrvd
:
24
;
__le
32
size
;
/* 4: size in byte */
unsigned
len
:
24
;
/* 3: length in unit of fsblksize */
unsigned
addr1
:
8
;
/* 1: address in unit of fsblksize */
u
32
addr2
;
/* 4: address in unit of fsblksize */
__le
32
addr2
;
/* 4: address in unit of fsblksize */
}
dxd_t
;
/* - 16 - */
/* dxd_t flags */
...
...
@@ -168,10 +168,10 @@ struct dasd {
u8
delta
;
/* Alert Threshold delta (in percent) */
u8
rsrvd1
;
u8
limit_hi
;
/* DASD limit (in logical blocks) */
u32
limit_lo
;
/* DASD limit (in logical blocks) */
__le32
limit_lo
;
/* DASD limit (in logical blocks) */
u8
rsrvd2
[
3
];
u8
used_hi
;
/* DASD usage (in logical blocks) */
u
32
used_lo
;
/* DASD usage (in logical blocks) */
__le
32
used_lo
;
/* DASD usage (in logical blocks) */
};
#define DASDLIMIT(dasdp) \
...
...
fs/jfs/jfs_unicode.c
View file @
c157257b
...
...
@@ -29,7 +29,7 @@
* FUNCTION: Convert little-endian unicode string to character string
*
*/
int
jfs_strfromUCS_le
(
char
*
to
,
const
wchar_t
*
from
,
/* LITTLE ENDIAN */
int
jfs_strfromUCS_le
(
char
*
to
,
const
__le16
*
from
,
int
len
,
struct
nls_table
*
codepage
)
{
int
i
;
...
...
fs/jfs/jfs_unicode.h
View file @
c157257b
...
...
@@ -31,7 +31,7 @@ typedef struct {
extern
signed
char
UniUpperTable
[
512
];
extern
UNICASERANGE
UniUpperRange
[];
extern
int
get_UCSname
(
struct
component_name
*
,
struct
dentry
*
);
extern
int
jfs_strfromUCS_le
(
char
*
,
const
wchar_t
*
,
int
,
struct
nls_table
*
);
extern
int
jfs_strfromUCS_le
(
char
*
,
const
__le16
*
,
int
,
struct
nls_table
*
);
#define free_UCSname(COMP) kfree((COMP)->name)
...
...
@@ -51,10 +51,10 @@ static inline wchar_t *UniStrcpy(wchar_t * ucs1, const wchar_t * ucs2)
/*
* UniStrncpy: Copy length limited string with pad
*/
static
inline
wchar_t
*
UniStrncpy
(
wchar_t
*
ucs1
,
const
wchar_t
*
ucs2
,
static
inline
__le16
*
UniStrncpy_le
(
__le16
*
ucs1
,
const
__le16
*
ucs2
,
size_t
n
)
{
wchar_t
*
anchor
=
ucs1
;
__le16
*
anchor
=
ucs1
;
while
(
n
--
&&
*
ucs2
)
/* Copy the strings */
*
ucs1
++
=
*
ucs2
++
;
...
...
@@ -68,7 +68,7 @@ static inline wchar_t *UniStrncpy(wchar_t * ucs1, const wchar_t * ucs2,
/*
* UniStrncmp_le: Compare length limited string - native to little-endian
*/
static
inline
int
UniStrncmp_le
(
const
wchar_t
*
ucs1
,
const
wchar_t
*
ucs2
,
static
inline
int
UniStrncmp_le
(
const
wchar_t
*
ucs1
,
const
__le16
*
ucs2
,
size_t
n
)
{
if
(
!
n
)
...
...
@@ -81,10 +81,27 @@ static inline int UniStrncmp_le(const wchar_t * ucs1, const wchar_t * ucs2,
}
/*
* UniStrncpy_le: Copy length limited string with pad to little-endian
* UniStrncpy_to_le: Copy length limited string with pad to little-endian
*/
static
inline
__le16
*
UniStrncpy_to_le
(
__le16
*
ucs1
,
const
wchar_t
*
ucs2
,
size_t
n
)
{
__le16
*
anchor
=
ucs1
;
while
(
n
--
&&
*
ucs2
)
/* Copy the strings */
*
ucs1
++
=
cpu_to_le16
(
*
ucs2
++
);
n
++
;
while
(
n
--
)
/* Pad with nulls */
*
ucs1
++
=
0
;
return
anchor
;
}
/*
* UniStrncpy_from_le: Copy length limited string with pad from little-endian
*/
static
inline
wchar_t
*
UniStrncpy_
le
(
wchar_t
*
ucs1
,
const
wchar_t
*
ucs2
,
size_t
n
)
static
inline
wchar_t
*
UniStrncpy_
from_le
(
wchar_t
*
ucs1
,
const
__le16
*
ucs2
,
size_t
n
)
{
wchar_t
*
anchor
=
ucs1
;
...
...
@@ -97,7 +114,6 @@ static inline wchar_t *UniStrncpy_le(wchar_t * ucs1, const wchar_t * ucs2,
return
anchor
;
}
/*
* UniToupper: Convert a unicode character to upper case
*/
...
...
fs/jfs/jfs_xattr.h
View file @
c157257b
...
...
@@ -27,12 +27,12 @@
struct
jfs_ea
{
u8
flag
;
/* Unused? */
u8
namelen
;
/* Length of name */
u
16
valuelen
;
/* Length of value */
__le
16
valuelen
;
/* Length of value */
char
name
[
0
];
/* Attribute name (includes null-terminator) */
};
/* Value immediately follows name */
struct
jfs_ea_list
{
u
32
size
;
/* overall size */
__le
32
size
;
/* overall size */
struct
jfs_ea
ea
[
0
];
/* Variable length list */
};
...
...
fs/jfs/jfs_xtree.c
View file @
c157257b
...
...
@@ -958,7 +958,7 @@ xtSplitUp(tid_t tid,
/* is inode xtree root extension/inline EA area free ? */
if
((
sp
->
header
.
flag
&
BT_ROOT
)
&&
(
!
S_ISDIR
(
ip
->
i_mode
))
&&
(
sp
->
header
.
maxentry
<
cpu_to_le16
(
XTROOTMAXSLOT
)
)
&&
(
le16_to_cpu
(
sp
->
header
.
maxentry
)
<
XTROOTMAXSLOT
)
&&
(
JFS_IP
(
ip
)
->
mode2
&
INLINEEA
))
{
sp
->
header
.
maxentry
=
cpu_to_le16
(
XTROOTMAXSLOT
);
JFS_IP
(
ip
)
->
mode2
&=
~
INLINEEA
;
...
...
@@ -1622,7 +1622,6 @@ int xtExtend(tid_t tid, /* transaction id */
s64
xaddr
;
struct
tlock
*
tlck
;
struct
xtlock
*
xtlck
=
NULL
;
int
rootsplit
=
0
;
jfs_info
(
"xtExtend: nxoff:0x%lx nxlen:0x%x"
,
(
ulong
)
xoff
,
xlen
);
...
...
@@ -1678,8 +1677,6 @@ int xtExtend(tid_t tid, /* transaction id */
* The xtSplitUp() will insert the entry and unpin the leaf page.
*/
if
(
nextindex
==
le16_to_cpu
(
p
->
header
.
maxentry
))
{
rootsplit
=
p
->
header
.
flag
&
BT_ROOT
;
/* xtSpliUp() unpins leaf pages */
split
.
mp
=
mp
;
split
.
index
=
index
+
1
;
...
...
@@ -1691,16 +1688,21 @@ int xtExtend(tid_t tid, /* transaction id */
if
((
rc
=
xtSplitUp
(
tid
,
ip
,
&
split
,
&
btstack
)))
return
rc
;
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
/*
* if leaf root has been split, original root has been
* copied to new child page, i.e., original entry now
* resides on the new child page;
*/
if
(
rootsplit
)
{
if
(
p
->
header
.
flag
&
BT_INTERNAL
)
{
ASSERT
(
p
->
header
.
nextindex
==
cpu_to_le16
(
XTENTRYSTART
+
1
));
xad
=
&
p
->
xad
[
XTENTRYSTART
];
bn
=
addressXAD
(
xad
);
XT_PUTPAGE
(
mp
);
/* get new child page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
...
...
@@ -1712,11 +1714,6 @@ int xtExtend(tid_t tid, /* transaction id */
tlck
=
txLock
(
tid
,
ip
,
mp
,
tlckXTREE
|
tlckGROW
);
xtlck
=
(
struct
xtlock
*
)
&
tlck
->
lock
;
}
}
else
{
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
}
}
/*
...
...
@@ -1790,7 +1787,6 @@ int xtTailgate(tid_t tid, /* transaction id */
struct
xtlock
*
xtlck
=
0
;
struct
tlock
*
mtlck
;
struct
maplock
*
pxdlock
;
int
rootsplit
=
0
;
/*
printf("xtTailgate: nxoff:0x%lx nxlen:0x%x nxaddr:0x%lx\n",
...
...
@@ -1848,8 +1844,6 @@ printf("xtTailgate: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n",
* The xtSplitUp() will insert the entry and unpin the leaf page.
*/
if
(
nextindex
==
le16_to_cpu
(
p
->
header
.
maxentry
))
{
rootsplit
=
p
->
header
.
flag
&
BT_ROOT
;
/* xtSpliUp() unpins leaf pages */
split
.
mp
=
mp
;
split
.
index
=
index
+
1
;
...
...
@@ -1861,16 +1855,21 @@ printf("xtTailgate: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n",
if
((
rc
=
xtSplitUp
(
tid
,
ip
,
&
split
,
&
btstack
)))
return
rc
;
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
/*
* if leaf root has been split, original root has been
* copied to new child page, i.e., original entry now
* resides on the new child page;
*/
if
(
rootsplit
)
{
if
(
p
->
header
.
flag
&
BT_INTERNAL
)
{
ASSERT
(
p
->
header
.
nextindex
==
cpu_to_le16
(
XTENTRYSTART
+
1
));
xad
=
&
p
->
xad
[
XTENTRYSTART
];
bn
=
addressXAD
(
xad
);
XT_PUTPAGE
(
mp
);
/* get new child page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
...
...
@@ -1882,11 +1881,6 @@ printf("xtTailgate: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n",
tlck
=
txLock
(
tid
,
ip
,
mp
,
tlckXTREE
|
tlckGROW
);
xtlck
=
(
struct
xtlock
*
)
&
tlck
->
lock
;
}
}
else
{
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
}
}
/*
...
...
@@ -1976,7 +1970,7 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
s64
nxaddr
,
xaddr
;
struct
tlock
*
tlck
;
struct
xtlock
*
xtlck
=
NULL
;
int
rootsplit
=
0
,
newpage
=
0
;
int
newpage
=
0
;
/* there must exist extent to be tailgated */
nxoff
=
offsetXAD
(
nxad
);
...
...
@@ -2183,7 +2177,6 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
/* insert nXAD:recorded */
if
(
nextindex
==
le16_to_cpu
(
p
->
header
.
maxentry
))
{
rootsplit
=
p
->
header
.
flag
&
BT_ROOT
;
/* xtSpliUp() unpins leaf pages */
split
.
mp
=
mp
;
...
...
@@ -2196,16 +2189,21 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
if
((
rc
=
xtSplitUp
(
tid
,
ip
,
&
split
,
&
btstack
)))
return
rc
;
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
/*
* if leaf root has been split, original root has been
* copied to new child page, i.e., original entry now
* resides on the new child page;
*/
if
(
rootsplit
)
{
if
(
p
->
header
.
flag
&
BT_INTERNAL
)
{
ASSERT
(
p
->
header
.
nextindex
==
cpu_to_le16
(
XTENTRYSTART
+
1
));
xad
=
&
p
->
xad
[
XTENTRYSTART
];
bn
=
addressXAD
(
xad
);
XT_PUTPAGE
(
mp
);
/* get new child page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
...
...
@@ -2218,11 +2216,6 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
xtlck
=
(
struct
xtlock
*
)
&
tlck
->
lock
;
}
}
else
{
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
/* is nXAD on new page ? */
if
(
newindex
>
(
le16_to_cpu
(
p
->
header
.
maxentry
)
>>
1
))
{
...
...
@@ -2336,8 +2329,6 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
xlen
=
xlen
-
nxlen
;
xaddr
=
xaddr
+
nxlen
;
if
(
nextindex
==
le16_to_cpu
(
p
->
header
.
maxentry
))
{
rootsplit
=
p
->
header
.
flag
&
BT_ROOT
;
/*
printf("xtUpdate.updateLeft.split p:0x%p\n", p);
*/
...
...
@@ -2352,16 +2343,22 @@ printf("xtUpdate.updateLeft.split p:0x%p\n", p);
if
((
rc
=
xtSplitUp
(
tid
,
ip
,
&
split
,
&
btstack
)))
return
rc
;
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
/*
* if leaf root has been split, original root has been
* copied to new child page, i.e., original entry now
* resides on the new child page;
*/
if
(
rootsplit
)
{
if
(
p
->
header
.
flag
&
BT_INTERNAL
)
{
ASSERT
(
p
->
header
.
nextindex
==
cpu_to_le16
(
XTENTRYSTART
+
1
));
xad
=
&
p
->
xad
[
XTENTRYSTART
];
bn
=
addressXAD
(
xad
);
XT_PUTPAGE
(
mp
);
/* get new child page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
...
...
@@ -2373,11 +2370,6 @@ printf("xtUpdate.updateLeft.split p:0x%p\n", p);
tlck
=
txLock
(
tid
,
ip
,
mp
,
tlckXTREE
|
tlckGROW
);
xtlck
=
(
struct
xtlock
*
)
&
tlck
->
lock
;
}
}
else
{
/* get back old page */
XT_GETPAGE
(
ip
,
bn
,
mp
,
PSIZE
,
p
,
rc
);
if
(
rc
)
return
rc
;
}
}
else
{
/* if insert into middle, shift right remaining entries */
...
...
fs/jfs/jfs_xtree.h
View file @
c157257b
...
...
@@ -32,10 +32,10 @@ typedef struct xad {
unsigned
flag
:
8
;
/* 1: flag */
unsigned
rsvrd
:
16
;
/* 2: reserved */
unsigned
off1
:
8
;
/* 1: offset in unit of fsblksize */
u
32
off2
;
/* 4: offset in unit of fsblksize */
__le
32
off2
;
/* 4: offset in unit of fsblksize */
unsigned
len
:
24
;
/* 3: length in unit of fsblksize */
unsigned
addr1
:
8
;
/* 1: address in unit of fsblksize */
u
32
addr2
;
/* 4: address in unit of fsblksize */
__le
32
addr2
;
/* 4: address in unit of fsblksize */
}
xad_t
;
/* (16) */
#define MAXXLEN ((1 << 24) - 1)
...
...
@@ -90,14 +90,14 @@ struct xadlist {
*/
typedef
union
{
struct
xtheader
{
s
64
next
;
/* 8: */
s
64
prev
;
/* 8: */
__le
64
next
;
/* 8: */
__le
64
prev
;
/* 8: */
u8
flag
;
/* 1: */
u8
rsrvd1
;
/* 1: */
s
16
nextindex
;
/* 2: next index = number of entries */
s
16
maxentry
;
/* 2: max number of entries */
s
16
rsrvd2
;
/* 2: */
__le
16
nextindex
;
/* 2: next index = number of entries */
__le
16
maxentry
;
/* 2: max number of entries */
__le
16
rsrvd2
;
/* 2: */
pxd_t
self
;
/* 8: self */
}
header
;
/* (32) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment