git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into cont_syslog
[safe/jmp/linux-2.6]
/
fs
/
jfs
/
jfs_dtree.c
diff --git
a/fs/jfs/jfs_dtree.c
b/fs/jfs/jfs_dtree.c
index
6d62f32
..
9197a1b
100644
(file)
--- a/
fs/jfs/jfs_dtree.c
+++ b/
fs/jfs/jfs_dtree.c
@@
-102,6
+102,7
@@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include <linux/fs.h>
#include <linux/quotaops.h>
+#include <linux/slab.h>
#include "jfs_incore.h"
#include "jfs_superblock.h"
#include "jfs_filsys.h"
#include "jfs_incore.h"
#include "jfs_superblock.h"
#include "jfs_filsys.h"
@@
-284,11
+285,11
@@
static struct dir_table_slot *find_index(struct inode *ip, u32 index,
release_metapage(*mp);
*mp = NULL;
}
release_metapage(*mp);
*mp = NULL;
}
- if (
*mp == 0
) {
+ if (
!(*mp)
) {
*lblock = blkno;
*mp = read_index_page(ip, blkno);
}
*lblock = blkno;
*mp = read_index_page(ip, blkno);
}
- if (
*mp == 0
) {
+ if (
!(*mp)
) {
jfs_err("free_index: error reading directory table");
return NULL;
}
jfs_err("free_index: error reading directory table");
return NULL;
}
@@
-315,8
+316,8
@@
static inline void lock_index(tid_t tid, struct inode *ip, struct metapage * mp,
lv = &llck->lv[llck->index];
/*
lv = &llck->lv[llck->index];
/*
- * Linelock slot size is twice the size of directory table
- * slot size. 512 entries per page.
+ * Linelock slot size is twice the size of directory table
+ * slot size. 512 entries per page.
*/
lv->offset = ((index - 2) & 511) >> 1;
lv->length = 1;
*/
lv->offset = ((index - 2) & 511) >> 1;
lv->length = 1;
@@
-381,10
+382,10
@@
static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
* It's time to move the inline table to an external
* page and begin to build the xtree
*/
* It's time to move the inline table to an external
* page and begin to build the xtree
*/
- if (
DQUOT_ALLOC_BLOCK
(ip, sbi->nbperpage))
+ if (
dquot_alloc_block
(ip, sbi->nbperpage))
goto clean_up;
if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) {
goto clean_up;
if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) {
-
DQUOT_FREE_BLOCK
(ip, sbi->nbperpage);
+
dquot_free_block
(ip, sbi->nbperpage);
goto clean_up;
}
goto clean_up;
}
@@
-408,12
+409,13
@@
static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
memcpy(&jfs_ip->i_dirtable, temp_table,
sizeof (temp_table));
dbFree(ip, xaddr, sbi->nbperpage);
memcpy(&jfs_ip->i_dirtable, temp_table,
sizeof (temp_table));
dbFree(ip, xaddr, sbi->nbperpage);
-
DQUOT_FREE_BLOCK
(ip, sbi->nbperpage);
+
dquot_free_block
(ip, sbi->nbperpage);
goto clean_up;
}
ip->i_size = PSIZE;
goto clean_up;
}
ip->i_size = PSIZE;
- if ((mp = get_index_page(ip, 0)) == 0) {
+ mp = get_index_page(ip, 0);
+ if (!mp) {
jfs_err("add_index: get_metapage failed!");
xtTruncate(tid, ip, 0, COMMIT_PWMAP);
memcpy(&jfs_ip->i_dirtable, temp_table,
jfs_err("add_index: get_metapage failed!");
xtTruncate(tid, ip, 0, COMMIT_PWMAP);
memcpy(&jfs_ip->i_dirtable, temp_table,
@@
-461,7
+463,7
@@
static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
} else
mp = read_index_page(ip, blkno);
} else
mp = read_index_page(ip, blkno);
- if (
mp == 0
) {
+ if (
!mp
) {
jfs_err("add_index: get/read_metapage failed!");
goto clean_up;
}
jfs_err("add_index: get/read_metapage failed!");
goto clean_up;
}
@@
-499,7
+501,7
@@
static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next)
dirtab_slot = find_index(ip, index, &mp, &lblock);
dirtab_slot = find_index(ip, index, &mp, &lblock);
- if (
dirtab_slot == 0
)
+ if (
!dirtab_slot
)
return;
dirtab_slot->flag = DIR_INDEX_FREE;
return;
dirtab_slot->flag = DIR_INDEX_FREE;
@@
-520,13
+522,13
@@
static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next)
* Changes an entry in the directory index table
*/
static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn,
* Changes an entry in the directory index table
*/
static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn,
- int slot, struct metapage ** mp,
u
64 *lblock)
+ int slot, struct metapage ** mp,
s
64 *lblock)
{
struct dir_table_slot *dirtab_slot;
dirtab_slot = find_index(ip, index, mp, lblock);
{
struct dir_table_slot *dirtab_slot;
dirtab_slot = find_index(ip, index, mp, lblock);
- if (
dirtab_slot == 0
)
+ if (
!dirtab_slot
)
return;
DTSaddress(dirtab_slot, bn);
return;
DTSaddress(dirtab_slot, bn);
@@
-552,7
+554,7
@@
static int read_index(struct inode *ip, u32 index,
struct dir_table_slot *slot;
slot = find_index(ip, index, &mp, &lblock);
struct dir_table_slot *slot;
slot = find_index(ip, index, &mp, &lblock);
- if (
slot == 0
) {
+ if (
!slot
) {
return -EIO;
}
return -EIO;
}
@@
-592,10
+594,8
@@
int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
struct component_name ciKey;
struct super_block *sb = ip->i_sb;
struct component_name ciKey;
struct super_block *sb = ip->i_sb;
- ciKey.name =
- (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t),
- GFP_NOFS);
- if (ciKey.name == 0) {
+ ciKey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), GFP_NOFS);
+ if (!ciKey.name) {
rc = -ENOMEM;
goto dtSearch_Exit2;
}
rc = -ENOMEM;
goto dtSearch_Exit2;
}
@@
-615,7
+615,7
@@
int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
btstack->nsplit = 1;
/*
btstack->nsplit = 1;
/*
- * search down tree from root:
+ * search down tree from root:
*
* between two consecutive entries of <Ki, Pi> and <Kj, Pj> of
* internal page, child page Pi contains entry with k, Ki <= K < Kj.
*
* between two consecutive entries of <Ki, Pi> and <Kj, Pj> of
* internal page, child page Pi contains entry with k, Ki <= K < Kj.
@@
-659,7
+659,7
@@
int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
}
if (cmp == 0) {
/*
}
if (cmp == 0) {
/*
- * search hit
+ * search hit
*/
/* search hit - leaf page:
* return the entry found
*/
/* search hit - leaf page:
* return the entry found
@@
-723,7
+723,7
@@
int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
}
/*
}
/*
- * search miss
+ * search miss
*
* base is the smallest index with key (Kj) greater than
* search key (K) and may be zero or (maxindex + 1) index.
*
* base is the smallest index with key (Kj) greater than
* search key (K) and may be zero or (maxindex + 1) index.
@@
-773,7
+773,7
@@
int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
getChild:
/* update max. number of pages to split */
if (BT_STACK_FULL(btstack)) {
getChild:
/* update max. number of pages to split */
if (BT_STACK_FULL(btstack)) {
- /* Something's corrupted, mark filesytem dirty so
+ /* Something's corrupted, mark filesy
s
tem dirty so
* chkdsk will fix it.
*/
jfs_error(sb, "stack overrun in dtSearch!");
* chkdsk will fix it.
*/
jfs_error(sb, "stack overrun in dtSearch!");
@@
-834,7
+834,7
@@
int dtInsert(tid_t tid, struct inode *ip,
struct lv *lv;
/*
struct lv *lv;
/*
- * retrieve search result
+ * retrieve search result
*
* dtSearch() returns (leaf page pinned, index at which to insert).
* n.b. dtSearch() may return index of (maxindex + 1) of
*
* dtSearch() returns (leaf page pinned, index at which to insert).
* n.b. dtSearch() may return index of (maxindex + 1) of
@@
-843,7
+843,7
@@
int dtInsert(tid_t tid, struct inode *ip,
DT_GETSEARCH(ip, btstack->top, bn, mp, p, index);
/*
DT_GETSEARCH(ip, btstack->top, bn, mp, p, index);
/*
- * insert entry for new key
+ * insert entry for new key
*/
if (DO_INDEX(ip)) {
if (JFS_IP(ip)->next_index == DIREND) {
*/
if (DO_INDEX(ip)) {
if (JFS_IP(ip)->next_index == DIREND) {
@@
-860,9
+860,9
@@
int dtInsert(tid_t tid, struct inode *ip,
data.leaf.ino = *fsn;
/*
data.leaf.ino = *fsn;
/*
- * leaf page does not have enough room for new entry:
+ * leaf page does not have enough room for new entry:
*
*
- * extend/split the leaf page;
+ * extend/split the leaf page;
*
* dtSplitUp() will insert the entry and unpin the leaf page.
*/
*
* dtSplitUp() will insert the entry and unpin the leaf page.
*/
@@
-877,9
+877,9
@@
int dtInsert(tid_t tid, struct inode *ip,
}
/*
}
/*
- * leaf page does have enough room for new entry:
+ * leaf page does have enough room for new entry:
*
*
- * insert the new data entry into the leaf page;
+ * insert the new data entry into the leaf page;
*/
BT_MARK_DIRTY(mp, ip);
/*
*/
BT_MARK_DIRTY(mp, ip);
/*
@@
-957,23
+957,21
@@
static int dtSplitUp(tid_t tid,
smp = split->mp;
sp = DT_PAGE(ip, smp);
smp = split->mp;
sp = DT_PAGE(ip, smp);
- key.name =
- (wchar_t *) kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t),
- GFP_NOFS);
- if (key.name == 0) {
+ key.name = kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t), GFP_NOFS);
+ if (!key.name) {
DT_PUTPAGE(smp);
rc = -ENOMEM;
goto dtSplitUp_Exit;
}
/*
DT_PUTPAGE(smp);
rc = -ENOMEM;
goto dtSplitUp_Exit;
}
/*
- * split leaf page
+ * split leaf page
*
* The split routines insert the new entry, and
* acquire txLock as appropriate.
*/
/*
*
* The split routines insert the new entry, and
* acquire txLock as appropriate.
*/
/*
- * split root leaf page:
+ * split root leaf page:
*/
if (sp->header.flag & BT_ROOT) {
/*
*/
if (sp->header.flag & BT_ROOT) {
/*
@@
-1012,7
+1010,7
@@
static int dtSplitUp(tid_t tid,
}
/*
}
/*
- * extend first leaf page
+ * extend first leaf page
*
* extend the 1st extent if less than buffer page size
* (dtExtendPage() reurns leaf page unpinned)
*
* extend the 1st extent if less than buffer page size
* (dtExtendPage() reurns leaf page unpinned)
@@
-1030,10
+1028,9
@@
static int dtSplitUp(tid_t tid,
n = xlen;
/* Allocate blocks to quota. */
n = xlen;
/* Allocate blocks to quota. */
- if (DQUOT_ALLOC_BLOCK(ip, n)) {
- rc = -EDQUOT;
+ rc = dquot_alloc_block(ip, n);
+ if (rc)
goto extendOut;
goto extendOut;
- }
quota_allocation += n;
if ((rc = dbReAlloc(sbi->ipbmap, xaddr, (s64) xlen,
quota_allocation += n;
if ((rc = dbReAlloc(sbi->ipbmap, xaddr, (s64) xlen,
@@
-1068,7
+1065,7
@@
static int dtSplitUp(tid_t tid,
}
/*
}
/*
- * split leaf page <sp> into <sp> and a new right page <rp>.
+ * split leaf page <sp> into <sp> and a new right page <rp>.
*
* return <rp> pinned and its extent descriptor <rpxd>
*/
*
* return <rp> pinned and its extent descriptor <rpxd>
*/
@@
-1311,7
+1308,7
@@
static int dtSplitUp(tid_t tid,
/* Rollback quota allocation */
if (rc && quota_allocation)
/* Rollback quota allocation */
if (rc && quota_allocation)
-
DQUOT_FREE_BLOCK
(ip, quota_allocation);
+
dquot_free_block
(ip, quota_allocation);
dtSplitUp_Exit:
dtSplitUp_Exit:
@@
-1372,9
+1369,10
@@
static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
return -EIO;
/* Allocate blocks to quota. */
return -EIO;
/* Allocate blocks to quota. */
- if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) {
+ rc = dquot_alloc_block(ip, lengthPXD(pxd));
+ if (rc) {
release_metapage(rmp);
release_metapage(rmp);
- return
-EDQUOT
;
+ return
rc
;
}
jfs_info("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp);
}
jfs_info("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp);
@@
-1433,7
+1431,7
@@
static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
rp->header.freecnt = rp->header.maxslot - fsi;
/*
rp->header.freecnt = rp->header.maxslot - fsi;
/*
- * sequential append at tail: append without split
+ * sequential append at tail: append without split
*
* If splitting the last page on a level because of appending
* a entry to it (skip is maxentry), it's likely that the access is
*
* If splitting the last page on a level because of appending
* a entry to it (skip is maxentry), it's likely that the access is
@@
-1467,7
+1465,7
@@
static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
}
/*
}
/*
- * non-sequential insert (at possibly middle page)
+ * non-sequential insert (at possibly middle page)
*/
/*
*/
/*
@@
-1508,7
+1506,7
@@
static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
left = 0;
/*
left = 0;
/*
- * compute fill factor for split pages
+ * compute fill factor for split pages
*
* <nxt> traces the next entry to move to rp
* <off> traces the next entry to stay in sp
*
* <nxt> traces the next entry to move to rp
* <off> traces the next entry to stay in sp
@@
-1551,7
+1549,7
@@
static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
/* <nxt> poins to the 1st entry to move */
/*
/* <nxt> poins to the 1st entry to move */
/*
- * move entries to right page
+ * move entries to right page
*
* dtMoveEntry() initializes rp and reserves entry for insertion
*
*
* dtMoveEntry() initializes rp and reserves entry for insertion
*
@@
-1677,7
+1675,7
@@
static int dtExtendPage(tid_t tid,
return (rc);
/*
return (rc);
/*
- * extend the extent
+ * extend the extent
*/
pxdlist = split->pxdlist;
pxd = &pxdlist->pxd[pxdlist->npxd];
*/
pxdlist = split->pxdlist;
pxd = &pxdlist->pxd[pxdlist->npxd];
@@
-1722,7
+1720,7
@@
static int dtExtendPage(tid_t tid,
}
/*
}
/*
- * extend the page
+ * extend the page
*/
sp->header.self = *pxd;
*/
sp->header.self = *pxd;
@@
-1739,9
+1737,6
@@
static int dtExtendPage(tid_t tid,
/* update buffer extent descriptor of extended page */
xlen = lengthPXD(pxd);
xsize = xlen << JFS_SBI(sb)->l2bsize;
/* update buffer extent descriptor of extended page */
xlen = lengthPXD(pxd);
xsize = xlen << JFS_SBI(sb)->l2bsize;
-#ifdef _STILL_TO_PORT
- bmSetXD(smp, xaddr, xsize);
-#endif /* _STILL_TO_PORT */
/*
* copy old stbl to new stbl at start of extended area
/*
* copy old stbl to new stbl at start of extended area
@@
-1836,7
+1831,7
@@
static int dtExtendPage(tid_t tid,
}
/*
}
/*
- * update parent entry on the parent/root page
+ * update parent entry on the parent/root page
*/
/*
* acquire a transaction lock on the parent/root page
*/
/*
* acquire a transaction lock on the parent/root page
@@
-1898,13
+1893,14
@@
static int dtSplitRoot(tid_t tid,
struct dt_lock *dtlck;
struct tlock *tlck;
struct lv *lv;
struct dt_lock *dtlck;
struct tlock *tlck;
struct lv *lv;
+ int rc;
/* get split root page */
smp = split->mp;
sp = &JFS_IP(ip)->i_dtroot;
/*
/* get split root page */
smp = split->mp;
sp = &JFS_IP(ip)->i_dtroot;
/*
- * allocate/initialize a single (right) child page
+ * allocate/initialize a single (right) child page
*
* N.B. at first split, a one (or two) block to fit new entry
* is allocated; at subsequent split, a full page is allocated;
*
* N.B. at first split, a one (or two) block to fit new entry
* is allocated; at subsequent split, a full page is allocated;
@@
-1922,9
+1918,10
@@
static int dtSplitRoot(tid_t tid,
rp = rmp->data;
/* Allocate blocks to quota. */
rp = rmp->data;
/* Allocate blocks to quota. */
- if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) {
+ rc = dquot_alloc_block(ip, lengthPXD(pxd));
+ if (rc) {
release_metapage(rmp);
release_metapage(rmp);
- return
-EDQUOT
;
+ return
rc
;
}
BT_MARK_DIRTY(rmp, ip);
}
BT_MARK_DIRTY(rmp, ip);
@@
-1943,7
+1940,7
@@
static int dtSplitRoot(tid_t tid,
rp->header.prev = 0;
/*
rp->header.prev = 0;
/*
- * move in-line root page into new right page extent
+ * move in-line root page into new right page extent
*/
/* linelock header + copied entries + new stbl (1st slot) in new page */
ASSERT(dtlck->index == 0);
*/
/* linelock header + copied entries + new stbl (1st slot) in new page */
ASSERT(dtlck->index == 0);
@@
-2016,7
+2013,7
@@
static int dtSplitRoot(tid_t tid,
dtInsertEntry(rp, split->index, split->key, split->data, &dtlck);
/*
dtInsertEntry(rp, split->index, split->key, split->data, &dtlck);
/*
- * reset parent/root page
+ * reset parent/root page
*
* set the 1st entry offset to 0, which force the left-most key
* at any level of the tree to be less than any search key.
*
* set the 1st entry offset to 0, which force the left-most key
* at any level of the tree to be less than any search key.
@@
-2102,7
+2099,7
@@
int dtDelete(tid_t tid,
dtpage_t *np;
/*
dtpage_t *np;
/*
- * search for the entry to delete:
+ * search for the entry to delete:
*
* dtSearch() returns (leaf page pinned, index at which to delete).
*/
*
* dtSearch() returns (leaf page pinned, index at which to delete).
*/
@@
-2253,7
+2250,7
@@
static int dtDeleteUp(tid_t tid, struct inode *ip,
int i;
/*
int i;
/*
- * keep the root leaf page which has become empty
+ * keep the root leaf page which has become empty
*/
if (BT_IS_ROOT(fmp)) {
/*
*/
if (BT_IS_ROOT(fmp)) {
/*
@@
-2269,7
+2266,7
@@
static int dtDeleteUp(tid_t tid, struct inode *ip,
}
/*
}
/*
- * free the non-root leaf page
+ * free the non-root leaf page
*/
/*
* acquire a transaction lock on the page
*/
/*
* acquire a transaction lock on the page
@@
-2293,13
+2290,13
@@
static int dtDeleteUp(tid_t tid, struct inode *ip,
xlen = lengthPXD(&fp->header.self);
/* Free quota allocation. */
xlen = lengthPXD(&fp->header.self);
/* Free quota allocation. */
-
DQUOT_FREE_BLOCK
(ip, xlen);
+
dquot_free_block
(ip, xlen);
/* free/invalidate its buffer page */
discard_metapage(fmp);
/*
/* free/invalidate its buffer page */
discard_metapage(fmp);
/*
- * propagate page deletion up the directory tree
+ * propagate page deletion up the directory tree
*
* If the delete from the parent page makes it empty,
* continue all the way up the tree.
*
* If the delete from the parent page makes it empty,
* continue all the way up the tree.
@@
-2369,7
+2366,7
@@
static int dtDeleteUp(tid_t tid, struct inode *ip,
xlen = lengthPXD(&p->header.self);
/* Free quota allocation */
xlen = lengthPXD(&p->header.self);
/* Free quota allocation */
-
DQUOT_FREE_BLOCK
(ip, xlen);
+
dquot_free_block
(ip, xlen);
/* free/invalidate its buffer page */
discard_metapage(mp);
/* free/invalidate its buffer page */
discard_metapage(mp);
@@
-2440,10
+2437,10
@@
static int dtDeleteUp(tid_t tid, struct inode *ip,
#ifdef _NOTYET
/*
#ifdef _NOTYET
/*
- * NAME:
dtRelocate()
+ * NAME: dtRelocate()
*
*
- * FUNCTION:
relocate dtpage (internal or leaf) of directory;
- *
This function is mainly used by defragfs utility.
+ * FUNCTION: relocate dtpage (internal or leaf) of directory;
+ * This function is mainly used by defragfs utility.
*/
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
s64 nxaddr)
*/
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
s64 nxaddr)
@@
-2471,8
+2468,8
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
xlen);
/*
xlen);
/*
- * 1. get the internal parent dtpage covering
- * router entry for the tartget page to be relocated;
+ * 1. get the internal parent dtpage covering
+ * router entry for the tartget page to be relocated;
*/
rc = dtSearchNode(ip, lmxaddr, opxd, &btstack);
if (rc)
*/
rc = dtSearchNode(ip, lmxaddr, opxd, &btstack);
if (rc)
@@
-2483,7
+2480,7
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
jfs_info("dtRelocate: parent router entry validated.");
/*
jfs_info("dtRelocate: parent router entry validated.");
/*
- * 2. relocate the target dtpage
+ * 2. relocate the target dtpage
*/
/* read in the target page from src extent */
DT_GETPAGE(ip, oxaddr, mp, PSIZE, p, rc);
*/
/* read in the target page from src extent */
DT_GETPAGE(ip, oxaddr, mp, PSIZE, p, rc);
@@
-2581,9
+2578,7
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
/* update the buffer extent descriptor of the dtpage */
xsize = xlen << JFS_SBI(ip->i_sb)->l2bsize;
/* update the buffer extent descriptor of the dtpage */
xsize = xlen << JFS_SBI(ip->i_sb)->l2bsize;
-#ifdef _STILL_TO_PORT
- bmSetXD(mp, nxaddr, xsize);
-#endif /* _STILL_TO_PORT */
+
/* unpin the relocated page */
DT_PUTPAGE(mp);
jfs_info("dtRelocate: target dtpage relocated.");
/* unpin the relocated page */
DT_PUTPAGE(mp);
jfs_info("dtRelocate: target dtpage relocated.");
@@
-2594,7
+2589,7
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
*/
/*
*/
/*
- * 3. acquire maplock for the source extent to be freed;
+ * 3. acquire maplock for the source extent to be freed;
*/
/* for dtpage relocation, write a LOG_NOREDOPAGE record
* for the source dtpage (logredo() will init NoRedoPage
*/
/* for dtpage relocation, write a LOG_NOREDOPAGE record
* for the source dtpage (logredo() will init NoRedoPage
@@
-2609,7
+2604,7
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
pxdlock->index = 1;
/*
pxdlock->index = 1;
/*
- * 4. update the parent router entry for relocation;
+ * 4. update the parent router entry for relocation;
*
* acquire tlck for the parent entry covering the target dtpage;
* write LOG_REDOPAGE to apply after image only;
*
* acquire tlck for the parent entry covering the target dtpage;
* write LOG_REDOPAGE to apply after image only;
@@
-2637,7
+2632,7
@@
int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
* NAME: dtSearchNode()
*
* FUNCTION: Search for an dtpage containing a specified address
* NAME: dtSearchNode()
*
* FUNCTION: Search for an dtpage containing a specified address
- *
This function is mainly used by defragfs utility.
+ * This function is mainly used by defragfs utility.
*
* NOTE: Search result on stack, the found page is pinned at exit.
* The result page must be an internal dtpage.
*
* NOTE: Search result on stack, the found page is pinned at exit.
* The result page must be an internal dtpage.
@@
-2660,7
+2655,7
@@
static int dtSearchNode(struct inode *ip, s64 lmxaddr, pxd_t * kpxd,
BT_CLR(btstack); /* reset stack */
/*
BT_CLR(btstack); /* reset stack */
/*
- * descend tree to the level with specified leftmost page
+ * descend tree to the level with specified leftmost page
*
* by convention, root bn = 0.
*/
*
* by convention, root bn = 0.
*/
@@
-2699,7
+2694,7
@@
static int dtSearchNode(struct inode *ip, s64 lmxaddr, pxd_t * kpxd,
}
/*
}
/*
- * search each page at the current levevl
+ * search each page at the current levevl
*/
loop:
stbl = DT_GETSTBL(p);
*/
loop:
stbl = DT_GETSTBL(p);
@@
-3044,9
+3039,9
@@
int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
if (DO_INDEX(ip)) {
/*
* persistent index is stored in directory entries.
if (DO_INDEX(ip)) {
/*
* persistent index is stored in directory entries.
- * Special cases: 0 = .
- * 1 = ..
- * -1 = End of directory
+ * Special cases: 0 = .
+ * 1 = ..
+ * -1 = End of directory
*/
do_index = 1;
*/
do_index = 1;
@@
-3128,10
+3123,10
@@
int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
/*
* Legacy filesystem - OS/2 & Linux JFS < 0.3.6
*
/*
* Legacy filesystem - OS/2 & Linux JFS < 0.3.6
*
- * pn = index = 0: First entry "."
- * pn = 0; index = 1: Second entry ".."
- * pn > 0: Real entries, pn=1 -> leftmost page
- * pn = index = -1: No more entries
+ * pn = index = 0: First entry "."
+ * pn = 0; index = 1: Second entry ".."
+ * pn > 0: Real entries, pn=1 -> leftmost page
+ * pn = index = -1: No more entries
*/
dtpos = filp->f_pos;
if (dtpos == 0) {
*/
dtpos = filp->f_pos;
if (dtpos == 0) {
@@
-3351,7
+3346,7
@@
static int dtReadFirst(struct inode *ip, struct btstack * btstack)
BT_CLR(btstack); /* reset stack */
/*
BT_CLR(btstack); /* reset stack */
/*
- * descend leftmost path of the tree
+ * descend leftmost path of the tree
*
* by convention, root bn = 0.
*/
*
* by convention, root bn = 0.
*/
@@
-4531,7
+4526,7
@@
int dtModify(tid_t tid, struct inode *ip,
struct ldtentry *entry;
/*
struct ldtentry *entry;
/*
- * search for the entry to modify:
+ * search for the entry to modify:
*
* dtSearch() returns (leaf page pinned, index at which to modify).
*/
*
* dtSearch() returns (leaf page pinned, index at which to modify).
*/