Commit 6e5f0131 authored by Dave Kleikamp's avatar Dave Kleikamp

Merge bk://linux.bkbits.net/linux-2.5

into hostme.bitkeeper.com:/ua/repos/j/jfs/linux-2.5
parents c92cacc2 94a9de9c
...@@ -85,7 +85,7 @@ int jfs_commit_inode(struct inode *inode, int wait) ...@@ -85,7 +85,7 @@ int jfs_commit_inode(struct inode *inode, int wait)
tid_t tid; tid_t tid;
static int noisy = 5; static int noisy = 5;
jFYI(1, ("In jfs_commit_inode, inode = 0x%p\n", inode)); jfs_info("In jfs_commit_inode, inode = 0x%p", inode);
/* /*
* Don't commit if inode has been committed since last being * Don't commit if inode has been committed since last being
...@@ -100,9 +100,9 @@ int jfs_commit_inode(struct inode *inode, int wait) ...@@ -100,9 +100,9 @@ int jfs_commit_inode(struct inode *inode, int wait)
* partitions and may think inode is dirty * partitions and may think inode is dirty
*/ */
if (!special_file(inode->i_mode) && noisy) { if (!special_file(inode->i_mode) && noisy) {
jERROR(1, ("jfs_commit_inode(0x%p) called on " jfs_err("jfs_commit_inode(0x%p) called on "
"read-only volume\n", inode)); "read-only volume", inode);
jERROR(1, ("Is remount racy?\n")); jfs_err("Is remount racy?");
noisy--; noisy--;
} }
return 0; return 0;
...@@ -128,13 +128,13 @@ void jfs_write_inode(struct inode *inode, int wait) ...@@ -128,13 +128,13 @@ void jfs_write_inode(struct inode *inode, int wait)
return; return;
if (jfs_commit_inode(inode, wait)) { if (jfs_commit_inode(inode, wait)) {
jERROR(1, ("jfs_write_inode: jfs_commit_inode failed!\n")); jfs_err("jfs_write_inode: jfs_commit_inode failed!");
} }
} }
void jfs_delete_inode(struct inode *inode) void jfs_delete_inode(struct inode *inode)
{ {
jFYI(1, ("In jfs_delete_inode, inode = 0x%p\n", inode)); jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
if (test_cflag(COMMIT_Freewmap, inode)) if (test_cflag(COMMIT_Freewmap, inode))
freeZeroLink(inode); freeZeroLink(inode);
...@@ -153,9 +153,8 @@ void jfs_dirty_inode(struct inode *inode) ...@@ -153,9 +153,8 @@ void jfs_dirty_inode(struct inode *inode)
/* kernel allows writes to devices on read-only /* kernel allows writes to devices on read-only
* partitions and may try to mark inode dirty * partitions and may try to mark inode dirty
*/ */
jERROR(1, ("jfs_dirty_inode called on " jfs_err("jfs_dirty_inode called on read-only volume");
"read-only volume\n")); jfs_err("Is remount racy?");
jERROR(1, ("Is remount racy?\n"));
noisy--; noisy--;
} }
return; return;
...@@ -302,7 +301,7 @@ static int jfs_readpages(struct file *file, struct address_space *mapping, ...@@ -302,7 +301,7 @@ static int jfs_readpages(struct file *file, struct address_space *mapping,
static int jfs_prepare_write(struct file *file, static int jfs_prepare_write(struct file *file,
struct page *page, unsigned from, unsigned to) struct page *page, unsigned from, unsigned to)
{ {
return block_prepare_write(page, from, to, jfs_get_block); return nobh_prepare_write(page, from, to, jfs_get_block);
} }
static sector_t jfs_bmap(struct address_space *mapping, sector_t block) static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
...@@ -327,7 +326,7 @@ struct address_space_operations jfs_aops = { ...@@ -327,7 +326,7 @@ struct address_space_operations jfs_aops = {
.writepages = jfs_writepages, .writepages = jfs_writepages,
.sync_page = block_sync_page, .sync_page = block_sync_page,
.prepare_write = jfs_prepare_write, .prepare_write = jfs_prepare_write,
.commit_write = generic_commit_write, .commit_write = nobh_commit_write,
.bmap = jfs_bmap, .bmap = jfs_bmap,
.direct_IO = jfs_direct_IO, .direct_IO = jfs_direct_IO,
}; };
...@@ -378,9 +377,9 @@ void jfs_truncate_nolock(struct inode *ip, loff_t length) ...@@ -378,9 +377,9 @@ void jfs_truncate_nolock(struct inode *ip, loff_t length)
void jfs_truncate(struct inode *ip) void jfs_truncate(struct inode *ip)
{ {
jFYI(1, ("jfs_truncate: size = 0x%lx\n", (ulong) ip->i_size)); jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size);
block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); nobh_truncate_page(ip->i_mapping, ip->i_size);
IWRITE_LOCK(ip); IWRITE_LOCK(ip);
jfs_truncate_nolock(ip, ip->i_size); jfs_truncate_nolock(ip, ip->i_size);
......
...@@ -71,19 +71,16 @@ struct btpage { ...@@ -71,19 +71,16 @@ struct btpage {
MP = (struct metapage *)&JFS_IP(IP)->bxflag;\ MP = (struct metapage *)&JFS_IP(IP)->bxflag;\
P = (TYPE *)&JFS_IP(IP)->ROOT;\ P = (TYPE *)&JFS_IP(IP)->ROOT;\
RC = 0;\ RC = 0;\
jEVENT(0,("%d BT_GETPAGE returning root\n", __LINE__));\
}\ }\
else\ else\
{\ {\
jEVENT(0,("%d BT_GETPAGE reading block %d\n", __LINE__,\
(int)BN));\
MP = read_metapage((IP), BN, SIZE, 1);\ MP = read_metapage((IP), BN, SIZE, 1);\
if (MP) {\ if (MP) {\
RC = 0;\ RC = 0;\
P = (MP)->data;\ P = (MP)->data;\
} else {\ } else {\
P = NULL;\ P = NULL;\
jERROR(1,("bread failed!\n"));\ jfs_err("bread failed!");\
RC = EIO;\ RC = EIO;\
}\ }\
}\ }\
......
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
/* kgdb stuff */ /* kgdb stuff */
#define assert(p) KERNEL_ASSERT(#p, p) #define assert(p) KERNEL_ASSERT(#p, p)
#else #else
#define assert(p) {\ #define assert(p) do { \
if (!(p))\ if (!(p)) { \
{\ printk(KERN_CRIT "BUG at %s:%d assert(%s)\n", \
printk("assert(%s)\n",#p);\ __FILE__, __LINE__, #p); \
BUG();\ BUG(); \
}\ } \
} } while (0)
#endif #endif
/* /*
...@@ -57,33 +57,53 @@ if (!(p))\ ...@@ -57,33 +57,53 @@ if (!(p))\
#ifdef CONFIG_JFS_DEBUG #ifdef CONFIG_JFS_DEBUG
#define ASSERT(p) assert(p) #define ASSERT(p) assert(p)
/* printk verbosity */
#define JFS_LOGLEVEL_ERR 1
#define JFS_LOGLEVEL_WARN 2
#define JFS_LOGLEVEL_DEBUG 3
#define JFS_LOGLEVEL_INFO 4
extern int jfsloglevel;
/* dump memory contents */ /* dump memory contents */
extern void dump_mem(char *label, void *data, int length); extern void dump_mem(char *label, void *data, int length);
extern int jfsloglevel;
/* information message: e.g., configuration, major event */ /* information message: e.g., configuration, major event */
#define jFYI(button, prspec) \ #define jfs_info(fmt, arg...) do { \
do { if (button && jfsloglevel > 1) printk prspec; } while (0) if (jfsloglevel >= JFS_LOGLEVEL_INFO) \
printk(KERN_INFO fmt "\n", ## arg); \
} while (0)
/* error event message: e.g., i/o error */ /* debug message: ad hoc */
extern int jfsERROR; #define jfs_debug(fmt, arg...) do { \
#define jERROR(button, prspec) \ if (jfsloglevel >= JFS_LOGLEVEL_DEBUG) \
do { if (button && jfsloglevel > 0) { printk prspec; } } while (0) printk(KERN_DEBUG fmt "\n", ## arg); \
} while (0)
/* warn message: */
#define jfs_warn(fmt, arg...) do { \
if (jfsloglevel >= JFS_LOGLEVEL_WARN) \
printk(KERN_WARNING fmt "\n", ## arg); \
} while (0)
/* debug event message: */ /* error event message: e.g., i/o error */
#define jEVENT(button,prspec) \ #define jfs_err(fmt, arg...) do { \
do { if (button) printk prspec; } while (0) if (jfsloglevel >= JFS_LOGLEVEL_ERR) \
printk(KERN_ERR "%s:%d " fmt "\n", \
__FILE__, __LINE__, ## arg); \
} while (0)
/* /*
* debug OFF * debug OFF
* --------- * ---------
*/ */
#else /* CONFIG_JFS_DEBUG */ #else /* CONFIG_JFS_DEBUG */
#define dump_mem(label,data,length) #define dump_mem(label,data,length) do {} while (0)
#define ASSERT(p) #define ASSERT(p) do {} while (0)
#define jEVENT(button,prspec) #define jfs_info(fmt, arg...) do {} while (0)
#define jERROR(button,prspec) #define jfs_debug(fmt, arg...) do {} while (0)
#define jFYI(button,prspec) #define jfs_warn(fmt, arg...) do {} while (0)
#define jfs_err(fmt, arg...) do {} while (0)
#endif /* CONFIG_JFS_DEBUG */ #endif /* CONFIG_JFS_DEBUG */
/* /*
......
...@@ -314,7 +314,7 @@ int dbSync(struct inode *ipbmap) ...@@ -314,7 +314,7 @@ int dbSync(struct inode *ipbmap)
BMAPBLKNO << JFS_SBI(ipbmap->i_sb)->l2nbperpage, BMAPBLKNO << JFS_SBI(ipbmap->i_sb)->l2nbperpage,
PSIZE, 0); PSIZE, 0);
if (mp == NULL) { if (mp == NULL) {
jERROR(1,("dbSync: read_metapage failed!\n")); jfs_err("dbSync: read_metapage failed!");
return (EIO); return (EIO);
} }
/* copy the in-memory version of the bmap to the on-disk version */ /* copy the in-memory version of the bmap to the on-disk version */
...@@ -1444,10 +1444,10 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) ...@@ -1444,10 +1444,10 @@ dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results)
/* assert(!(rc == ENOSPC && bmp->db_agfree[agno] == bmp->db_agsize)); */ /* assert(!(rc == ENOSPC && bmp->db_agfree[agno] == bmp->db_agsize)); */
if ((rc == ENOSPC) && if ((rc == ENOSPC) &&
(bmp->db_agfree[agno] == bmp->db_agsize)) { (bmp->db_agfree[agno] == bmp->db_agsize)) {
jERROR(1, jfs_err("dbAllocAG: removed assert, but still need to "
("dbAllocAG: removed assert, but still need to debug here\nblkno = 0x%Lx, nblocks = 0x%Lx\n", "debug here\nblkno = 0x%Lx, nblocks = 0x%Lx",
(unsigned long long) blkno, (unsigned long long) blkno,
(unsigned long long) nblocks)); (unsigned long long) nblocks);
} }
return (rc); return (rc);
} }
...@@ -1829,8 +1829,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) ...@@ -1829,8 +1829,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
* to indicate that we have leaked blocks. * to indicate that we have leaked blocks.
*/ */
fsDirty(); /* !!! */ fsDirty(); /* !!! */
jERROR(1, jfs_err("dbAllocCtl: I/O Error: Block Leakage.");
("dbAllocCtl: I/O Error: Block Leakage.\n"));
continue; continue;
} }
dp = (struct dmap *) mp->data; dp = (struct dmap *) mp->data;
...@@ -1843,7 +1842,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) ...@@ -1843,7 +1842,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
*/ */
release_metapage(mp); release_metapage(mp);
fsDirty(); /* !!! */ fsDirty(); /* !!! */
jERROR(1, ("dbAllocCtl: Block Leakage.\n")); jfs_err("dbAllocCtl: Block Leakage.");
continue; continue;
} }
...@@ -3276,9 +3275,8 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) ...@@ -3276,9 +3275,8 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks)
newsize = blkno + nblocks; newsize = blkno + nblocks;
jEVENT(0, ("dbExtendFS: blkno:%Ld nblocks:%Ld newsize:%Ld\n", jfs_info("dbExtendFS: blkno:%Ld nblocks:%Ld newsize:%Ld",
(long long) blkno, (long long) nblocks, (long long) blkno, (long long) nblocks, (long long) newsize);
(long long) newsize));
/* /*
* initialize bmap control page. * initialize bmap control page.
......
...@@ -130,7 +130,7 @@ struct dtsplit { ...@@ -130,7 +130,7 @@ struct dtsplit {
if (((P)->header.nextindex > (((BN)==0)?DTROOTMAXSLOT:(P)->header.maxslot)) ||\ if (((P)->header.nextindex > (((BN)==0)?DTROOTMAXSLOT:(P)->header.maxslot)) ||\
((BN) && ((P)->header.maxslot > DTPAGEMAXSLOT)))\ ((BN) && ((P)->header.maxslot > DTPAGEMAXSLOT)))\
{\ {\
jERROR(1,("DT_GETPAGE: dtree page corrupt\n"));\ jfs_err("DT_GETPAGE: dtree page corrupt");\
BT_PUTPAGE(MP);\ BT_PUTPAGE(MP);\
updateSuper((IP)->i_sb, FM_DIRTY);\ updateSuper((IP)->i_sb, FM_DIRTY);\
MP = NULL;\ MP = NULL;\
...@@ -241,15 +241,14 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, ...@@ -241,15 +241,14 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index,
if (index < 2) { if (index < 2) {
if (maxWarnings) { if (maxWarnings) {
jERROR(1, ("find_entry called with index = %d\n", jfs_warn("find_entry called with index = %d", index);
index));
maxWarnings--; maxWarnings--;
} }
return 0; return 0;
} }
if (index >= jfs_ip->next_index) { if (index >= jfs_ip->next_index) {
jFYI(1, ("find_entry called with index >= next_index\n")); jfs_warn("find_entry called with index >= next_index");
return 0; return 0;
} }
...@@ -274,8 +273,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, ...@@ -274,8 +273,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index,
*mp = read_index_page(ip, blkno); *mp = read_index_page(ip, blkno);
} }
if (*mp == 0) { if (*mp == 0) {
jERROR(1, jfs_err("free_index: error reading directory table");
("free_index: error reading directory table\n"));
return 0; return 0;
} }
...@@ -336,8 +334,8 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot) ...@@ -336,8 +334,8 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
ASSERT(DO_INDEX(ip)); ASSERT(DO_INDEX(ip));
if (jfs_ip->next_index < 2) { if (jfs_ip->next_index < 2) {
jERROR(1, ("next_index = %d. Please fix this!\n", jfs_warn("add_index: next_index = %d. Resetting!",
jfs_ip->next_index)); jfs_ip->next_index);
jfs_ip->next_index = 2; jfs_ip->next_index = 2;
} }
...@@ -386,14 +384,14 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot) ...@@ -386,14 +384,14 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
if ((rc = if ((rc =
xtInsert(tid, ip, 0, 0, sbi->nbperpage, xtInsert(tid, ip, 0, 0, sbi->nbperpage,
&xaddr, 0))) { &xaddr, 0))) {
jFYI(1, ("add_index: xtInsert failed!\n")); jfs_warn("add_index: xtInsert failed!");
return -1; return -1;
} }
ip->i_size = PSIZE; ip->i_size = PSIZE;
ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage); ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage);
if ((mp = read_index_page(ip, 0)) == 0) { if ((mp = read_index_page(ip, 0)) == 0) {
jERROR(1, ("add_index: get_metapage failed!\n")); jfs_err("add_index: get_metapage failed!");
xtTruncate(tid, ip, 0, COMMIT_PWMAP); xtTruncate(tid, ip, 0, COMMIT_PWMAP);
return -1; return -1;
} }
...@@ -428,7 +426,7 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot) ...@@ -428,7 +426,7 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
if ((rc = if ((rc =
xtInsert(tid, ip, 0, blkno, sbi->nbperpage, xtInsert(tid, ip, 0, blkno, sbi->nbperpage,
&xaddr, 0))) { &xaddr, 0))) {
jFYI(1, ("add_index: xtInsert failed!\n")); jfs_warn("add_index: xtInsert failed!");
jfs_ip->next_index--; jfs_ip->next_index--;
return -1; return -1;
} }
...@@ -443,7 +441,7 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot) ...@@ -443,7 +441,7 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
mp = read_index_page(ip, blkno); mp = read_index_page(ip, blkno);
if (mp == 0) { if (mp == 0) {
jERROR(1, ("add_index: get/read_metapage failed!\n")); jfs_err("add_index: get/read_metapage failed!");
return -1; return -1;
} }
...@@ -751,7 +749,7 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data, ...@@ -751,7 +749,7 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
/* Something's corrupted, mark filesytem dirty so /* Something's corrupted, mark filesytem dirty so
* chkdsk will fix it. * chkdsk will fix it.
*/ */
jERROR(1, ("stack overrun in dtSearch!\n")); jfs_err("stack overrun in dtSearch!");
updateSuper(sb, FM_DIRTY); updateSuper(sb, FM_DIRTY);
rc = EIO; rc = EIO;
goto out; goto out;
...@@ -1162,7 +1160,7 @@ static int dtSplitUp(tid_t tid, ...@@ -1162,7 +1160,7 @@ static int dtSplitUp(tid_t tid,
break; break;
default: default:
jERROR(2, ("dtSplitUp(): UFO!\n")); jfs_err("dtSplitUp(): UFO!");
break; break;
} }
...@@ -1313,8 +1311,7 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split, ...@@ -1313,8 +1311,7 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
if (rmp == NULL) if (rmp == NULL)
return EIO; return EIO;
jEVENT(0, jfs_info("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp);
("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p\n", ip, smp, rmp));
BT_MARK_DIRTY(rmp, ip); BT_MARK_DIRTY(rmp, ip);
/* /*
...@@ -1420,9 +1417,8 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split, ...@@ -1420,9 +1417,8 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
* acquire a transaction lock on the next page * acquire a transaction lock on the next page
*/ */
tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK);
jEVENT(0, jfs_info("dtSplitPage: tlck = 0x%p, ip = 0x%p, mp=0x%p",
("dtSplitPage: tlck = 0x%p, ip = 0x%p, mp=0x%p\n", tlck, ip, mp);
tlck, ip, mp));
dtlck = (struct dt_lock *) & tlck->lock; dtlck = (struct dt_lock *) & tlck->lock;
/* linelock header of previous right sibling page */ /* linelock header of previous right sibling page */
...@@ -1564,7 +1560,6 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split, ...@@ -1564,7 +1560,6 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
ip->i_blocks += LBLK2PBLK(sb, lengthPXD(pxd)); ip->i_blocks += LBLK2PBLK(sb, lengthPXD(pxd));
jEVENT(0, ("dtSplitPage: ip:0x%p sp:0x%p rp:0x%p\n", ip, sp, rp));
return 0; return 0;
} }
...@@ -1665,8 +1660,7 @@ static int dtExtendPage(tid_t tid, ...@@ -1665,8 +1660,7 @@ static int dtExtendPage(tid_t tid,
*/ */
sp->header.self = *pxd; sp->header.self = *pxd;
jEVENT(0, jfs_info("dtExtendPage: ip:0x%p smp:0x%p sp:0x%p", ip, smp, sp);
("dtExtendPage: ip:0x%p smp:0x%p sp:0x%p\n", ip, smp, sp));
BT_MARK_DIRTY(smp, ip); BT_MARK_DIRTY(smp, ip);
/* /*
...@@ -1804,10 +1798,6 @@ static int dtExtendPage(tid_t tid, ...@@ -1804,10 +1798,6 @@ static int dtExtendPage(tid_t tid,
((JFS_IP(ip)->acl.flag & DXD_EXTENT) ? ((JFS_IP(ip)->acl.flag & DXD_EXTENT) ?
lengthDXD(&JFS_IP(ip)->acl) : 0)); lengthDXD(&JFS_IP(ip)->acl) : 0));
jEVENT(0,
("dtExtendPage: ip:0x%p smp:0x%p sp:0x%p\n", ip, smp, sp));
DT_PUTPAGE(pmp); DT_PUTPAGE(pmp);
return 0; return 0;
} }
...@@ -2401,9 +2391,9 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd, ...@@ -2401,9 +2391,9 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
oxaddr = addressPXD(opxd); oxaddr = addressPXD(opxd);
xlen = lengthPXD(opxd); xlen = lengthPXD(opxd);
jEVENT(0, ("dtRelocate: lmxaddr:%Ld xaddr:%Ld:%Ld xlen:%d\n", jfs_info("dtRelocate: lmxaddr:%Ld xaddr:%Ld:%Ld xlen:%d",
(long long)lmxaddr, (long long)oxaddr, (long long)nxaddr, (long long)lmxaddr, (long long)oxaddr, (long long)nxaddr,
xlen)); xlen);
/* /*
* 1. get the internal parent dtpage covering * 1. get the internal parent dtpage covering
...@@ -2415,7 +2405,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd, ...@@ -2415,7 +2405,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
/* retrieve search result */ /* retrieve search result */
DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index);
jEVENT(0, ("dtRelocate: parent router entry validated.\n")); jfs_info("dtRelocate: parent router entry validated.");
/* /*
* 2. relocate the target dtpage * 2. relocate the target dtpage
...@@ -2521,7 +2511,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd, ...@@ -2521,7 +2511,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
#endif /* _STILL_TO_PORT */ #endif /* _STILL_TO_PORT */
/* unpin the relocated page */ /* unpin the relocated page */
DT_PUTPAGE(mp); DT_PUTPAGE(mp);
jEVENT(0, ("dtRelocate: target dtpage relocated.\n")); jfs_info("dtRelocate: target dtpage relocated.");
/* the moved extent is dtpage, then a LOG_NOREDOPAGE log rec /* the moved extent is dtpage, then a LOG_NOREDOPAGE log rec
* needs to be written (in logredo(), the LOG_NOREDOPAGE log rec * needs to be written (in logredo(), the LOG_NOREDOPAGE log rec
...@@ -2549,7 +2539,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd, ...@@ -2549,7 +2539,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
* acquire tlck for the parent entry covering the target dtpage; * acquire tlck for the parent entry covering the target dtpage;
* write LOG_REDOPAGE to apply after image only; * write LOG_REDOPAGE to apply after image only;
*/ */
jEVENT(0, ("dtRelocate: update parent router entry.\n")); jfs_info("dtRelocate: update parent router entry.");
tlck = txLock(tid, ip, pmp, tlckDTREE | tlckENTRY); tlck = txLock(tid, ip, pmp, tlckDTREE | tlckENTRY);
dtlck = (struct dt_lock *) & tlck->lock; dtlck = (struct dt_lock *) & tlck->lock;
lv = & dtlck->lv[dtlck->index]; lv = & dtlck->lv[dtlck->index];
...@@ -2708,9 +2698,8 @@ static int dtRelink(tid_t tid, struct inode *ip, dtpage_t * p) ...@@ -2708,9 +2698,8 @@ static int dtRelink(tid_t tid, struct inode *ip, dtpage_t * p)
* action: update prev pointer; * action: update prev pointer;
*/ */
tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK);
jEVENT(0, jfs_info("dtRelink nextbn: tlck = 0x%p, ip = 0x%p, mp=0x%p",
("dtRelink nextbn: tlck = 0x%p, ip = 0x%p, mp=0x%p\n", tlck, ip, mp);
tlck, ip, mp));
dtlck = (struct dt_lock *) & tlck->lock; dtlck = (struct dt_lock *) & tlck->lock;
/* linelock header */ /* linelock header */
...@@ -2738,9 +2727,8 @@ static int dtRelink(tid_t tid, struct inode *ip, dtpage_t * p) ...@@ -2738,9 +2727,8 @@ static int dtRelink(tid_t tid, struct inode *ip, dtpage_t * p)
* action: update next pointer; * action: update next pointer;
*/ */
tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK);
jEVENT(0, jfs_info("dtRelink prevbn: tlck = 0x%p, ip = 0x%p, mp=0x%p",
("dtRelink prevbn: tlck = 0x%p, ip = 0x%p, mp=0x%p\n", tlck, ip, mp);
tlck, ip, mp));
dtlck = (struct dt_lock *) & tlck->lock; dtlck = (struct dt_lock *) & tlck->lock;
/* linelock header */ /* linelock header */
...@@ -3012,8 +3000,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3012,8 +3000,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
} }
if (dirtab_slot.flag == DIR_INDEX_FREE) { if (dirtab_slot.flag == DIR_INDEX_FREE) {
if (loop_count++ > JFS_IP(ip)->next_index) { if (loop_count++ > JFS_IP(ip)->next_index) {
jERROR(1, ("jfs_readdir detected " jfs_err("jfs_readdir detected "
"infinite loop!\n")); "infinite loop!");
filp->f_pos = DIREND; filp->f_pos = DIREND;
return 0; return 0;
} }
...@@ -3032,7 +3020,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3032,7 +3020,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
return 0; return 0;
} }
if (p->header.flag & BT_INTERNAL) { if (p->header.flag & BT_INTERNAL) {
jERROR(1,("jfs_readdir: bad index table\n")); jfs_err("jfs_readdir: bad index table");
DT_PUTPAGE(mp); DT_PUTPAGE(mp);
filp->f_pos = -1; filp->f_pos = -1;
return 0; return 0;
...@@ -3097,8 +3085,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3097,8 +3085,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
PARENT(ip), DT_DIR)) PARENT(ip), DT_DIR))
return 0; return 0;
} else { } else {
jERROR(1, jfs_err("jfs_readdir called with "
("jfs_readdir called with invalid offset!\n")); "invalid offset!");
} }
dtoffset->pn = 1; dtoffset->pn = 1;
dtoffset->index = 0; dtoffset->index = 0;
...@@ -3111,9 +3099,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3111,9 +3099,8 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
} }
if ((rc = dtReadNext(ip, &filp->f_pos, &btstack))) { if ((rc = dtReadNext(ip, &filp->f_pos, &btstack))) {
jERROR(1, jfs_err("jfs_readdir: unexpected rc = %d "
("jfs_readdir: unexpected rc = %d from dtReadNext\n", "from dtReadNext", rc);
rc));
filp->f_pos = DIREND; filp->f_pos = DIREND;
return 0; return 0;
} }
...@@ -3130,7 +3117,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3130,7 +3117,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
dirent_buf = __get_free_page(GFP_KERNEL); dirent_buf = __get_free_page(GFP_KERNEL);
if (dirent_buf == 0) { if (dirent_buf == 0) {
DT_PUTPAGE(mp); DT_PUTPAGE(mp);
jERROR(1, ("jfs_readdir: __get_free_page failed!\n")); jfs_warn("jfs_readdir: __get_free_page failed!");
filp->f_pos = DIREND; filp->f_pos = DIREND;
return -ENOMEM; return -ENOMEM;
} }
...@@ -3202,9 +3189,10 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3202,9 +3189,10 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
d_namleft -= len; d_namleft -= len;
/* Sanity Check */ /* Sanity Check */
if (d_namleft == 0) { if (d_namleft == 0) {
jERROR(1,("JFS:Dtree error: " jfs_err("JFS:Dtree error: ino = "
"ino = %ld, bn=%Ld, index = %d\n", "%ld, bn=%Ld, index = %d",
(long)ip->i_ino, (long long)bn, i)); (long)ip->i_ino,(long long)bn,
i);
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
goto skip_one; goto skip_one;
} }
......
...@@ -137,7 +137,7 @@ int diMount(struct inode *ipimap) ...@@ -137,7 +137,7 @@ int diMount(struct inode *ipimap)
/* allocate the in-memory inode map control structure. */ /* allocate the in-memory inode map control structure. */
imap = (struct inomap *) kmalloc(sizeof(struct inomap), GFP_KERNEL); imap = (struct inomap *) kmalloc(sizeof(struct inomap), GFP_KERNEL);
if (imap == NULL) { if (imap == NULL) {
jERROR(1, ("diMount: kmalloc returned NULL!\n")); jfs_err("diMount: kmalloc returned NULL!");
return (ENOMEM); return (ENOMEM);
} }
...@@ -253,7 +253,7 @@ int diSync(struct inode *ipimap) ...@@ -253,7 +253,7 @@ int diSync(struct inode *ipimap)
IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage, IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage,
PSIZE, 0); PSIZE, 0);
if (mp == NULL) { if (mp == NULL) {
jERROR(1,("diSync: get_metapage failed!\n")); jfs_err("diSync: get_metapage failed!");
return EIO; return EIO;
} }
...@@ -339,7 +339,7 @@ int diRead(struct inode *ip) ...@@ -339,7 +339,7 @@ int diRead(struct inode *ip)
uint pageno; uint pageno;
int rel_inode; int rel_inode;
jFYI(1, ("diRead: ino = %ld\n", ip->i_ino)); jfs_info("diRead: ino = %ld", ip->i_ino);
ipimap = sbi->ipimap; ipimap = sbi->ipimap;
JFS_IP(ip)->ipimap = ipimap; JFS_IP(ip)->ipimap = ipimap;
...@@ -353,7 +353,7 @@ int diRead(struct inode *ip) ...@@ -353,7 +353,7 @@ int diRead(struct inode *ip)
rc = diIAGRead(imap, iagno, &mp); rc = diIAGRead(imap, iagno, &mp);
IREAD_UNLOCK(ipimap); IREAD_UNLOCK(ipimap);
if (rc) { if (rc) {
jERROR(1, ("diRead: diIAGRead returned %d\n", rc)); jfs_err("diRead: diIAGRead returned %d", rc);
return (rc); return (rc);
} }
...@@ -400,7 +400,7 @@ int diRead(struct inode *ip) ...@@ -400,7 +400,7 @@ int diRead(struct inode *ip)
/* read the page of disk inode */ /* read the page of disk inode */
mp = read_metapage(ipimap, pageno << sbi->l2nbperpage, PSIZE, 1); mp = read_metapage(ipimap, pageno << sbi->l2nbperpage, PSIZE, 1);
if (mp == 0) { if (mp == 0) {
jERROR(1, ("diRead: read_metapage failed\n")); jfs_err("diRead: read_metapage failed");
return EIO; return EIO;
} }
...@@ -409,7 +409,7 @@ int diRead(struct inode *ip) ...@@ -409,7 +409,7 @@ int diRead(struct inode *ip)
dp += rel_inode; dp += rel_inode;
if (ip->i_ino != le32_to_cpu(dp->di_number)) { if (ip->i_ino != le32_to_cpu(dp->di_number)) {
jERROR(1, ("diRead: i_ino != di_number\n")); jfs_err("diRead: i_ino != di_number");
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
rc = EIO; rc = EIO;
} else if (le32_to_cpu(dp->di_nlink) == 0) } else if (le32_to_cpu(dp->di_nlink) == 0)
...@@ -460,8 +460,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) ...@@ -460,8 +460,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
ip = new_inode(sb); ip = new_inode(sb);
if (ip == NULL) { if (ip == NULL) {
jERROR(1, jfs_err("diReadSpecial: new_inode returned NULL!");
("diReadSpecial: new_inode returned NULL!\n"));
return ip; return ip;
} }
...@@ -480,9 +479,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) ...@@ -480,9 +479,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
address += inum >> 3; /* 8 inodes per 4K page */ address += inum >> 3; /* 8 inodes per 4K page */
/* read the page of fixed disk inode (AIT) in raw mode */ /* read the page of fixed disk inode (AIT) in raw mode */
jEVENT(0,
("Reading aggregate inode %d from block %d\n", (uint) inum,
address));
mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
if (mp == NULL) { if (mp == NULL) {
ip->i_sb = NULL; ip->i_sb = NULL;
...@@ -553,13 +549,10 @@ void diWriteSpecial(struct inode *ip, int secondary) ...@@ -553,13 +549,10 @@ void diWriteSpecial(struct inode *ip, int secondary)
address += inum >> 3; /* 8 inodes per 4K page */ address += inum >> 3; /* 8 inodes per 4K page */
/* read the page of fixed disk inode (AIT) in raw mode */ /* read the page of fixed disk inode (AIT) in raw mode */
jEVENT(0,
("Reading aggregate inode %d from block %d\n", (uint) inum,
address));
mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
if (mp == NULL) { if (mp == NULL) {
jERROR(1, jfs_err("diWriteSpecial: failed to read aggregate inode "
("diWriteSpecial: failed to read aggregate inode extent!\n")); "extent!");
return; return;
} }
...@@ -586,7 +579,7 @@ void diWriteSpecial(struct inode *ip, int secondary) ...@@ -586,7 +579,7 @@ void diWriteSpecial(struct inode *ip, int secondary)
void diFreeSpecial(struct inode *ip) void diFreeSpecial(struct inode *ip)
{ {
if (ip == NULL) { if (ip == NULL) {
jERROR(1, ("diFreeSpecial called with NULL ip!\n")); jfs_err("diFreeSpecial called with NULL ip!");
return; return;
} }
filemap_fdatawrite(ip->i_mapping); filemap_fdatawrite(ip->i_mapping);
...@@ -794,7 +787,7 @@ int diWrite(tid_t tid, struct inode *ip) ...@@ -794,7 +787,7 @@ int diWrite(tid_t tid, struct inode *ip)
lv->length << L2DTSLOTSIZE); lv->length << L2DTSLOTSIZE);
} }
} else { } else {
jERROR(1, ("diWrite: UFO tlock\n")); jfs_err("diWrite: UFO tlock");
} }
inlineData: inlineData:
...@@ -926,8 +919,8 @@ int diFree(struct inode *ip) ...@@ -926,8 +919,8 @@ int diFree(struct inode *ip)
*/ */
//assert(iagno < imap->im_nextiag); //assert(iagno < imap->im_nextiag);
if (iagno >= imap->im_nextiag) { if (iagno >= imap->im_nextiag) {
jERROR(1, ("diFree: inum = %d, iagno = %d, nextiag = %d\n", jfs_err("diFree: inum = %d, iagno = %d, nextiag = %d",
(uint) inum, iagno, imap->im_nextiag)); (uint) inum, iagno, imap->im_nextiag);
dump_mem("imap", imap, 32); dump_mem("imap", imap, 32);
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
return EIO; return EIO;
...@@ -974,7 +967,7 @@ int diFree(struct inode *ip) ...@@ -974,7 +967,7 @@ int diFree(struct inode *ip)
bitmap = le32_to_cpu(iagp->wmap[extno]) & ~mask; bitmap = le32_to_cpu(iagp->wmap[extno]) & ~mask;
if (imap->im_agctl[agno].numfree > imap->im_agctl[agno].numinos) { if (imap->im_agctl[agno].numfree > imap->im_agctl[agno].numinos) {
jERROR(1,("diFree: numfree > numinos\n")); jfs_err("diFree: numfree > numinos");
release_metapage(mp); release_metapage(mp);
IREAD_UNLOCK(ipimap); IREAD_UNLOCK(ipimap);
AG_UNLOCK(imap, agno); AG_UNLOCK(imap, agno);
...@@ -1684,7 +1677,7 @@ diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip) ...@@ -1684,7 +1677,7 @@ diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip)
numinos = imap->im_agctl[agno].numinos; numinos = imap->im_agctl[agno].numinos;
if (numfree > numinos) { if (numfree > numinos) {
jERROR(1,("diAllocAG: numfree > numinos\n")); jfs_err("diAllocAG: numfree > numinos");
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
return EIO; return EIO;
} }
...@@ -1835,9 +1828,8 @@ static int diAllocIno(struct inomap * imap, int agno, struct inode *ip) ...@@ -1835,9 +1828,8 @@ static int diAllocIno(struct inomap * imap, int agno, struct inode *ip)
*/ */
//assert(iagp->nfreeinos); //assert(iagp->nfreeinos);
if (!iagp->nfreeinos) { if (!iagp->nfreeinos) {
jERROR(1, jfs_err("diAllocIno: nfreeinos = 0, but iag on freelist");
("diAllocIno: nfreeinos = 0, but iag on freelist\n")); jfs_err(" agno = %d, iagno = %d", agno, iagno);
jERROR(1, (" agno = %d, iagno = %d\n", agno, iagno));
dump_mem("iag", iagp, 64); dump_mem("iag", iagp, 64);
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
return EIO; return EIO;
...@@ -2764,18 +2756,14 @@ diUpdatePMap(struct inode *ipimap, ...@@ -2764,18 +2756,14 @@ diUpdatePMap(struct inode *ipimap,
* the inode will be freed from working map at the release * the inode will be freed from working map at the release
* of last reference release; * of last reference release;
*/ */
// assert(le32_to_cpu(iagp->wmap[extno]) & mask);
if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) {
jERROR(1, jfs_err("diUpdatePMap: inode %ld not marked as "
("diUpdatePMap: inode %ld not marked as allocated in wmap!\n", "allocated in wmap!", inum);
inum));
updateSuper(ipimap->i_sb, FM_DIRTY); updateSuper(ipimap->i_sb, FM_DIRTY);
} }
// assert(le32_to_cpu(iagp->pmap[extno]) & mask);
if (!(le32_to_cpu(iagp->pmap[extno]) & mask)) { if (!(le32_to_cpu(iagp->pmap[extno]) & mask)) {
jERROR(1, jfs_err("diUpdatePMap: inode %ld not marked as "
("diUpdatePMap: inode %ld not marked as allocated in pmap!\n", "allocated in pmap!", inum);
inum));
updateSuper(ipimap->i_sb, FM_DIRTY); updateSuper(ipimap->i_sb, FM_DIRTY);
} }
/* update the bitmap for the extent of the freed inode */ /* update the bitmap for the extent of the freed inode */
...@@ -2851,9 +2839,9 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap) ...@@ -2851,9 +2839,9 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
int numinos, xnuminos = 0, xnumfree = 0; int numinos, xnuminos = 0, xnumfree = 0;
s64 agstart; s64 agstart;
jEVENT(0, ("diExtendFS: nextiag:%d numinos:%d numfree:%d\n", jfs_info("diExtendFS: nextiag:%d numinos:%d numfree:%d",
imap->im_nextiag, atomic_read(&imap->im_numinos), imap->im_nextiag, atomic_read(&imap->im_numinos),
atomic_read(&imap->im_numfree))); atomic_read(&imap->im_numfree));
/* /*
* reconstruct imap * reconstruct imap
......
...@@ -38,7 +38,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -38,7 +38,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
inode = new_inode(sb); inode = new_inode(sb);
if (!inode) { if (!inode) {
jERROR(1, ("ialloc: new_inode returned NULL!\n")); jfs_warn("ialloc: new_inode returned NULL!");
return inode; return inode;
} }
...@@ -46,7 +46,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -46,7 +46,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
rc = diAlloc(parent, S_ISDIR(mode), inode); rc = diAlloc(parent, S_ISDIR(mode), inode);
if (rc) { if (rc) {
jERROR(1, ("ialloc: diAlloc returned %d!\n", rc)); jfs_warn("ialloc: diAlloc returned %d!", rc);
make_bad_inode(inode); make_bad_inode(inode);
iput(inode); iput(inode);
return NULL; return NULL;
...@@ -87,7 +87,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -87,7 +87,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
jfs_inode->atltail = 0; jfs_inode->atltail = 0;
jfs_inode->xtlid = 0; jfs_inode->xtlid = 0;
jFYI(1, ("ialloc returns inode = 0x%p\n", inode)); jfs_info("ialloc returns inode = 0x%p\n", inode);
return inode; return inode;
} }
...@@ -222,8 +222,8 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -222,8 +222,8 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
int diffp, difft; int diffp, difft;
struct metapage *mp = NULL; struct metapage *mp = NULL;
jFYI(1, ("lmLog: log:0x%p tblk:0x%p, lrd:0x%p tlck:0x%p\n", jfs_info("lmLog: log:0x%p tblk:0x%p, lrd:0x%p tlck:0x%p",
log, tblk, lrd, tlck)); log, tblk, lrd, tlck);
LOG_LOCK(log); LOG_LOCK(log);
...@@ -390,7 +390,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -390,7 +390,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
} }
#endif /* _JFS_WIP */ #endif /* _JFS_WIP */
else { else {
jERROR(2, ("lmWriteRecord: UFO tlck:0x%p\n", tlck)); jfs_err("lmWriteRecord: UFO tlck:0x%p", tlck);
return 0; /* Probably should trap */ return 0; /* Probably should trap */
} }
l2linesize = linelock->l2linesize; l2linesize = linelock->l2linesize;
...@@ -449,9 +449,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -449,9 +449,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
lvd->offset = cpu_to_le16(lv->offset); lvd->offset = cpu_to_le16(lv->offset);
lvd->length = cpu_to_le16(lv->length); lvd->length = cpu_to_le16(lv->length);
dstoffset += 4; dstoffset += 4;
jFYI(1, jfs_info("lmWriteRecord: lv offset:%d length:%d",
("lmWriteRecord: lv offset:%d length:%d\n", lv->offset, lv->length);
lv->offset, lv->length));
} }
if ((i = linelock->next)) { if ((i = linelock->next)) {
...@@ -492,9 +491,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -492,9 +491,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
if (lrd->type & cpu_to_le16(LOG_COMMIT)) { if (lrd->type & cpu_to_le16(LOG_COMMIT)) {
tblk->clsn = lsn; tblk->clsn = lsn;
jFYI(1, jfs_info("wr: tclsn:0x%x, beor:0x%x", tblk->clsn,
("wr: tclsn:0x%x, beor:0x%x\n", tblk->clsn, bp->l_eor);
bp->l_eor));
INCREMENT(lmStat.commit); /* # of commit */ INCREMENT(lmStat.commit); /* # of commit */
...@@ -526,10 +524,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -526,10 +524,8 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
LOGGC_UNLOCK(log); LOGGC_UNLOCK(log);
} }
jFYI(1, jfs_info("lmWriteRecord: lrd:0x%04x bp:0x%p pn:%d eor:0x%x",
("lmWriteRecord: lrd:0x%04x bp:0x%p pn:%d eor:0x%x\n", le16_to_cpu(lrd->type), log->bp, log->page, dstoffset);
le16_to_cpu(lrd->type), log->bp, log->page,
dstoffset));
/* page not full ? */ /* page not full ? */
if (dstoffset < LOGPSIZE - LOGPTLRSIZE) if (dstoffset < LOGPSIZE - LOGPTLRSIZE)
...@@ -569,8 +565,6 @@ static int lmNextPage(struct jfs_log * log) ...@@ -569,8 +565,6 @@ static int lmNextPage(struct jfs_log * log)
struct lbuf *nextbp; struct lbuf *nextbp;
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("lmNextPage\n"));
/* get current log page number and log sequence page number */ /* get current log page number and log sequence page number */
pn = log->page; pn = log->page;
bp = log->bp; bp = log->bp;
...@@ -646,7 +640,6 @@ static int lmNextPage(struct jfs_log * log) ...@@ -646,7 +640,6 @@ static int lmNextPage(struct jfs_log * log)
lp->h.page = lp->t.page = cpu_to_le32(lspn + 1); lp->h.page = lp->t.page = cpu_to_le32(lspn + 1);
lp->h.eor = lp->t.eor = cpu_to_le16(LOGPHDRSIZE); lp->h.eor = lp->t.eor = cpu_to_le16(LOGPHDRSIZE);
jFYI(1, ("lmNextPage done\n"));
return 0; return 0;
} }
...@@ -680,8 +673,7 @@ int lmGroupCommit(struct jfs_log * log, struct tblock * tblk) ...@@ -680,8 +673,7 @@ int lmGroupCommit(struct jfs_log * log, struct tblock * tblk)
LOGGC_UNLOCK(log); LOGGC_UNLOCK(log);
return rc; return rc;
} }
jFYI(1, ("lmGroup Commit: tblk = 0x%p, gcrtc = %d\n", tblk, jfs_info("lmGroup Commit: tblk = 0x%p, gcrtc = %d", tblk, log->gcrtc);
log->gcrtc));
if (tblk->xflag & COMMIT_LAZY) { if (tblk->xflag & COMMIT_LAZY) {
/* /*
...@@ -783,9 +775,6 @@ static void lmGCwrite(struct jfs_log * log, int cant_write) ...@@ -783,9 +775,6 @@ static void lmGCwrite(struct jfs_log * log, int cant_write)
tblk->flag |= tblkGC_FREE; tblk->flag |= tblkGC_FREE;
bp->l_ceor = bp->l_eor; bp->l_ceor = bp->l_eor;
lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor); lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor);
jEVENT(0,
("gc: tclsn:0x%x, bceor:0x%x\n", tblk->clsn,
bp->l_ceor));
lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmGC, lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmGC,
cant_write); cant_write);
INCREMENT(lmStat.full_page); INCREMENT(lmStat.full_page);
...@@ -794,9 +783,6 @@ static void lmGCwrite(struct jfs_log * log, int cant_write) ...@@ -794,9 +783,6 @@ static void lmGCwrite(struct jfs_log * log, int cant_write)
else { else {
bp->l_ceor = tblk->eor; /* ? bp->l_ceor = bp->l_eor; */ bp->l_ceor = tblk->eor; /* ? bp->l_ceor = bp->l_eor; */
lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor); lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor);
jEVENT(0,
("gc: tclsn:0x%x, bceor:0x%x\n", tblk->clsn,
bp->l_ceor));
lbmWrite(log, bp, lbmWRITE | lbmGC, cant_write); lbmWrite(log, bp, lbmWRITE | lbmGC, cant_write);
INCREMENT(lmStat.partial_page); INCREMENT(lmStat.partial_page);
} }
...@@ -845,9 +831,8 @@ void lmPostGC(struct lbuf * bp) ...@@ -845,9 +831,8 @@ void lmPostGC(struct lbuf * bp)
tblk->flag &= ~tblkGC_QUEUE; tblk->flag &= ~tblkGC_QUEUE;
tblk->cqnext = 0; tblk->cqnext = 0;
jEVENT(0, jfs_info("lmPostGC: tblk = 0x%p, flag = 0x%x", tblk,
("lmPostGC: tblk = 0x%p, flag = 0x%x\n", tblk, tblk->flag);
tblk->flag));
if (!(tblk->xflag & COMMIT_FORCE)) if (!(tblk->xflag & COMMIT_FORCE))
/* /*
...@@ -877,7 +862,7 @@ void lmPostGC(struct lbuf * bp) ...@@ -877,7 +862,7 @@ void lmPostGC(struct lbuf * bp)
lp = (struct logpage *) bp->l_ldata; lp = (struct logpage *) bp->l_ldata;
bp->l_ceor = bp->l_eor; bp->l_ceor = bp->l_eor;
lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor); lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor);
jEVENT(0, ("lmPostGC: calling lbmWrite\n")); jfs_info("lmPostGC: calling lbmWrite");
lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmFREE, lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmFREE,
1); 1);
} }
...@@ -1008,8 +993,7 @@ int lmLogSync(struct jfs_log * log, int nosyncwait) ...@@ -1008,8 +993,7 @@ int lmLogSync(struct jfs_log * log, int nosyncwait)
delta = LOGSYNC_DELTA(logsize); delta = LOGSYNC_DELTA(logsize);
more = min(free / 2, delta); more = min(free / 2, delta);
if (more < 2 * LOGPSIZE) { if (more < 2 * LOGPSIZE) {
jEVENT(1, jfs_warn("\n ... Log Wrap ... Log Wrap ... Log Wrap ...\n");
("\n ... Log Wrap ... Log Wrap ... Log Wrap ...\n\n"));
/* /*
* log wrapping * log wrapping
* *
...@@ -1048,8 +1032,8 @@ int lmLogSync(struct jfs_log * log, int nosyncwait) ...@@ -1048,8 +1032,8 @@ int lmLogSync(struct jfs_log * log, int nosyncwait)
*/ */
if (written > LOGSYNC_BARRIER(logsize) && logsize > 32 * LOGPSIZE) { if (written > LOGSYNC_BARRIER(logsize) && logsize > 32 * LOGPSIZE) {
set_bit(log_SYNCBARRIER, &log->flag); set_bit(log_SYNCBARRIER, &log->flag);
jFYI(1, ("log barrier on: lsn=0x%x syncpt=0x%x\n", lsn, jfs_info("log barrier on: lsn=0x%x syncpt=0x%x", lsn,
log->syncpt)); log->syncpt);
/* /*
* We may have to initiate group commit * We may have to initiate group commit
*/ */
...@@ -1148,7 +1132,6 @@ int lmLogOpen(struct super_block *sb, struct jfs_log ** logptr) ...@@ -1148,7 +1132,6 @@ int lmLogOpen(struct super_block *sb, struct jfs_log ** logptr)
goto shutdown; goto shutdown;
out: out:
jFYI(1, ("lmLogOpen: exit(0)\n"));
*logptr = log; *logptr = log;
return 0; return 0;
...@@ -1167,7 +1150,7 @@ int lmLogOpen(struct super_block *sb, struct jfs_log ** logptr) ...@@ -1167,7 +1150,7 @@ int lmLogOpen(struct super_block *sb, struct jfs_log ** logptr)
free: /* free log descriptor */ free: /* free log descriptor */
kfree(log); kfree(log);
jFYI(1, ("lmLogOpen: exit(%d)\n", rc)); jfs_warn("lmLogOpen: exit(%d)", rc);
return rc; return rc;
} }
...@@ -1200,7 +1183,7 @@ int lmLogInit(struct jfs_log * log) ...@@ -1200,7 +1183,7 @@ int lmLogInit(struct jfs_log * log)
struct logpage *lp; struct logpage *lp;
int lsn; int lsn;
jFYI(1, ("lmLogInit: log:0x%p\n", log)); jfs_info("lmLogInit: log:0x%p", log);
/* /*
* log inode is overlaid on generic inode where * log inode is overlaid on generic inode where
...@@ -1224,14 +1207,14 @@ int lmLogInit(struct jfs_log * log) ...@@ -1224,14 +1207,14 @@ int lmLogInit(struct jfs_log * log)
logsuper = (struct logsuper *) bpsuper->l_ldata; logsuper = (struct logsuper *) bpsuper->l_ldata;
if (logsuper->magic != cpu_to_le32(LOGMAGIC)) { if (logsuper->magic != cpu_to_le32(LOGMAGIC)) {
jERROR(1, ("*** Log Format Error ! ***\n")); jfs_warn("*** Log Format Error ! ***");
rc = EINVAL; rc = EINVAL;
goto errout20; goto errout20;
} }
/* logredo() should have been run successfully. */ /* logredo() should have been run successfully. */
if (logsuper->state != cpu_to_le32(LOGREDONE)) { if (logsuper->state != cpu_to_le32(LOGREDONE)) {
jERROR(1, ("*** Log Is Dirty ! ***\n")); jfs_warn("*** Log Is Dirty ! ***");
rc = EINVAL; rc = EINVAL;
goto errout20; goto errout20;
} }
...@@ -1242,19 +1225,17 @@ int lmLogInit(struct jfs_log * log) ...@@ -1242,19 +1225,17 @@ int lmLogInit(struct jfs_log * log)
rc = EINVAL; rc = EINVAL;
goto errout20; goto errout20;
} }
jFYI(0, jfs_info("lmLogInit: inline log:0x%p base:0x%Lx size:0x%x",
("lmLogInit: inline log:0x%p base:0x%Lx size:0x%x\n", log, (unsigned long long) log->base, log->size);
log, (unsigned long long) log->base, log->size));
} else { } else {
if (memcmp(logsuper->uuid, log->uuid, 16)) { if (memcmp(logsuper->uuid, log->uuid, 16)) {
jERROR(1,("wrong uuid on JFS log device\n")); jfs_warn("wrong uuid on JFS log device");
goto errout20; goto errout20;
} }
log->size = le32_to_cpu(logsuper->size); log->size = le32_to_cpu(logsuper->size);
log->l2bsize = le32_to_cpu(logsuper->l2bsize); log->l2bsize = le32_to_cpu(logsuper->l2bsize);
jFYI(0, jfs_info("lmLogInit: external log:0x%p base:0x%Lx size:0x%x",
("lmLogInit: external log:0x%p base:0x%Lx size:0x%x\n", log, (unsigned long long) log->base, log->size);
log, (unsigned long long) log->base, log->size));
} }
log->page = le32_to_cpu(logsuper->end) / LOGPSIZE; log->page = le32_to_cpu(logsuper->end) / LOGPSIZE;
...@@ -1269,9 +1250,9 @@ int lmLogInit(struct jfs_log * log) ...@@ -1269,9 +1250,9 @@ int lmLogInit(struct jfs_log * log)
lp = (struct logpage *) bp->l_ldata; lp = (struct logpage *) bp->l_ldata;
jFYI(1, ("lmLogInit: lsn:0x%x page:%d eor:%d:%d\n", jfs_info("lmLogInit: lsn:0x%x page:%d eor:%d:%d",
le32_to_cpu(logsuper->end), log->page, log->eor, le32_to_cpu(logsuper->end), log->page, log->eor,
le16_to_cpu(lp->h.eor))); le16_to_cpu(lp->h.eor));
// ASSERT(log->eor == lp->h.eor); // ASSERT(log->eor == lp->h.eor);
...@@ -1319,8 +1300,8 @@ int lmLogInit(struct jfs_log * log) ...@@ -1319,8 +1300,8 @@ int lmLogInit(struct jfs_log * log)
log->sync = log->syncpt; log->sync = log->syncpt;
log->nextsync = LOGSYNC_DELTA(log->logsize); log->nextsync = LOGSYNC_DELTA(log->logsize);
jFYI(1, ("lmLogInit: lsn:0x%x syncpt:0x%x sync:0x%x\n", jfs_info("lmLogInit: lsn:0x%x syncpt:0x%x sync:0x%x",
log->lsn, log->syncpt, log->sync)); log->lsn, log->syncpt, log->sync);
LOGSYNC_LOCK_INIT(log); LOGSYNC_LOCK_INIT(log);
...@@ -1345,7 +1326,6 @@ int lmLogInit(struct jfs_log * log) ...@@ -1345,7 +1326,6 @@ int lmLogInit(struct jfs_log * log)
if ((rc = lbmIOWait(bpsuper, lbmFREE))) if ((rc = lbmIOWait(bpsuper, lbmFREE)))
goto errout30; goto errout30;
jFYI(1, ("lmLogInit: exit(%d)\n", rc));
return 0; return 0;
/* /*
...@@ -1360,7 +1340,7 @@ int lmLogInit(struct jfs_log * log) ...@@ -1360,7 +1340,7 @@ int lmLogInit(struct jfs_log * log)
errout10: /* unwind lbmLogInit() */ errout10: /* unwind lbmLogInit() */
lbmLogShutdown(log); lbmLogShutdown(log);
jFYI(1, ("lmLogInit: exit(%d)\n", rc)); jfs_warn("lmLogInit: exit(%d)", rc);
return rc; return rc;
} }
...@@ -1383,7 +1363,7 @@ int lmLogClose(struct super_block *sb, struct jfs_log * log) ...@@ -1383,7 +1363,7 @@ int lmLogClose(struct super_block *sb, struct jfs_log * log)
struct block_device *bdev = log->bdev; struct block_device *bdev = log->bdev;
int rc; int rc;
jFYI(1, ("lmLogClose: log:0x%p\n", log)); jfs_info("lmLogClose: log:0x%p", log);
if (!test_bit(log_INLINELOG, &log->flag)) if (!test_bit(log_INLINELOG, &log->flag))
goto externalLog; goto externalLog;
...@@ -1405,7 +1385,7 @@ int lmLogClose(struct super_block *sb, struct jfs_log * log) ...@@ -1405,7 +1385,7 @@ int lmLogClose(struct super_block *sb, struct jfs_log * log)
blkdev_put(bdev, BDEV_FS); blkdev_put(bdev, BDEV_FS);
out: out:
jFYI(0, ("lmLogClose: exit(%d)\n", rc)); jfs_info("lmLogClose: exit(%d)", rc);
return rc; return rc;
} }
...@@ -1420,7 +1400,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait) ...@@ -1420,7 +1400,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
{ {
int i; int i;
jFYI(1, ("jfs_flush_journal: log:0x%p wait=%d\n", log, wait)); jfs_info("jfs_flush_journal: log:0x%p wait=%d", log, wait);
/* /*
* This ensures that we will keep writing to the journal as long * This ensures that we will keep writing to the journal as long
...@@ -1485,7 +1465,7 @@ int lmLogShutdown(struct jfs_log * log) ...@@ -1485,7 +1465,7 @@ int lmLogShutdown(struct jfs_log * log)
struct lbuf *bp; struct lbuf *bp;
struct logpage *lp; struct logpage *lp;
jFYI(1, ("lmLogShutdown: log:0x%p\n", log)); jfs_info("lmLogShutdown: log:0x%p", log);
jfs_flush_journal(log, 1); jfs_flush_journal(log, 1);
...@@ -1525,8 +1505,8 @@ int lmLogShutdown(struct jfs_log * log) ...@@ -1525,8 +1505,8 @@ int lmLogShutdown(struct jfs_log * log)
lbmDirectWrite(log, bpsuper, lbmWRITE | lbmRELEASE | lbmSYNC); lbmDirectWrite(log, bpsuper, lbmWRITE | lbmRELEASE | lbmSYNC);
rc = lbmIOWait(bpsuper, lbmFREE); rc = lbmIOWait(bpsuper, lbmFREE);
jFYI(1, ("lmLogShutdown: lsn:0x%x page:%d eor:%d\n", jfs_info("lmLogShutdown: lsn:0x%x page:%d eor:%d",
lsn, log->page, log->eor)); lsn, log->page, log->eor);
out: out:
/* /*
...@@ -1535,7 +1515,7 @@ int lmLogShutdown(struct jfs_log * log) ...@@ -1535,7 +1515,7 @@ int lmLogShutdown(struct jfs_log * log)
lbmLogShutdown(log); lbmLogShutdown(log);
if (rc) { if (rc) {
jFYI(1, ("lmLogShutdown: exit(%d)\n", rc)); jfs_warn("lmLogShutdown: exit(%d)", rc);
} }
return rc; return rc;
} }
...@@ -1576,7 +1556,7 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate) ...@@ -1576,7 +1556,7 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate)
break; break;
} }
if (i == MAX_ACTIVE) { if (i == MAX_ACTIVE) {
jERROR(1,("Too many file systems sharing journal!\n")); jfs_warn("Too many file systems sharing journal!");
lbmFree(bpsuper); lbmFree(bpsuper);
return EMFILE; /* Is there a better rc? */ return EMFILE; /* Is there a better rc? */
} }
...@@ -1587,7 +1567,7 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate) ...@@ -1587,7 +1567,7 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate)
break; break;
} }
if (i == MAX_ACTIVE) { if (i == MAX_ACTIVE) {
jERROR(1,("Somebody stomped on the journal!\n")); jfs_warn("Somebody stomped on the journal!");
lbmFree(bpsuper); lbmFree(bpsuper);
return EIO; return EIO;
} }
...@@ -1636,7 +1616,7 @@ static int lbmLogInit(struct jfs_log * log) ...@@ -1636,7 +1616,7 @@ static int lbmLogInit(struct jfs_log * log)
int i; int i;
struct lbuf *lbuf; struct lbuf *lbuf;
jFYI(1, ("lbmLogInit: log:0x%p\n", log)); jfs_info("lbmLogInit: log:0x%p", log);
/* initialize current buffer cursor */ /* initialize current buffer cursor */
log->bp = NULL; log->bp = NULL;
...@@ -1690,7 +1670,7 @@ static void lbmLogShutdown(struct jfs_log * log) ...@@ -1690,7 +1670,7 @@ static void lbmLogShutdown(struct jfs_log * log)
{ {
struct lbuf *lbuf; struct lbuf *lbuf;
jFYI(1, ("lbmLogShutdown: log:0x%p\n", log)); jfs_info("lbmLogShutdown: log:0x%p", log);
lbuf = log->lbuf_free; lbuf = log->lbuf_free;
while (lbuf) { while (lbuf) {
...@@ -1804,7 +1784,7 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp) ...@@ -1804,7 +1784,7 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
* allocate a log buffer * allocate a log buffer
*/ */
*bpp = bp = lbmAllocate(log, pn); *bpp = bp = lbmAllocate(log, pn);
jFYI(1, ("lbmRead: bp:0x%p pn:0x%x\n", bp, pn)); jfs_info("lbmRead: bp:0x%p pn:0x%x", bp, pn);
bp->l_flag |= lbmREAD; bp->l_flag |= lbmREAD;
...@@ -1852,8 +1832,7 @@ static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, ...@@ -1852,8 +1832,7 @@ static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag,
struct lbuf *tail; struct lbuf *tail;
unsigned long flags; unsigned long flags;
jFYI(1, ("lbmWrite: bp:0x%p flag:0x%x pn:0x%x\n", jfs_info("lbmWrite: bp:0x%p flag:0x%x pn:0x%x", bp, flag, bp->l_pn);
bp, flag, bp->l_pn));
/* map the logical block address to physical block address */ /* map the logical block address to physical block address */
bp->l_blkno = bp->l_blkno =
...@@ -1917,8 +1896,8 @@ static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, ...@@ -1917,8 +1896,8 @@ static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag,
*/ */
static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag) static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag)
{ {
jEVENT(0, ("lbmDirectWrite: bp:0x%p flag:0x%x pn:0x%x\n", jfs_info("lbmDirectWrite: bp:0x%p flag:0x%x pn:0x%x",
bp, flag, bp->l_pn)); bp, flag, bp->l_pn);
/* /*
* initialize buffer for device driver * initialize buffer for device driver
...@@ -1950,7 +1929,7 @@ static void lbmStartIO(struct lbuf * bp) ...@@ -1950,7 +1929,7 @@ static void lbmStartIO(struct lbuf * bp)
struct bio *bio; struct bio *bio;
struct jfs_log *log = bp->l_log; struct jfs_log *log = bp->l_log;
jFYI(1, ("lbmStartIO\n")); jfs_info("lbmStartIO\n");
bio = bio_alloc(GFP_NOFS, 1); bio = bio_alloc(GFP_NOFS, 1);
bio->bi_sector = bp->l_blkno << (log->l2bsize - 9); bio->bi_sector = bp->l_blkno << (log->l2bsize - 9);
...@@ -1970,8 +1949,6 @@ static void lbmStartIO(struct lbuf * bp) ...@@ -1970,8 +1949,6 @@ static void lbmStartIO(struct lbuf * bp)
INCREMENT(lmStat.submitted); INCREMENT(lmStat.submitted);
blk_run_queues(); blk_run_queues();
jFYI(1, ("lbmStartIO done\n"));
} }
...@@ -1983,9 +1960,7 @@ static int lbmIOWait(struct lbuf * bp, int flag) ...@@ -1983,9 +1960,7 @@ static int lbmIOWait(struct lbuf * bp, int flag)
unsigned long flags; unsigned long flags;
int rc = 0; int rc = 0;
jFYI(1, jfs_info("lbmIOWait1: bp:0x%p flag:0x%x:0x%x", bp, bp->l_flag, flag);
("lbmIOWait1: bp:0x%p flag:0x%x:0x%x\n", bp, bp->l_flag,
flag));
LCACHE_LOCK(flags); /* disable+lock */ LCACHE_LOCK(flags); /* disable+lock */
...@@ -1998,9 +1973,7 @@ static int lbmIOWait(struct lbuf * bp, int flag) ...@@ -1998,9 +1973,7 @@ static int lbmIOWait(struct lbuf * bp, int flag)
LCACHE_UNLOCK(flags); /* unlock+enable */ LCACHE_UNLOCK(flags); /* unlock+enable */
jFYI(1, jfs_info("lbmIOWait2: bp:0x%p flag:0x%x:0x%x", bp, bp->l_flag, flag);
("lbmIOWait2: bp:0x%p flag:0x%x:0x%x\n", bp, bp->l_flag,
flag));
return rc; return rc;
} }
...@@ -2022,7 +1995,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) ...@@ -2022,7 +1995,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error)
/* /*
* get back jfs buffer bound to the i/o buffer * get back jfs buffer bound to the i/o buffer
*/ */
jEVENT(0, ("lbmIODone: bp:0x%p flag:0x%x\n", bp, bp->l_flag)); jfs_info("lbmIODone: bp:0x%p flag:0x%x", bp, bp->l_flag);
LCACHE_LOCK(flags); /* disable+lock */ LCACHE_LOCK(flags); /* disable+lock */
...@@ -2031,7 +2004,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) ...@@ -2031,7 +2004,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error)
if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) { if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
bp->l_flag |= lbmERROR; bp->l_flag |= lbmERROR;
jERROR(1, ("lbmIODone: I/O error in JFS log\n")); jfs_err("lbmIODone: I/O error in JFS log");
} }
bio_put(bio); bio_put(bio);
...@@ -2159,8 +2132,6 @@ int jfsIOWait(void *arg) ...@@ -2159,8 +2132,6 @@ int jfsIOWait(void *arg)
{ {
struct lbuf *bp; struct lbuf *bp;
jFYI(1, ("jfsIOWait is here!\n"));
lock_kernel(); lock_kernel();
daemonize(); daemonize();
...@@ -2199,7 +2170,7 @@ int jfsIOWait(void *arg) ...@@ -2199,7 +2170,7 @@ int jfsIOWait(void *arg)
} }
} while (!jfs_stop_threads); } while (!jfs_stop_threads);
jFYI(1,("jfsIOWait being killed!\n")); jfs_info("jfsIOWait being killed!");
complete(&jfsIOwait); complete(&jfsIOwait);
return 0; return 0;
} }
...@@ -2231,8 +2202,8 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize) ...@@ -2231,8 +2202,8 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize)
int npages = 0; int npages = 0;
struct lbuf *bp; struct lbuf *bp;
jFYI(0, ("lmLogFormat: logAddress:%Ld logSize:%d\n", jfs_info("lmLogFormat: logAddress:%Ld logSize:%d",
(long long)logAddress, logSize)); (long long)logAddress, logSize);
/* allocate a log buffer */ /* allocate a log buffer */
bp = lbmAllocate(log, 1); bp = lbmAllocate(log, 1);
......
...@@ -229,8 +229,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -229,8 +229,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
unsigned long page_index; unsigned long page_index;
unsigned long page_offset; unsigned long page_offset;
jFYI(1, ("__get_metapage: inode = 0x%p, lblock = 0x%lx\n", jfs_info("__get_metapage: inode = 0x%p, lblock = 0x%lx", inode, lblock);
inode, lblock));
if (absolute) if (absolute)
mapping = inode->i_sb->s_bdev->bd_inode->i_mapping; mapping = inode->i_sb->s_bdev->bd_inode->i_mapping;
...@@ -249,7 +248,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -249,7 +248,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
clear_bit(META_discard, &mp->flag); clear_bit(META_discard, &mp->flag);
} }
mp->count++; mp->count++;
jFYI(1, ("__get_metapage: found 0x%p, in hash\n", mp)); jfs_info("__get_metapage: found 0x%p, in hash", mp);
assert(mp->logical_size == size); assert(mp->logical_size == size);
lock_metapage(mp); lock_metapage(mp);
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
...@@ -261,7 +260,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -261,7 +260,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
l2bsize; l2bsize;
if ((page_offset + size) > PAGE_CACHE_SIZE) { if ((page_offset + size) > PAGE_CACHE_SIZE) {
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
jERROR(1, ("MetaData crosses page boundary!!\n")); jfs_err("MetaData crosses page boundary!!");
return NULL; return NULL;
} }
...@@ -320,30 +319,28 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -320,30 +319,28 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
if (new) { if (new) {
jFYI(1, jfs_info("__get_metapage: Calling grab_cache_page");
("__get_metapage: Calling grab_cache_page\n"));
mp->page = grab_cache_page(mapping, page_index); mp->page = grab_cache_page(mapping, page_index);
if (!mp->page) { if (!mp->page) {
jERROR(1, ("grab_cache_page failed!\n")); jfs_err("grab_cache_page failed!");
goto freeit; goto freeit;
} else { } else {
INCREMENT(mpStat.pagealloc); INCREMENT(mpStat.pagealloc);
unlock_page(mp->page); unlock_page(mp->page);
} }
} else { } else {
jFYI(1, jfs_info("__get_metapage: Calling read_cache_page");
("__get_metapage: Calling read_cache_page\n"));
mp->page = read_cache_page(mapping, lblock, mp->page = read_cache_page(mapping, lblock,
(filler_t *)mapping->a_ops->readpage, NULL); (filler_t *)mapping->a_ops->readpage, NULL);
if (IS_ERR(mp->page)) { if (IS_ERR(mp->page)) {
jERROR(1, ("read_cache_page failed!\n")); jfs_err("read_cache_page failed!");
goto freeit; goto freeit;
} else } else
INCREMENT(mpStat.pagealloc); INCREMENT(mpStat.pagealloc);
} }
mp->data = kmap(mp->page) + page_offset; mp->data = kmap(mp->page) + page_offset;
} }
jFYI(1, ("__get_metapage: returning = 0x%p\n", mp)); jfs_info("__get_metapage: returning = 0x%p", mp);
return mp; return mp;
freeit: freeit:
...@@ -378,7 +375,7 @@ static void __write_metapage(struct metapage * mp) ...@@ -378,7 +375,7 @@ static void __write_metapage(struct metapage * mp)
unsigned long page_offset; unsigned long page_offset;
int rc; int rc;
jFYI(1, ("__write_metapage: mp = 0x%p\n", mp)); jfs_info("__write_metapage: mp = 0x%p", mp);
if (test_bit(META_discard, &mp->flag)) { if (test_bit(META_discard, &mp->flag)) {
/* /*
...@@ -397,7 +394,7 @@ static void __write_metapage(struct metapage * mp) ...@@ -397,7 +394,7 @@ static void __write_metapage(struct metapage * mp)
page_offset + page_offset +
mp->logical_size); mp->logical_size);
if (rc) { if (rc) {
jERROR(1, ("prepare_write return %d!\n", rc)); jfs_err("prepare_write return %d!", rc);
ClearPageUptodate(mp->page); ClearPageUptodate(mp->page);
unlock_page(mp->page); unlock_page(mp->page);
clear_bit(META_dirty, &mp->flag); clear_bit(META_dirty, &mp->flag);
...@@ -407,13 +404,13 @@ static void __write_metapage(struct metapage * mp) ...@@ -407,13 +404,13 @@ static void __write_metapage(struct metapage * mp)
page_offset + page_offset +
mp->logical_size); mp->logical_size);
if (rc) { if (rc) {
jERROR(1, ("commit_write returned %d\n", rc)); jfs_err("commit_write returned %d", rc);
} }
unlock_page(mp->page); unlock_page(mp->page);
clear_bit(META_dirty, &mp->flag); clear_bit(META_dirty, &mp->flag);
jFYI(1, ("__write_metapage done\n")); jfs_info("__write_metapage done");
} }
static inline void sync_metapage(struct metapage *mp) static inline void sync_metapage(struct metapage *mp)
...@@ -435,9 +432,7 @@ void release_metapage(struct metapage * mp) ...@@ -435,9 +432,7 @@ void release_metapage(struct metapage * mp)
{ {
struct jfs_log *log; struct jfs_log *log;
jFYI(1, jfs_info("release_metapage: mp = 0x%p, flag = 0x%lx", mp, mp->flag);
("release_metapage: mp = 0x%p, flag = 0x%lx\n", mp,
mp->flag));
spin_lock(&meta_lock); spin_lock(&meta_lock);
if (test_bit(META_forced, &mp->flag)) { if (test_bit(META_forced, &mp->flag)) {
...@@ -491,7 +486,6 @@ void release_metapage(struct metapage * mp) ...@@ -491,7 +486,6 @@ void release_metapage(struct metapage * mp)
free_metapage(mp); free_metapage(mp);
} }
jFYI(1, ("release_metapage: done\n"));
} }
void __invalidate_metapages(struct inode *ip, s64 addr, int len) void __invalidate_metapages(struct inode *ip, s64 addr, int len)
......
...@@ -87,8 +87,6 @@ int jfs_mount(struct super_block *sb) ...@@ -87,8 +87,6 @@ int jfs_mount(struct super_block *sb)
struct inode *ipimap = NULL; struct inode *ipimap = NULL;
struct inode *ipbmap = NULL; struct inode *ipbmap = NULL;
jFYI(1, ("\nMount JFS\n"));
/* /*
* read/validate superblock * read/validate superblock
* (initialize mount inode from the superblock) * (initialize mount inode from the superblock)
...@@ -99,21 +97,19 @@ int jfs_mount(struct super_block *sb) ...@@ -99,21 +97,19 @@ int jfs_mount(struct super_block *sb)
ipaimap = diReadSpecial(sb, AGGREGATE_I, 0); ipaimap = diReadSpecial(sb, AGGREGATE_I, 0);
if (ipaimap == NULL) { if (ipaimap == NULL) {
jERROR(1, ("jfs_mount: Faild to read AGGREGATE_I\n")); jfs_err("jfs_mount: Faild to read AGGREGATE_I");
rc = EIO; rc = EIO;
goto errout20; goto errout20;
} }
sbi->ipaimap = ipaimap; sbi->ipaimap = ipaimap;
jFYI(1, ("jfs_mount: ipaimap:0x%p\n", ipaimap)); jfs_info("jfs_mount: ipaimap:0x%p", ipaimap);
/* /*
* initialize aggregate inode allocation map * initialize aggregate inode allocation map
*/ */
if ((rc = diMount(ipaimap))) { if ((rc = diMount(ipaimap))) {
jERROR(1, jfs_err("jfs_mount: diMount(ipaimap) failed w/rc = %d", rc);
("jfs_mount: diMount(ipaimap) failed w/rc = %d\n",
rc));
goto errout21; goto errout21;
} }
...@@ -126,7 +122,7 @@ int jfs_mount(struct super_block *sb) ...@@ -126,7 +122,7 @@ int jfs_mount(struct super_block *sb)
goto errout22; goto errout22;
} }
jFYI(1, ("jfs_mount: ipbmap:0x%p\n", ipbmap)); jfs_info("jfs_mount: ipbmap:0x%p", ipbmap);
sbi->ipbmap = ipbmap; sbi->ipbmap = ipbmap;
...@@ -134,7 +130,7 @@ int jfs_mount(struct super_block *sb) ...@@ -134,7 +130,7 @@ int jfs_mount(struct super_block *sb)
* initialize aggregate block allocation map * initialize aggregate block allocation map
*/ */
if ((rc = dbMount(ipbmap))) { if ((rc = dbMount(ipbmap))) {
jERROR(1, ("jfs_mount: dbMount failed w/rc = %d\n", rc)); jfs_err("jfs_mount: dbMount failed w/rc = %d", rc);
goto errout22; goto errout22;
} }
...@@ -152,22 +148,20 @@ int jfs_mount(struct super_block *sb) ...@@ -152,22 +148,20 @@ int jfs_mount(struct super_block *sb)
if ((sbi->mntflag & JFS_BAD_SAIT) == 0) { if ((sbi->mntflag & JFS_BAD_SAIT) == 0) {
ipaimap2 = diReadSpecial(sb, AGGREGATE_I, 1); ipaimap2 = diReadSpecial(sb, AGGREGATE_I, 1);
if (ipaimap2 == 0) { if (ipaimap2 == 0) {
jERROR(1, jfs_err("jfs_mount: Faild to read AGGREGATE_I");
("jfs_mount: Faild to read AGGREGATE_I\n"));
rc = EIO; rc = EIO;
goto errout35; goto errout35;
} }
sbi->ipaimap2 = ipaimap2; sbi->ipaimap2 = ipaimap2;
jFYI(1, ("jfs_mount: ipaimap2:0x%p\n", ipaimap2)); jfs_info("jfs_mount: ipaimap2:0x%p", ipaimap2);
/* /*
* initialize secondary aggregate inode allocation map * initialize secondary aggregate inode allocation map
*/ */
if ((rc = diMount(ipaimap2))) { if ((rc = diMount(ipaimap2))) {
jERROR(1, jfs_err("jfs_mount: diMount(ipaimap2) failed, rc = %d",
("jfs_mount: diMount(ipaimap2) failed, rc = %d\n", rc);
rc));
goto errout35; goto errout35;
} }
} else } else
...@@ -182,23 +176,22 @@ int jfs_mount(struct super_block *sb) ...@@ -182,23 +176,22 @@ int jfs_mount(struct super_block *sb)
*/ */
ipimap = diReadSpecial(sb, FILESYSTEM_I, 0); ipimap = diReadSpecial(sb, FILESYSTEM_I, 0);
if (ipimap == NULL) { if (ipimap == NULL) {
jERROR(1, ("jfs_mount: Failed to read FILESYSTEM_I\n")); jfs_err("jfs_mount: Failed to read FILESYSTEM_I");
/* open fileset secondary inode allocation map */ /* open fileset secondary inode allocation map */
rc = EIO; rc = EIO;
goto errout40; goto errout40;
} }
jFYI(1, ("jfs_mount: ipimap:0x%p\n", ipimap)); jfs_info("jfs_mount: ipimap:0x%p", ipimap);
/* map further access of per fileset inodes by the fileset inode */ /* map further access of per fileset inodes by the fileset inode */
sbi->ipimap = ipimap; sbi->ipimap = ipimap;
/* initialize fileset inode allocation map */ /* initialize fileset inode allocation map */
if ((rc = diMount(ipimap))) { if ((rc = diMount(ipimap))) {
jERROR(1, ("jfs_mount: diMount failed w/rc = %d\n", rc)); jfs_err("jfs_mount: diMount failed w/rc = %d", rc);
goto errout41; goto errout41;
} }
jFYI(1, ("Mount JFS Complete.\n"));
goto out; goto out;
/* /*
...@@ -234,9 +227,9 @@ int jfs_mount(struct super_block *sb) ...@@ -234,9 +227,9 @@ int jfs_mount(struct super_block *sb)
out: out:
if (rc) { if (rc)
jERROR(1, ("Mount JFS Failure: %d\n", rc)); jfs_err("Mount JFS Failure: %d", rc);
}
return rc; return rc;
} }
...@@ -265,13 +258,13 @@ int jfs_mount_rw(struct super_block *sb, int remount) ...@@ -265,13 +258,13 @@ int jfs_mount_rw(struct super_block *sb, int remount)
truncate_inode_pages(sbi->ipbmap->i_mapping, 0); truncate_inode_pages(sbi->ipbmap->i_mapping, 0);
diUnmount(sbi->ipimap, 1); diUnmount(sbi->ipimap, 1);
if ((rc = diMount(sbi->ipimap))) { if ((rc = diMount(sbi->ipimap))) {
jERROR(1,("jfs_mount_rw: diMount failed!\n")); jfs_err("jfs_mount_rw: diMount failed!");
return rc; return rc;
} }
dbUnmount(sbi->ipbmap, 1); dbUnmount(sbi->ipbmap, 1);
if ((rc = dbMount(sbi->ipbmap))) { if ((rc = dbMount(sbi->ipbmap))) {
jERROR(1,("jfs_mount_rw: dbMount failed!\n")); jfs_err("jfs_mount_rw: dbMount failed!");
return rc; return rc;
} }
} }
...@@ -288,8 +281,7 @@ int jfs_mount_rw(struct super_block *sb, int remount) ...@@ -288,8 +281,7 @@ int jfs_mount_rw(struct super_block *sb, int remount)
* update file system superblock; * update file system superblock;
*/ */
if ((rc = updateSuper(sb, FM_MOUNT))) { if ((rc = updateSuper(sb, FM_MOUNT))) {
jERROR(1, jfs_err("jfs_mount: updateSuper failed w/rc = %d", rc);
("jfs_mount: updateSuper failed w/rc = %d\n", rc));
lmLogClose(sb, log); lmLogClose(sb, log);
JFS_SBI(sb)->log = 0; JFS_SBI(sb)->log = 0;
return rc; return rc;
...@@ -343,15 +335,15 @@ static int chkSuper(struct super_block *sb) ...@@ -343,15 +335,15 @@ static int chkSuper(struct super_block *sb)
bsize = le32_to_cpu(j_sb->s_bsize); bsize = le32_to_cpu(j_sb->s_bsize);
#ifdef _JFS_4K #ifdef _JFS_4K
if (bsize != PSIZE) { if (bsize != PSIZE) {
jERROR(1, ("Currently only 4K block size supported!\n")); jfs_err("Currently only 4K block size supported!");
rc = EINVAL; rc = EINVAL;
goto out; goto out;
} }
#endif /* _JFS_4K */ #endif /* _JFS_4K */
jFYI(1, ("superblock: flag:0x%08x state:0x%08x size:0x%Lx\n", jfs_info("superblock: flag:0x%08x state:0x%08x size:0x%Lx",
le32_to_cpu(j_sb->s_flag), le32_to_cpu(j_sb->s_state), le32_to_cpu(j_sb->s_flag), le32_to_cpu(j_sb->s_state),
(unsigned long long) le64_to_cpu(j_sb->s_size))); (unsigned long long) le64_to_cpu(j_sb->s_size));
/* validate the descriptors for Secondary AIM and AIT */ /* validate the descriptors for Secondary AIM and AIT */
if ((j_sb->s_flag & cpu_to_le32(JFS_BAD_SAIT)) != if ((j_sb->s_flag & cpu_to_le32(JFS_BAD_SAIT)) !=
...@@ -375,15 +367,11 @@ static int chkSuper(struct super_block *sb) ...@@ -375,15 +367,11 @@ static int chkSuper(struct super_block *sb)
if ((j_sb->s_flag & cpu_to_le32(JFS_GROUPCOMMIT)) != if ((j_sb->s_flag & cpu_to_le32(JFS_GROUPCOMMIT)) !=
cpu_to_le32(JFS_GROUPCOMMIT)) cpu_to_le32(JFS_GROUPCOMMIT))
j_sb->s_flag |= cpu_to_le32(JFS_GROUPCOMMIT); j_sb->s_flag |= cpu_to_le32(JFS_GROUPCOMMIT);
jFYI(0, ("superblock: flag:0x%08x state:0x%08x size:0x%Lx\n",
le32_to_cpu(j_sb->s_flag), le32_to_cpu(j_sb->s_state),
(unsigned long long) le64_to_cpu(j_sb->s_size)));
/* validate fs state */ /* validate fs state */
if (j_sb->s_state != cpu_to_le32(FM_CLEAN) && if (j_sb->s_state != cpu_to_le32(FM_CLEAN) &&
!(sb->s_flags & MS_RDONLY)) { !(sb->s_flags & MS_RDONLY)) {
jERROR(1, jfs_err("jfs_mount: Mount Failure: File System Dirty.");
("jfs_mount: Mount Failure: File System Dirty.\n"));
rc = EINVAL; rc = EINVAL;
goto out; goto out;
} }
......
...@@ -214,7 +214,7 @@ static lid_t txLockAlloc(void) ...@@ -214,7 +214,7 @@ static lid_t txLockAlloc(void)
TxAnchor.freelock = TxLock[lid].next; TxAnchor.freelock = TxLock[lid].next;
HIGHWATERMARK(stattx.maxlid, lid); HIGHWATERMARK(stattx.maxlid, lid);
if ((++TxAnchor.tlocksInUse > TxLockHWM) && (TxAnchor.TlocksLow == 0)) { if ((++TxAnchor.tlocksInUse > TxLockHWM) && (TxAnchor.TlocksLow == 0)) {
jEVENT(0,("txLockAlloc TlocksLow\n")); jfs_info("txLockAlloc TlocksLow");
TxAnchor.TlocksLow = 1; TxAnchor.TlocksLow = 1;
wake_up(&jfs_sync_thread_wait); wake_up(&jfs_sync_thread_wait);
} }
...@@ -228,7 +228,7 @@ static void txLockFree(lid_t lid) ...@@ -228,7 +228,7 @@ static void txLockFree(lid_t lid)
TxAnchor.freelock = lid; TxAnchor.freelock = lid;
TxAnchor.tlocksInUse--; TxAnchor.tlocksInUse--;
if (TxAnchor.TlocksLow && (TxAnchor.tlocksInUse < TxLockLWM)) { if (TxAnchor.TlocksLow && (TxAnchor.tlocksInUse < TxLockLWM)) {
jEVENT(0,("txLockFree TlocksLow no more\n")); jfs_info("txLockFree TlocksLow no more");
TxAnchor.TlocksLow = 0; TxAnchor.TlocksLow = 0;
TXN_WAKEUP(&TxAnchor.lowlockwait); TXN_WAKEUP(&TxAnchor.lowlockwait);
} }
...@@ -336,7 +336,7 @@ tid_t txBegin(struct super_block *sb, int flag) ...@@ -336,7 +336,7 @@ tid_t txBegin(struct super_block *sb, int flag)
struct tblock *tblk; struct tblock *tblk;
struct jfs_log *log; struct jfs_log *log;
jFYI(1, ("txBegin: flag = 0x%x\n", flag)); jfs_info("txBegin: flag = 0x%x", flag);
log = JFS_SBI(sb)->log; log = JFS_SBI(sb)->log;
TXN_LOCK(); TXN_LOCK();
...@@ -372,7 +372,7 @@ tid_t txBegin(struct super_block *sb, int flag) ...@@ -372,7 +372,7 @@ tid_t txBegin(struct super_block *sb, int flag)
* allocate transaction id/block * allocate transaction id/block
*/ */
if ((t = TxAnchor.freetid) == 0) { if ((t = TxAnchor.freetid) == 0) {
jFYI(1, ("txBegin: waiting for free tid\n")); jfs_info("txBegin: waiting for free tid");
INCREMENT(TxStat.txBegin_freetid); INCREMENT(TxStat.txBegin_freetid);
TXN_SLEEP(&TxAnchor.freewait); TXN_SLEEP(&TxAnchor.freewait);
goto retry; goto retry;
...@@ -382,7 +382,7 @@ tid_t txBegin(struct super_block *sb, int flag) ...@@ -382,7 +382,7 @@ tid_t txBegin(struct super_block *sb, int flag)
if ((tblk->next == 0) && (current != jfsCommitTask)) { if ((tblk->next == 0) && (current != jfsCommitTask)) {
/* Save one tblk for jfsCommit thread */ /* Save one tblk for jfsCommit thread */
jFYI(1, ("txBegin: waiting for free tid\n")); jfs_info("txBegin: waiting for free tid");
INCREMENT(TxStat.txBegin_freetid); INCREMENT(TxStat.txBegin_freetid);
TXN_SLEEP(&TxAnchor.freewait); TXN_SLEEP(&TxAnchor.freewait);
goto retry; goto retry;
...@@ -413,7 +413,7 @@ tid_t txBegin(struct super_block *sb, int flag) ...@@ -413,7 +413,7 @@ tid_t txBegin(struct super_block *sb, int flag)
TXN_UNLOCK(); TXN_UNLOCK();
jFYI(1, ("txBegin: returning tid = %d\n", t)); jfs_info("txBegin: returning tid = %d", t);
return t; return t;
} }
...@@ -476,7 +476,7 @@ void txEnd(tid_t tid) ...@@ -476,7 +476,7 @@ void txEnd(tid_t tid)
struct tblock *tblk = tid_to_tblock(tid); struct tblock *tblk = tid_to_tblock(tid);
struct jfs_log *log; struct jfs_log *log;
jFYI(1, ("txEnd: tid = %d\n", tid)); jfs_info("txEnd: tid = %d", tid);
TXN_LOCK(); TXN_LOCK();
/* /*
...@@ -496,9 +496,7 @@ void txEnd(tid_t tid) ...@@ -496,9 +496,7 @@ void txEnd(tid_t tid)
* routine. * routine.
*/ */
if (tblk->flag & tblkGC_LAZY) { if (tblk->flag & tblkGC_LAZY) {
jFYI(1, jfs_info("txEnd called w/lazy tid: %d, tblk = 0x%p", tid, tblk);
("txEnd called w/lazy tid: %d, tblk = 0x%p\n",
tid, tblk));
TXN_UNLOCK(); TXN_UNLOCK();
spin_lock_irq(&log->gclock); // LOGGC_LOCK spin_lock_irq(&log->gclock); // LOGGC_LOCK
...@@ -507,7 +505,7 @@ void txEnd(tid_t tid) ...@@ -507,7 +505,7 @@ void txEnd(tid_t tid)
return; return;
} }
jFYI(1, ("txEnd: tid: %d, tblk = 0x%p\n", tid, tblk)); jfs_info("txEnd: tid: %d, tblk = 0x%p", tid, tblk);
assert(tblk->next == 0); assert(tblk->next == 0);
...@@ -529,7 +527,7 @@ void txEnd(tid_t tid) ...@@ -529,7 +527,7 @@ void txEnd(tid_t tid)
/* forward log syncpt */ /* forward log syncpt */
/* lmSync(log); */ /* lmSync(log); */
jFYI(1, (" log barrier off: 0x%x\n", log->lsn)); jfs_info(" log barrier off: 0x%x", log->lsn);
/* enable new transactions start */ /* enable new transactions start */
clear_bit(log_SYNCBARRIER, &log->flag); clear_bit(log_SYNCBARRIER, &log->flag);
...@@ -544,7 +542,6 @@ void txEnd(tid_t tid) ...@@ -544,7 +542,6 @@ void txEnd(tid_t tid)
TXN_WAKEUP(&TxAnchor.freewait); TXN_WAKEUP(&TxAnchor.freewait);
TXN_UNLOCK(); TXN_UNLOCK();
jFYI(1, ("txEnd: exitting\n"));
} }
...@@ -589,8 +586,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, ...@@ -589,8 +586,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
if (lid == 0) if (lid == 0)
goto allocateLock; goto allocateLock;
jFYI(1, ("txLock: tid:%d ip:0x%p mp:0x%p lid:%d\n", jfs_info("txLock: tid:%d ip:0x%p mp:0x%p lid:%d", tid, ip, mp, lid);
tid, ip, mp, lid));
/* is page locked by the requester transaction ? */ /* is page locked by the requester transaction ? */
tlck = lid_to_tlock(lid); tlck = lid_to_tlock(lid);
...@@ -676,9 +672,8 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, ...@@ -676,9 +672,8 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
mark_metapage_dirty(mp); mark_metapage_dirty(mp);
atomic_inc(&mp->nohomeok); atomic_inc(&mp->nohomeok);
jFYI(1, jfs_info("locking mp = 0x%p, nohomeok = %d tid = %d tlck = 0x%p",
("locking mp = 0x%p, nohomeok = %d tid = %d tlck = 0x%p\n", mp, atomic_read(&mp->nohomeok), tid, tlck);
mp, atomic_read(&mp->nohomeok), tid, tlck));
/* if anonymous transaction, and buffer is on the group /* if anonymous transaction, and buffer is on the group
* commit synclist, mark inode to show this. This will * commit synclist, mark inode to show this. This will
...@@ -774,7 +769,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, ...@@ -774,7 +769,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
break; break;
default: default:
jERROR(1, ("UFO tlock:0x%p\n", tlck)); jfs_err("UFO tlock:0x%p", tlck);
} }
/* /*
...@@ -794,7 +789,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, ...@@ -794,7 +789,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
/* Only locks on ipimap or ipaimap should reach here */ /* Only locks on ipimap or ipaimap should reach here */
/* assert(jfs_ip->fileset == AGGREGATE_I); */ /* assert(jfs_ip->fileset == AGGREGATE_I); */
if (jfs_ip->fileset != AGGREGATE_I) { if (jfs_ip->fileset != AGGREGATE_I) {
jERROR(1, ("txLock: trying to lock locked page!\n")); jfs_err("txLock: trying to lock locked page!");
dump_mem("ip", ip, sizeof(struct inode)); dump_mem("ip", ip, sizeof(struct inode));
dump_mem("mp", mp, sizeof(struct metapage)); dump_mem("mp", mp, sizeof(struct metapage));
dump_mem("Locker's tblk", tid_to_tblock(tid), dump_mem("Locker's tblk", tid_to_tblock(tid),
...@@ -805,10 +800,10 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, ...@@ -805,10 +800,10 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
INCREMENT(stattx.waitlock); /* statistics */ INCREMENT(stattx.waitlock); /* statistics */
release_metapage(mp); release_metapage(mp);
jEVENT(0, ("txLock: in waitLock, tid = %d, xtid = %d, lid = %d\n", jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d",
tid, xtid, lid)); tid, xtid, lid);
TXN_SLEEP_DROP_LOCK(&tid_to_tblock(xtid)->waitor); TXN_SLEEP_DROP_LOCK(&tid_to_tblock(xtid)->waitor);
jEVENT(0, ("txLock: awakened tid = %d, lid = %d\n", tid, lid)); jfs_info("txLock: awakened tid = %d, lid = %d", tid, lid);
return NULL; return NULL;
} }
...@@ -869,7 +864,7 @@ static void txUnlock(struct tblock * tblk) ...@@ -869,7 +864,7 @@ static void txUnlock(struct tblock * tblk)
struct jfs_log *log; struct jfs_log *log;
int difft, diffp; int difft, diffp;
jFYI(1, ("txUnlock: tblk = 0x%p\n", tblk)); jfs_info("txUnlock: tblk = 0x%p", tblk);
log = JFS_SBI(tblk->sb)->log; log = JFS_SBI(tblk->sb)->log;
/* /*
...@@ -879,7 +874,7 @@ static void txUnlock(struct tblock * tblk) ...@@ -879,7 +874,7 @@ static void txUnlock(struct tblock * tblk)
tlck = lid_to_tlock(lid); tlck = lid_to_tlock(lid);
next = tlck->next; next = tlck->next;
jFYI(1, ("unlocking lid = %d, tlck = 0x%p\n", lid, tlck)); jfs_info("unlocking lid = %d, tlck = 0x%p", lid, tlck);
/* unbind page from tlock */ /* unbind page from tlock */
if ((mp = tlck->mp) != NULL && if ((mp = tlck->mp) != NULL &&
...@@ -1113,7 +1108,7 @@ int txCommit(tid_t tid, /* transaction identifier */ ...@@ -1113,7 +1108,7 @@ int txCommit(tid_t tid, /* transaction identifier */
ino_t top; ino_t top;
struct super_block *sb; struct super_block *sb;
jFYI(1, ("txCommit, tid = %d, flag = %d\n", tid, flag)); jfs_info("txCommit, tid = %d, flag = %d", tid, flag);
/* is read-only file system ? */ /* is read-only file system ? */
if (isReadOnly(iplist[0])) { if (isReadOnly(iplist[0])) {
rc = EROFS; rc = EROFS;
...@@ -1312,7 +1307,7 @@ int txCommit(tid_t tid, /* transaction identifier */ ...@@ -1312,7 +1307,7 @@ int txCommit(tid_t tid, /* transaction identifier */
rc = rc1; rc = rc1;
TheEnd: TheEnd:
jFYI(1, ("txCommit: tid = %d, returning %d\n", tid, rc)); jfs_info("txCommit: tid = %d, returning %d", tid, rc);
return rc; return rc;
} }
...@@ -1376,7 +1371,7 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) ...@@ -1376,7 +1371,7 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd)
break; break;
default: default:
jERROR(1, ("UFO tlock:0x%p\n", tlck)); jfs_err("UFO tlock:0x%p", tlck);
} }
if (tlck->mp) if (tlck->mp)
release_metapage(tlck->mp); release_metapage(tlck->mp);
...@@ -1462,9 +1457,8 @@ int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1462,9 +1457,8 @@ int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
/* mark page as homeward bound */ /* mark page as homeward bound */
tlck->flag |= tlckWRITEPAGE; tlck->flag |= tlckWRITEPAGE;
} else { } else
jERROR(2, ("diLog: UFO type tlck:0x%p\n", tlck)); jfs_err("diLog: UFO type tlck:0x%p", tlck);
}
#ifdef _JFS_WIP #ifdef _JFS_WIP
/* /*
* alloc/free external EA extent * alloc/free external EA extent
...@@ -1754,9 +1748,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1754,9 +1748,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->xdlist = &p->xad[lwm]; xadlock->xdlist = &p->xad[lwm];
tblk->xflag &= ~COMMIT_LAZY; tblk->xflag &= ~COMMIT_LAZY;
} }
jFYI(1, jfs_info("xtLog: alloc ip:0x%p mp:0x%p tlck:0x%p lwm:%d "
("xtLog: alloc ip:0x%p mp:0x%p tlck:0x%p lwm:%d count:%d\n", "count:%d", tlck->ip, mp, tlck, lwm, xadlock->count);
tlck->ip, mp, tlck, lwm, xadlock->count));
maplock->index = 1; maplock->index = 1;
...@@ -1848,9 +1841,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1848,9 +1841,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->xdlist = &p->xad[XTENTRYSTART]; xadlock->xdlist = &p->xad[XTENTRYSTART];
tblk->xflag &= ~COMMIT_LAZY; tblk->xflag &= ~COMMIT_LAZY;
} }
jFYI(1, jfs_info("xtLog: free ip:0x%p mp:0x%p count:%d lwm:2",
("xtLog: free ip:0x%p mp:0x%p count:%d lwm:2\n", tlck->ip, mp, xadlock->count);
tlck->ip, mp, xadlock->count));
maplock->index = 1; maplock->index = 1;
...@@ -1978,9 +1970,9 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1978,9 +1970,9 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->count = next - lwm; xadlock->count = next - lwm;
xadlock->xdlist = &p->xad[lwm]; xadlock->xdlist = &p->xad[lwm];
jFYI(1, jfs_info("xtLog: alloc ip:0x%p mp:0x%p count:%d "
("xtLog: alloc ip:0x%p mp:0x%p count:%d lwm:%d next:%d\n", "lwm:%d next:%d",
tlck->ip, mp, xadlock->count, lwm, next)); tlck->ip, mp, xadlock->count, lwm, next);
maplock->index++; maplock->index++;
xadlock++; xadlock++;
} }
...@@ -2002,9 +1994,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2002,9 +1994,8 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
pxdlock->count = 1; pxdlock->count = 1;
pxdlock->pxd = tpxd; pxdlock->pxd = tpxd;
jFYI(1, jfs_info("xtLog: truncate ip:0x%p mp:0x%p count:%d "
("xtLog: truncate ip:0x%p mp:0x%p count:%d hwm:%d\n", "hwm:%d", ip, mp, pxdlock->count, hwm);
ip, mp, pxdlock->count, hwm));
maplock->index++; maplock->index++;
xadlock++; xadlock++;
} }
...@@ -2022,9 +2013,9 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2022,9 +2013,9 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->count = hwm - next + 1; xadlock->count = hwm - next + 1;
xadlock->xdlist = &p->xad[next]; xadlock->xdlist = &p->xad[next];
jFYI(1, jfs_info("xtLog: free ip:0x%p mp:0x%p count:%d "
("xtLog: free ip:0x%p mp:0x%p count:%d next:%d hwm:%d\n", "next:%d hwm:%d",
tlck->ip, mp, xadlock->count, next, hwm)); tlck->ip, mp, xadlock->count, next, hwm);
maplock->index++; maplock->index++;
} }
...@@ -2111,9 +2102,9 @@ void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2111,9 +2102,9 @@ void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
lrd->log.updatemap.pxd = pxdlock->pxd; lrd->log.updatemap.pxd = pxdlock->pxd;
lrd->backchain = lrd->backchain =
cpu_to_le32(lmLog(log, tblk, lrd, NULL)); cpu_to_le32(lmLog(log, tblk, lrd, NULL));
jFYI(1, ("mapLog: xaddr:0x%lx xlen:0x%x\n", jfs_info("mapLog: xaddr:0x%lx xlen:0x%x",
(ulong) addressPXD(&pxdlock->pxd), (ulong) addressPXD(&pxdlock->pxd),
lengthPXD(&pxdlock->pxd))); lengthPXD(&pxdlock->pxd));
} }
/* update bmap */ /* update bmap */
...@@ -2429,9 +2420,8 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock, ...@@ -2429,9 +2420,8 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
dbUpdatePMap(ipbmap, FALSE, xaddr, dbUpdatePMap(ipbmap, FALSE, xaddr,
(s64) xlen, tblk); (s64) xlen, tblk);
xad->flag &= ~(XAD_NEW | XAD_EXTENDED); xad->flag &= ~(XAD_NEW | XAD_EXTENDED);
jFYI(1, jfs_info("allocPMap: xaddr:0x%lx xlen:%d",
("allocPMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} }
} }
} else if (maplock->flag & mlckALLOCPXD) { } else if (maplock->flag & mlckALLOCPXD) {
...@@ -2439,9 +2429,7 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock, ...@@ -2439,9 +2429,7 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
xaddr = addressPXD(&pxdlock->pxd); xaddr = addressPXD(&pxdlock->pxd);
xlen = lengthPXD(&pxdlock->pxd); xlen = lengthPXD(&pxdlock->pxd);
dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen, tblk); dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen, tblk);
jFYI(1, jfs_info("allocPMap: xaddr:0x%lx xlen:%d", (ulong) xaddr, xlen);
("allocPMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr,
xlen));
} else { /* (maplock->flag & mlckALLOCPXDLIST) */ } else { /* (maplock->flag & mlckALLOCPXDLIST) */
pxdlistlock = (struct xdlistlock *) maplock; pxdlistlock = (struct xdlistlock *) maplock;
...@@ -2451,9 +2439,8 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock, ...@@ -2451,9 +2439,8 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
xlen = lengthPXD(pxd); xlen = lengthPXD(pxd);
dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen, dbUpdatePMap(ipbmap, FALSE, xaddr, (s64) xlen,
tblk); tblk);
jFYI(1, jfs_info("allocPMap: xaddr:0x%lx xlen:%d",
("allocPMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} }
} }
} }
...@@ -2479,9 +2466,8 @@ void txFreeMap(struct inode *ip, ...@@ -2479,9 +2466,8 @@ void txFreeMap(struct inode *ip,
pxd_t *pxd; pxd_t *pxd;
int n; int n;
jFYI(1, jfs_info("txFreeMap: tblk:0x%p maplock:0x%p maptype:0x%x",
("txFreeMap: tblk:0x%p maplock:0x%p maptype:0x%x\n", tblk, maplock, maptype);
tblk, maplock, maptype));
/* /*
* free from persistent map; * free from persistent map;
...@@ -2496,9 +2482,9 @@ void txFreeMap(struct inode *ip, ...@@ -2496,9 +2482,9 @@ void txFreeMap(struct inode *ip,
xlen = lengthXAD(xad); xlen = lengthXAD(xad);
dbUpdatePMap(ipbmap, TRUE, xaddr, dbUpdatePMap(ipbmap, TRUE, xaddr,
(s64) xlen, tblk); (s64) xlen, tblk);
jFYI(1, jfs_info("freePMap: xaddr:0x%lx "
("freePMap: xaddr:0x%lx xlen:%d\n", "xlen:%d",
(ulong) xaddr, xlen)); (ulong) xaddr, xlen);
} }
} }
} else if (maplock->flag & mlckFREEPXD) { } else if (maplock->flag & mlckFREEPXD) {
...@@ -2507,9 +2493,8 @@ void txFreeMap(struct inode *ip, ...@@ -2507,9 +2493,8 @@ void txFreeMap(struct inode *ip,
xlen = lengthPXD(&pxdlock->pxd); xlen = lengthPXD(&pxdlock->pxd);
dbUpdatePMap(ipbmap, TRUE, xaddr, (s64) xlen, dbUpdatePMap(ipbmap, TRUE, xaddr, (s64) xlen,
tblk); tblk);
jFYI(1, jfs_info("freePMap: xaddr:0x%lx xlen:%d",
("freePMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} else { /* (maplock->flag & mlckALLOCPXDLIST) */ } else { /* (maplock->flag & mlckALLOCPXDLIST) */
pxdlistlock = (struct xdlistlock *) maplock; pxdlistlock = (struct xdlistlock *) maplock;
...@@ -2519,9 +2504,8 @@ void txFreeMap(struct inode *ip, ...@@ -2519,9 +2504,8 @@ void txFreeMap(struct inode *ip,
xlen = lengthPXD(pxd); xlen = lengthPXD(pxd);
dbUpdatePMap(ipbmap, TRUE, xaddr, dbUpdatePMap(ipbmap, TRUE, xaddr,
(s64) xlen, tblk); (s64) xlen, tblk);
jFYI(1, jfs_info("freePMap: xaddr:0x%lx xlen:%d",
("freePMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} }
} }
} }
...@@ -2538,18 +2522,16 @@ void txFreeMap(struct inode *ip, ...@@ -2538,18 +2522,16 @@ void txFreeMap(struct inode *ip,
xlen = lengthXAD(xad); xlen = lengthXAD(xad);
dbFree(ip, xaddr, (s64) xlen); dbFree(ip, xaddr, (s64) xlen);
xad->flag = 0; xad->flag = 0;
jFYI(1, jfs_info("freeWMap: xaddr:0x%lx xlen:%d",
("freeWMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} }
} else if (maplock->flag & mlckFREEPXD) { } else if (maplock->flag & mlckFREEPXD) {
pxdlock = (struct pxd_lock *) maplock; pxdlock = (struct pxd_lock *) maplock;
xaddr = addressPXD(&pxdlock->pxd); xaddr = addressPXD(&pxdlock->pxd);
xlen = lengthPXD(&pxdlock->pxd); xlen = lengthPXD(&pxdlock->pxd);
dbFree(ip, xaddr, (s64) xlen); dbFree(ip, xaddr, (s64) xlen);
jFYI(1, jfs_info("freeWMap: xaddr:0x%lx xlen:%d",
("freeWMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} else { /* (maplock->flag & mlckFREEPXDLIST) */ } else { /* (maplock->flag & mlckFREEPXDLIST) */
pxdlistlock = (struct xdlistlock *) maplock; pxdlistlock = (struct xdlistlock *) maplock;
...@@ -2558,9 +2540,8 @@ void txFreeMap(struct inode *ip, ...@@ -2558,9 +2540,8 @@ void txFreeMap(struct inode *ip,
xaddr = addressPXD(pxd); xaddr = addressPXD(pxd);
xlen = lengthPXD(pxd); xlen = lengthPXD(pxd);
dbFree(ip, xaddr, (s64) xlen); dbFree(ip, xaddr, (s64) xlen);
jFYI(1, jfs_info("freeWMap: xaddr:0x%lx xlen:%d",
("freeWMap: xaddr:0x%lx xlen:%d\n", (ulong) xaddr, xlen);
(ulong) xaddr, xlen));
} }
} }
} }
...@@ -2625,7 +2606,7 @@ void txAbort(tid_t tid, int dirty) ...@@ -2625,7 +2606,7 @@ void txAbort(tid_t tid, int dirty)
struct metapage *mp; struct metapage *mp;
struct tblock *tblk = tid_to_tblock(tid); struct tblock *tblk = tid_to_tblock(tid);
jEVENT(1, ("txAbort: tid:%d dirty:0x%x\n", tid, dirty)); jfs_warn("txAbort: tid:%d dirty:0x%x", tid, dirty);
/* /*
* free tlocks of the transaction * free tlocks of the transaction
...@@ -2688,7 +2669,7 @@ void txAbortCommit(struct commit * cd, int exval) ...@@ -2688,7 +2669,7 @@ void txAbortCommit(struct commit * cd, int exval)
struct metapage *mp; struct metapage *mp;
assert(exval == EIO || exval == ENOMEM); assert(exval == EIO || exval == ENOMEM);
jEVENT(1, ("txAbortCommit: cd:0x%p\n", cd)); jfs_warn("txAbortCommit: cd:0x%p", cd);
/* /*
* free tlocks of the transaction * free tlocks of the transaction
...@@ -2743,12 +2724,11 @@ void txLazyCommit(struct tblock * tblk) ...@@ -2743,12 +2724,11 @@ void txLazyCommit(struct tblock * tblk)
((tblk->flag & tblkGC_UNLOCKED) == 0)) { ((tblk->flag & tblkGC_UNLOCKED) == 0)) {
/* We must have gotten ahead of the user thread /* We must have gotten ahead of the user thread
*/ */
jFYI(1, jfs_info("jfs_lazycommit: tblk 0x%p not unlocked", tblk);
("jfs_lazycommit: tblk 0x%p not unlocked\n", tblk));
schedule(); schedule();
} }
jFYI(1, ("txLazyCommit: processing tblk 0x%p\n", tblk)); jfs_info("txLazyCommit: processing tblk 0x%p", tblk);
txUpdateMap(tblk); txUpdateMap(tblk);
...@@ -2775,7 +2755,7 @@ void txLazyCommit(struct tblock * tblk) ...@@ -2775,7 +2755,7 @@ void txLazyCommit(struct tblock * tblk)
} else } else
spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK
jFYI(1, ("txLazyCommit: done: tblk = 0x%p\n", tblk)); jfs_info("txLazyCommit: done: tblk = 0x%p", tblk);
} }
/* /*
...@@ -2861,9 +2841,9 @@ int jfs_lazycommit(void *arg) ...@@ -2861,9 +2841,9 @@ int jfs_lazycommit(void *arg)
} while (!jfs_stop_threads); } while (!jfs_stop_threads);
if (TxAnchor.unlock_queue) if (TxAnchor.unlock_queue)
jERROR(1, ("jfs_lazycommit being killed with pending transactions!\n")); jfs_err("jfs_lazycommit being killed w/pending transactions!");
else else
jFYI(1, ("jfs_lazycommit being killed\n")); jfs_info("jfs_lazycommit being killed\n");
complete(&jfsIOwait); complete(&jfsIOwait);
return 0; return 0;
} }
...@@ -3077,7 +3057,7 @@ int jfs_sync(void *arg) ...@@ -3077,7 +3057,7 @@ int jfs_sync(void *arg)
} }
} while (!jfs_stop_threads); } while (!jfs_stop_threads);
jFYI(1, ("jfs_sync being killed\n")); jfs_info("jfs_sync being killed");
complete(&jfsIOwait); complete(&jfsIOwait);
return 0; return 0;
} }
......
...@@ -58,7 +58,7 @@ int jfs_umount(struct super_block *sb) ...@@ -58,7 +58,7 @@ int jfs_umount(struct super_block *sb)
struct jfs_log *log; struct jfs_log *log;
int rc = 0; int rc = 0;
jFYI(1, ("\n UnMount JFS: sb:0x%p\n", sb)); jfs_info("UnMount JFS: sb:0x%p", sb);
/* /*
* update superblock and close log * update superblock and close log
...@@ -74,7 +74,6 @@ int jfs_umount(struct super_block *sb) ...@@ -74,7 +74,6 @@ int jfs_umount(struct super_block *sb)
/* /*
* close fileset inode allocation map (aka fileset inode) * close fileset inode allocation map (aka fileset inode)
*/ */
jEVENT(0, ("jfs_umount: close ipimap:0x%p\n", ipimap));
diUnmount(ipimap, 0); diUnmount(ipimap, 0);
diFreeSpecial(ipimap); diFreeSpecial(ipimap);
...@@ -85,7 +84,6 @@ int jfs_umount(struct super_block *sb) ...@@ -85,7 +84,6 @@ int jfs_umount(struct super_block *sb)
*/ */
ipaimap2 = sbi->ipaimap2; ipaimap2 = sbi->ipaimap2;
if (ipaimap2) { if (ipaimap2) {
jEVENT(0, ("jfs_umount: close ipaimap2:0x%p\n", ipaimap2));
diUnmount(ipaimap2, 0); diUnmount(ipaimap2, 0);
diFreeSpecial(ipaimap2); diFreeSpecial(ipaimap2);
sbi->ipaimap2 = NULL; sbi->ipaimap2 = NULL;
...@@ -95,7 +93,6 @@ int jfs_umount(struct super_block *sb) ...@@ -95,7 +93,6 @@ int jfs_umount(struct super_block *sb)
* close aggregate inode allocation map * close aggregate inode allocation map
*/ */
ipaimap = sbi->ipaimap; ipaimap = sbi->ipaimap;
jEVENT(0, ("jfs_umount: close ipaimap:0x%p\n", ipaimap));
diUnmount(ipaimap, 0); diUnmount(ipaimap, 0);
diFreeSpecial(ipaimap); diFreeSpecial(ipaimap);
sbi->ipaimap = NULL; sbi->ipaimap = NULL;
...@@ -103,7 +100,6 @@ int jfs_umount(struct super_block *sb) ...@@ -103,7 +100,6 @@ int jfs_umount(struct super_block *sb)
/* /*
* close aggregate block allocation map * close aggregate block allocation map
*/ */
jEVENT(0, ("jfs_umount: close ipbmap:%p\n", ipbmap));
dbUnmount(ipbmap, 0); dbUnmount(ipbmap, 0);
diFreeSpecial(ipbmap); diFreeSpecial(ipbmap);
...@@ -134,7 +130,7 @@ int jfs_umount(struct super_block *sb) ...@@ -134,7 +130,7 @@ int jfs_umount(struct super_block *sb)
*/ */
rc = lmLogClose(sb, log); rc = lmLogClose(sb, log);
} }
jFYI(0, (" UnMount JFS Complete: %d\n", rc)); jfs_info("UnMount JFS Complete: rc = %d", rc);
return rc; return rc;
} }
......
...@@ -47,7 +47,6 @@ int jfs_strfromUCS_le(char *to, const wchar_t * from, /* LITTLE ENDIAN */ ...@@ -47,7 +47,6 @@ int jfs_strfromUCS_le(char *to, const wchar_t * from, /* LITTLE ENDIAN */
} }
} }
to[outlen] = 0; to[outlen] = 0;
jEVENT(0, ("jfs_strfromUCS returning %d - '%s'\n", outlen, to));
return outlen; return outlen;
} }
...@@ -63,22 +62,17 @@ int jfs_strtoUCS(wchar_t * to, ...@@ -63,22 +62,17 @@ int jfs_strtoUCS(wchar_t * to,
int charlen; int charlen;
int i; int i;
jEVENT(0, ("jfs_strtoUCS - '%s'\n", from));
for (i = 0; len && *from; i++, from += charlen, len -= charlen) { for (i = 0; len && *from; i++, from += charlen, len -= charlen) {
charlen = codepage->char2uni(from, len, &to[i]); charlen = codepage->char2uni(from, len, &to[i]);
if (charlen < 1) { if (charlen < 1) {
jERROR(1, ("jfs_strtoUCS: char2uni returned %d.\n", jfs_err("jfs_strtoUCS: char2uni returned %d.", charlen);
charlen)); jfs_err("charset = %s, char = 0x%x",
jERROR(1, ("charset = %s, char = 0x%x\n", codepage->charset, (unsigned char) *from);
codepage->charset, (unsigned char) *from));
to[i] = 0x003f; /* a question mark */ to[i] = 0x003f; /* a question mark */
charlen = 1; charlen = 1;
} }
} }
jEVENT(0, (" returning %d\n", i));
to[i] = 0; to[i] = 0;
return i; return i;
} }
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
(le16_to_cpu((P)->header.nextindex) > le16_to_cpu((P)->header.maxentry)) ||\ (le16_to_cpu((P)->header.nextindex) > le16_to_cpu((P)->header.maxentry)) ||\
(le16_to_cpu((P)->header.maxentry) > (((BN)==0)?XTROOTMAXSLOT:PSIZE>>L2XTSLOTSIZE)))\ (le16_to_cpu((P)->header.maxentry) > (((BN)==0)?XTROOTMAXSLOT:PSIZE>>L2XTSLOTSIZE)))\
{\ {\
jERROR(1,("XT_GETPAGE: xtree page corrupt\n"));\ jfs_err("XT_GETPAGE: xtree page corrupt");\
BT_PUTPAGE(MP);\ BT_PUTPAGE(MP);\
updateSuper((IP)->i_sb, FM_DIRTY);\ updateSuper((IP)->i_sb, FM_DIRTY);\
MP = NULL;\ MP = NULL;\
...@@ -169,9 +169,8 @@ int xtLookup(struct inode *ip, s64 lstart, ...@@ -169,9 +169,8 @@ int xtLookup(struct inode *ip, s64 lstart,
size = ((u64) ip->i_size + (JFS_SBI(ip->i_sb)->bsize - 1)) >> size = ((u64) ip->i_size + (JFS_SBI(ip->i_sb)->bsize - 1)) >>
JFS_SBI(ip->i_sb)->l2bsize; JFS_SBI(ip->i_sb)->l2bsize;
if (lstart >= size) { if (lstart >= size) {
jERROR(1, jfs_err("xtLookup: lstart (0x%lx) >= size (0x%lx)",
("xtLookup: lstart (0x%lx) >= size (0x%lx)\n", (ulong) lstart, (ulong) size);
(ulong) lstart, (ulong) size));
return 0; return 0;
} }
} }
...@@ -181,7 +180,7 @@ int xtLookup(struct inode *ip, s64 lstart, ...@@ -181,7 +180,7 @@ int xtLookup(struct inode *ip, s64 lstart,
*/ */
//search: //search:
if ((rc = xtSearch(ip, lstart, &cmp, &btstack, 0))) { if ((rc = xtSearch(ip, lstart, &cmp, &btstack, 0))) {
jERROR(1, ("xtLookup: xtSearch returned %d\n", rc)); jfs_err("xtLookup: xtSearch returned %d", rc);
return rc; return rc;
} }
...@@ -198,10 +197,8 @@ int xtLookup(struct inode *ip, s64 lstart, ...@@ -198,10 +197,8 @@ int xtLookup(struct inode *ip, s64 lstart,
* lstart is a page start address, * lstart is a page start address,
* i.e., lstart cannot start in a hole; * i.e., lstart cannot start in a hole;
*/ */
if (cmp) { if (cmp)
jFYI(1, ("xtLookup: cmp = %d\n", cmp));
goto out; goto out;
}
/* /*
* lxd covered by xad * lxd covered by xad
...@@ -212,10 +209,6 @@ int xtLookup(struct inode *ip, s64 lstart, ...@@ -212,10 +209,6 @@ int xtLookup(struct inode *ip, s64 lstart,
xend = xoff + xlen; xend = xoff + xlen;
xaddr = addressXAD(xad); xaddr = addressXAD(xad);
jEVENT(0,
("index = %d, xoff = 0x%lx, xlen = 0x%x, xaddr = 0x%lx\n",
index, (ulong) xoff, xlen, (ulong) xaddr));
/* initialize new pxd */ /* initialize new pxd */
*pflag = xad->flag; *pflag = xad->flag;
*paddr = xaddr + (lstart - xoff); *paddr = xaddr + (lstart - xoff);
...@@ -802,8 +795,7 @@ int xtInsert(tid_t tid, /* transaction id */ ...@@ -802,8 +795,7 @@ int xtInsert(tid_t tid, /* transaction id */
struct tlock *tlck; struct tlock *tlck;
struct xtlock *xtlck; struct xtlock *xtlck;
jFYI(1, jfs_info("xtInsert: nxoff:0x%lx nxlen:0x%x", (ulong) xoff, xlen);
("xtInsert: nxoff:0x%lx nxlen:0x%x\n", (ulong) xoff, xlen));
/* /*
* search for the entry location at which to insert: * search for the entry location at which to insert:
...@@ -1248,8 +1240,7 @@ xtSplitPage(tid_t tid, struct inode *ip, ...@@ -1248,8 +1240,7 @@ xtSplitPage(tid_t tid, struct inode *ip,
if (rmp == NULL) if (rmp == NULL)
return EIO; return EIO;
jEVENT(0, jfs_info("xtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp);
("xtSplitPage: ip:0x%p smp:0x%p rmp:0x%p\n", ip, smp, rmp));
BT_MARK_DIRTY(rmp, ip); BT_MARK_DIRTY(rmp, ip);
/* /*
...@@ -1324,7 +1315,7 @@ xtSplitPage(tid_t tid, struct inode *ip, ...@@ -1324,7 +1315,7 @@ xtSplitPage(tid_t tid, struct inode *ip,
ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd));
jEVENT(0, ("xtSplitPage: sp:0x%p rp:0x%p\n", sp, rp)); jfs_info("xtSplitPage: sp:0x%p rp:0x%p", sp, rp);
return 0; return 0;
} }
...@@ -1440,7 +1431,7 @@ xtSplitPage(tid_t tid, struct inode *ip, ...@@ -1440,7 +1431,7 @@ xtSplitPage(tid_t tid, struct inode *ip,
ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd));
jEVENT(0, ("xtSplitPage: sp:0x%p rp:0x%p\n", sp, rp)); jfs_info("xtSplitPage: sp:0x%p rp:0x%p", sp, rp);
return rc; return rc;
} }
...@@ -1496,7 +1487,7 @@ xtSplitRoot(tid_t tid, ...@@ -1496,7 +1487,7 @@ xtSplitRoot(tid_t tid,
if (rmp == NULL) if (rmp == NULL)
return EIO; return EIO;
jEVENT(0, ("xtSplitRoot: ip:0x%p rmp:0x%p\n", ip, rmp)); jfs_info("xtSplitRoot: ip:0x%p rmp:0x%p", ip, rmp);
/* /*
* acquire a transaction lock on the new right page; * acquire a transaction lock on the new right page;
...@@ -1581,7 +1572,7 @@ xtSplitRoot(tid_t tid, ...@@ -1581,7 +1572,7 @@ xtSplitRoot(tid_t tid,
ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd));
jEVENT(0, ("xtSplitRoot: sp:0x%p rp:0x%p\n", sp, rp)); jfs_info("xtSplitRoot: sp:0x%p rp:0x%p", sp, rp);
return 0; return 0;
} }
...@@ -1615,8 +1606,7 @@ int xtExtend(tid_t tid, /* transaction id */ ...@@ -1615,8 +1606,7 @@ int xtExtend(tid_t tid, /* transaction id */
struct xtlock *xtlck = 0; struct xtlock *xtlck = 0;
int rootsplit = 0; int rootsplit = 0;
jFYI(1, jfs_info("xtExtend: nxoff:0x%lx nxlen:0x%x", (ulong) xoff, xlen);
("xtExtend: nxoff:0x%lx nxlen:0x%x\n", (ulong) xoff, xlen));
/* there must exist extent to be extended */ /* there must exist extent to be extended */
if ((rc = xtSearch(ip, xoff - 1, &cmp, &btstack, XT_INSERT))) if ((rc = xtSearch(ip, xoff - 1, &cmp, &btstack, XT_INSERT)))
...@@ -1628,9 +1618,6 @@ int xtExtend(tid_t tid, /* transaction id */ ...@@ -1628,9 +1618,6 @@ int xtExtend(tid_t tid, /* transaction id */
/* extension must be contiguous */ /* extension must be contiguous */
xad = &p->xad[index]; xad = &p->xad[index];
jFYI(0, ("xtExtend: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n",
(ulong) offsetXAD(xad), lengthXAD(xad),
(ulong) addressXAD(xad)));
assert((offsetXAD(xad) + lengthXAD(xad)) == xoff); assert((offsetXAD(xad) + lengthXAD(xad)) == xoff);
/* /*
...@@ -1893,10 +1880,6 @@ printf("xtTailgate: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n", ...@@ -1893,10 +1880,6 @@ printf("xtTailgate: xoff:0x%lx xlen:0x%x xaddr:0x%lx\n",
PXDlength(&pxdlock->pxd, rlen); PXDlength(&pxdlock->pxd, rlen);
pxdlock->index = 1; pxdlock->index = 1;
} }
jEVENT(0,
("xtTailgate: free extent xaddr:0x%lx xlen:0x%x\n",
(ulong) addressPXD(&pxdlock->pxd),
lengthPXD(&pxdlock->pxd)));
} else } else
/* free from WMAP */ /* free from WMAP */
dbFree(ip, addressXAD(xad) + llen, (s64) rlen); dbFree(ip, addressXAD(xad) + llen, (s64) rlen);
...@@ -2408,9 +2391,8 @@ int xtAppend(tid_t tid, /* transaction id */ ...@@ -2408,9 +2391,8 @@ int xtAppend(tid_t tid, /* transaction id */
xaddr = *xaddrp; xaddr = *xaddrp;
xlen = *xlenp; xlen = *xlenp;
jEVENT(0, jfs_info("xtAppend: xoff:0x%lx maxblocks:%d xlen:%d xaddr:0x%lx",
("xtAppend: xoff:0x%lx maxblocks:%d xlen:%d xaddr:0x%lx\n", (ulong) xoff, maxblocks, xlen, (ulong) xaddr);
(ulong) xoff, maxblocks, xlen, (ulong) xaddr));
/* /*
* search for the entry location at which to insert: * search for the entry location at which to insert:
...@@ -2747,9 +2729,8 @@ xtDeleteUp(tid_t tid, struct inode *ip, ...@@ -2747,9 +2729,8 @@ xtDeleteUp(tid_t tid, struct inode *ip,
p->header.nextindex = p->header.nextindex =
cpu_to_le16(le16_to_cpu(p->header.nextindex) - cpu_to_le16(le16_to_cpu(p->header.nextindex) -
1); 1);
jEVENT(0, jfs_info("xtDeleteUp(entry): 0x%lx[%d]",
("xtDeleteUp(entry): 0x%lx[%d]\n", (ulong) parent->bn, index);
(ulong) parent->bn, index));
} }
/* unpin the parent page */ /* unpin the parent page */
...@@ -2809,10 +2790,8 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ ...@@ -2809,10 +2790,8 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */
if (offset >= ip->i_size) if (offset >= ip->i_size)
return ESTALE; /* stale extent */ return ESTALE; /* stale extent */
jEVENT(0, jfs_info("xtRelocate: xtype:%d xoff:0x%lx xlen:0x%x xaddr:0x%lx:0x%lx",
("xtRelocate: xtype:%d xoff:0x%lx xlen:0x%x xaddr:0x%lx:0x%lx\n", xtype, (ulong) xoff, xlen, (ulong) oxaddr, (ulong) nxaddr);
xtype, (ulong) xoff, xlen, (ulong) oxaddr,
(ulong) nxaddr));
/* /*
* 1. get and validate the parent xtpage/xad entry * 1. get and validate the parent xtpage/xad entry
...@@ -2855,7 +2834,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ ...@@ -2855,7 +2834,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */
*/ */
xad = &pp->xad[index]; xad = &pp->xad[index];
} }
jEVENT(0, ("xtRelocate: parent xad entry validated.\n")); jfs_info("xtRelocate: parent xad entry validated.");
/* /*
* 2. relocate the extent * 2. relocate the extent
...@@ -2926,7 +2905,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ ...@@ -2926,7 +2905,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */
/* get back parent page */ /* get back parent page */
rc = xtSearch(ip, xoff, &cmp, &btstack, 0); rc = xtSearch(ip, xoff, &cmp, &btstack, 0);
XT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); XT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index);
jEVENT(0, ("xtRelocate: target data extent relocated.\n")); jfs_info("xtRelocate: target data extent relocated.");
} else { /* (xtype == XTPAGE) */ } else { /* (xtype == XTPAGE) */
/* /*
...@@ -3026,7 +3005,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ ...@@ -3026,7 +3005,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */
/* unpin the target page to new homeward bound */ /* unpin the target page to new homeward bound */
XT_PUTPAGE(mp); XT_PUTPAGE(mp);
jEVENT(0, ("xtRelocate: target xtpage relocated.\n")); jfs_info("xtRelocate: target xtpage relocated.");
} }
/* /*
...@@ -3067,7 +3046,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ ...@@ -3067,7 +3046,7 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */
* update which will write LOG_REDOPAGE and update bmap for * update which will write LOG_REDOPAGE and update bmap for
* allocation of XAD_NEW destination extent; * allocation of XAD_NEW destination extent;
*/ */
jEVENT(0, ("xtRelocate: update parent xad entry.\n")); jfs_info("xtRelocate: update parent xad entry.");
BT_MARK_DIRTY(pmp, ip); BT_MARK_DIRTY(pmp, ip);
tlck = txLock(tid, ip, pmp, tlckXTREE | tlckGROW); tlck = txLock(tid, ip, pmp, tlckXTREE | tlckGROW);
xtlck = (struct xtlock *) & tlck->lock; xtlck = (struct xtlock *) & tlck->lock;
......
...@@ -70,7 +70,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode) ...@@ -70,7 +70,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode)
struct inode *iplist[2]; struct inode *iplist[2];
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("jfs_create: dip:0x%p name:%s\n", dip, dentry->d_name.name)); jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
/* /*
* search parent directory for entry/freespace * search parent directory for entry/freespace
...@@ -96,7 +96,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode) ...@@ -96,7 +96,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode)
down(&JFS_IP(ip)->commit_sem); down(&JFS_IP(ip)->commit_sem);
if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) { if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) {
jERROR(1, ("jfs_create: dtSearch returned %d\n", rc)); jfs_err("jfs_create: dtSearch returned %d", rc);
goto out3; goto out3;
} }
...@@ -118,7 +118,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode) ...@@ -118,7 +118,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode)
*/ */
ino = ip->i_ino; ino = ip->i_ino;
if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) {
jERROR(1, ("jfs_create: dtInsert returned %d\n", rc)); jfs_err("jfs_create: dtInsert returned %d", rc);
if (rc == EIO) if (rc == EIO)
txAbort(tid, 1); /* Marks Filesystem dirty */ txAbort(tid, 1); /* Marks Filesystem dirty */
else else
...@@ -159,7 +159,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode) ...@@ -159,7 +159,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode)
out1: out1:
jFYI(1, ("jfs_create: rc:%d\n", -rc)); jfs_info("jfs_create: rc:%d", -rc);
return -rc; return -rc;
} }
...@@ -190,7 +190,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -190,7 +190,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
struct inode *iplist[2]; struct inode *iplist[2];
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("jfs_mkdir: dip:0x%p name:%s\n", dip, dentry->d_name.name)); jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
/* link count overflow on parent directory ? */ /* link count overflow on parent directory ? */
if (dip->i_nlink == JFS_LINK_MAX) { if (dip->i_nlink == JFS_LINK_MAX) {
...@@ -222,7 +222,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -222,7 +222,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
down(&JFS_IP(ip)->commit_sem); down(&JFS_IP(ip)->commit_sem);
if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) { if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) {
jERROR(1, ("jfs_mkdir: dtSearch returned %d\n", rc)); jfs_err("jfs_mkdir: dtSearch returned %d", rc);
goto out3; goto out3;
} }
...@@ -244,7 +244,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -244,7 +244,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
*/ */
ino = ip->i_ino; ino = ip->i_ino;
if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) {
jERROR(1, ("jfs_mkdir: dtInsert returned %d\n", rc)); jfs_err("jfs_mkdir: dtInsert returned %d", rc);
if (rc == EIO) if (rc == EIO)
txAbort(tid, 1); /* Marks Filesystem dirty */ txAbort(tid, 1); /* Marks Filesystem dirty */
...@@ -289,7 +289,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) ...@@ -289,7 +289,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
out1: out1:
jFYI(1, ("jfs_mkdir: rc:%d\n", -rc)); jfs_info("jfs_mkdir: rc:%d", -rc);
return -rc; return -rc;
} }
...@@ -322,7 +322,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry) ...@@ -322,7 +322,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry)
struct inode *iplist[2]; struct inode *iplist[2];
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("jfs_rmdir: dip:0x%p name:%s\n", dip, dentry->d_name.name)); jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
/* directory must be empty to be removed */ /* directory must be empty to be removed */
if (!dtEmpty(ip)) { if (!dtEmpty(ip)) {
...@@ -351,7 +351,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry) ...@@ -351,7 +351,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry)
*/ */
ino = ip->i_ino; ino = ip->i_ino;
if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) { if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) {
jERROR(1, ("jfs_rmdir: dtDelete returned %d\n", rc)); jfs_err("jfs_rmdir: dtDelete returned %d", rc);
if (rc == EIO) if (rc == EIO)
txAbort(tid, 1); txAbort(tid, 1);
txEnd(tid); txEnd(tid);
...@@ -411,7 +411,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry) ...@@ -411,7 +411,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry)
free_UCSname(&dname); free_UCSname(&dname);
out: out:
jFYI(1, ("jfs_rmdir: rc:%d\n", rc)); jfs_info("jfs_rmdir: rc:%d", rc);
return -rc; return -rc;
} }
...@@ -447,7 +447,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry) ...@@ -447,7 +447,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
s64 new_size = 0; s64 new_size = 0;
int commit_flag; int commit_flag;
jFYI(1, ("jfs_unlink: dip:0x%p name:%s\n", dip, dentry->d_name.name)); jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name);
if ((rc = get_UCSname(&dname, dentry, JFS_SBI(dip->i_sb)->nls_tab))) if ((rc = get_UCSname(&dname, dentry, JFS_SBI(dip->i_sb)->nls_tab)))
goto out; goto out;
...@@ -467,7 +467,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry) ...@@ -467,7 +467,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
*/ */
ino = ip->i_ino; ino = ip->i_ino;
if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) { if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) {
jERROR(1, ("jfs_unlink: dtDelete returned %d\n", rc)); jfs_err("jfs_unlink: dtDelete returned %d", rc);
if (rc == EIO) if (rc == EIO)
txAbort(tid, 1); /* Marks FS Dirty */ txAbort(tid, 1); /* Marks FS Dirty */
txEnd(tid); txEnd(tid);
...@@ -560,7 +560,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry) ...@@ -560,7 +560,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
out1: out1:
free_UCSname(&dname); free_UCSname(&dname);
out: out:
jFYI(1, ("jfs_unlink: rc:%d\n", -rc)); jfs_info("jfs_unlink: rc:%d", -rc);
return -rc; return -rc;
} }
...@@ -593,7 +593,7 @@ s64 commitZeroLink(tid_t tid, struct inode *ip) ...@@ -593,7 +593,7 @@ s64 commitZeroLink(tid_t tid, struct inode *ip)
int filetype; int filetype;
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("commitZeroLink: tid = %d, ip = 0x%p\n", tid, ip)); jfs_info("commitZeroLink: tid = %d, ip = 0x%p", tid, ip);
filetype = ip->i_mode & S_IFMT; filetype = ip->i_mode & S_IFMT;
switch (filetype) { switch (filetype) {
...@@ -661,7 +661,7 @@ int freeZeroLink(struct inode *ip) ...@@ -661,7 +661,7 @@ int freeZeroLink(struct inode *ip)
int rc = 0; int rc = 0;
int type; int type;
jFYI(1, ("freeZeroLink: ip = 0x%p\n", ip)); jfs_info("freeZeroLink: ip = 0x%p", ip);
/* return if not reg or symbolic link or if size is /* return if not reg or symbolic link or if size is
* already ok. * already ok.
...@@ -767,9 +767,8 @@ int jfs_link(struct dentry *old_dentry, ...@@ -767,9 +767,8 @@ int jfs_link(struct dentry *old_dentry,
struct btstack btstack; struct btstack btstack;
struct inode *iplist[2]; struct inode *iplist[2];
jFYI(1, jfs_info("jfs_link: %s %s", old_dentry->d_name.name,
("jfs_link: %s %s\n", old_dentry->d_name.name, dentry->d_name.name);
dentry->d_name.name));
tid = txBegin(ip->i_sb, 0); tid = txBegin(ip->i_sb, 0);
...@@ -814,7 +813,7 @@ int jfs_link(struct dentry *old_dentry, ...@@ -814,7 +813,7 @@ int jfs_link(struct dentry *old_dentry,
up(&JFS_IP(dir)->commit_sem); up(&JFS_IP(dir)->commit_sem);
up(&JFS_IP(ip)->commit_sem); up(&JFS_IP(ip)->commit_sem);
jFYI(1, ("jfs_link: rc:%d\n", rc)); jfs_info("jfs_link: rc:%d", rc);
return -rc; return -rc;
} }
...@@ -855,7 +854,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name) ...@@ -855,7 +854,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name)
struct inode *iplist[2]; struct inode *iplist[2];
jFYI(1, ("jfs_symlink: dip:0x%p name:%s\n", dip, name)); jfs_info("jfs_symlink: dip:0x%p name:%s", dip, name);
ssize = strlen(name) + 1; ssize = strlen(name) + 1;
...@@ -898,7 +897,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name) ...@@ -898,7 +897,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name)
if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) {
jERROR(1, ("jfs_symlink: dtInsert returned %d\n", rc)); jfs_err("jfs_symlink: dtInsert returned %d", rc);
/* discard ne inode */ /* discard ne inode */
goto out3; goto out3;
...@@ -933,15 +932,14 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name) ...@@ -933,15 +932,14 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name)
if (ssize > sizeof (JFS_IP(ip)->i_inline)) if (ssize > sizeof (JFS_IP(ip)->i_inline))
JFS_IP(ip)->mode2 &= ~INLINEEA; JFS_IP(ip)->mode2 &= ~INLINEEA;
jFYI(1, jfs_info("jfs_symlink: fast symlink added ssize:%d name:%s ",
("jfs_symlink: fast symlink added ssize:%d name:%s \n", ssize, name);
ssize, name));
} }
/* /*
* write source path name in a single extent * write source path name in a single extent
*/ */
else { else {
jFYI(1, ("jfs_symlink: allocate extent ip:0x%p\n", ip)); jfs_info("jfs_symlink: allocate extent ip:0x%p", ip);
ip->i_op = &page_symlink_inode_operations; ip->i_op = &page_symlink_inode_operations;
ip->i_mapping->a_ops = &jfs_aops; ip->i_mapping->a_ops = &jfs_aops;
...@@ -1033,7 +1031,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name) ...@@ -1033,7 +1031,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name)
#endif #endif
out1: out1:
jFYI(1, ("jfs_symlink: rc:%d\n", -rc)); jfs_info("jfs_symlink: rc:%d", -rc);
return -rc; return -rc;
} }
...@@ -1064,9 +1062,8 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1064,9 +1062,8 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
int commit_flag; int commit_flag;
jFYI(1, jfs_info("jfs_rename: %s %s", old_dentry->d_name.name,
("jfs_rename: %s %s\n", old_dentry->d_name.name, new_dentry->d_name.name);
new_dentry->d_name.name));
old_ip = old_dentry->d_inode; old_ip = old_dentry->d_inode;
new_ip = new_dentry->d_inode; new_ip = new_dentry->d_inode;
...@@ -1168,18 +1165,16 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1168,18 +1165,16 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
rc = dtSearch(new_dir, &new_dname, &ino, &btstack, rc = dtSearch(new_dir, &new_dname, &ino, &btstack,
JFS_CREATE); JFS_CREATE);
if (rc) { if (rc) {
jERROR(1, jfs_err("jfs_rename didn't expect dtSearch to fail "
("jfs_rename didn't expect dtSearch to fail w/rc = %d\n", "w/rc = %d", rc);
rc));
goto out4; goto out4;
} }
ino = old_ip->i_ino; ino = old_ip->i_ino;
rc = dtInsert(tid, new_dir, &new_dname, &ino, &btstack); rc = dtInsert(tid, new_dir, &new_dname, &ino, &btstack);
if (rc) { if (rc) {
jERROR(1, jfs_err("jfs_rename: dtInsert failed w/rc = %d",
("jfs_rename: dtInsert failed w/rc = %d\n", rc);
rc));
goto out4; goto out4;
} }
if (S_ISDIR(old_ip->i_mode)) if (S_ISDIR(old_ip->i_mode))
...@@ -1192,9 +1187,8 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1192,9 +1187,8 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
ino = old_ip->i_ino; ino = old_ip->i_ino;
rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE);
if (rc) { if (rc) {
jERROR(1, jfs_err("jfs_rename did not expect dtDelete to return rc = %d",
("jfs_rename did not expect dtDelete to return rc = %d\n", rc);
rc));
txAbort(tid, 1); /* Marks Filesystem dirty */ txAbort(tid, 1); /* Marks Filesystem dirty */
goto out4; goto out4;
} }
...@@ -1297,7 +1291,7 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1297,7 +1291,7 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
clear_cflag(COMMIT_Stale, old_dir); clear_cflag(COMMIT_Stale, old_dir);
} }
jFYI(1, ("jfs_rename: returning %d\n", rc)); jfs_info("jfs_rename: returning %d", rc);
return -rc; return -rc;
} }
...@@ -1318,7 +1312,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) ...@@ -1318,7 +1312,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
tid_t tid; tid_t tid;
struct tblock *tblk; struct tblock *tblk;
jFYI(1, ("jfs_mknod: %s\n", dentry->d_name.name)); jfs_info("jfs_mknod: %s", dentry->d_name.name);
if ((rc = get_UCSname(&dname, dentry, JFS_SBI(dir->i_sb)->nls_tab))) if ((rc = get_UCSname(&dname, dentry, JFS_SBI(dir->i_sb)->nls_tab)))
goto out; goto out;
...@@ -1378,7 +1372,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) ...@@ -1378,7 +1372,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
#endif #endif
out: out:
jFYI(1, ("jfs_mknod: returning %d\n", rc)); jfs_info("jfs_mknod: returning %d", rc);
return -rc; return -rc;
} }
...@@ -1392,7 +1386,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry) ...@@ -1392,7 +1386,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry)
int len = dentry->d_name.len; int len = dentry->d_name.len;
int rc; int rc;
jFYI(1, ("jfs_lookup: name = %s\n", name)); jfs_info("jfs_lookup: name = %s", name);
if ((name[0] == '.') && (len == 1)) if ((name[0] == '.') && (len == 1))
...@@ -1409,17 +1403,14 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry) ...@@ -1409,17 +1403,14 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry)
d_add(dentry, NULL); d_add(dentry, NULL);
return ERR_PTR(0); return ERR_PTR(0);
} else if (rc) { } else if (rc) {
jERROR(1, jfs_err("jfs_lookup: dtSearch returned %d", rc);
("jfs_lookup: dtSearch returned %d\n", rc));
return ERR_PTR(-rc); return ERR_PTR(-rc);
} }
} }
ip = jfs_iget(dip->i_sb, inum); ip = jfs_iget(dip->i_sb, inum);
if (ip == NULL) { if (ip == NULL) {
jERROR(1, jfs_err("jfs_lookup: iget failed on inum %d", (uint) inum);
("jfs_lookup: iget failed on inum %d\n",
(uint) inum));
return ERR_PTR(-EACCES); return ERR_PTR(-EACCES);
} }
......
...@@ -50,7 +50,7 @@ static pid_t jfsSyncThread; ...@@ -50,7 +50,7 @@ static pid_t jfsSyncThread;
DECLARE_COMPLETION(jfsIOwait); DECLARE_COMPLETION(jfsIOwait);
#ifdef CONFIG_JFS_DEBUG #ifdef CONFIG_JFS_DEBUG
int jfsloglevel = 1; int jfsloglevel = JFS_LOGLEVEL_WARN;
MODULE_PARM(jfsloglevel, "i"); MODULE_PARM(jfsloglevel, "i");
MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)");
#endif #endif
...@@ -120,7 +120,7 @@ static int jfs_statfs(struct super_block *sb, struct statfs *buf) ...@@ -120,7 +120,7 @@ static int jfs_statfs(struct super_block *sb, struct statfs *buf)
s64 maxinodes; s64 maxinodes;
struct inomap *imap = JFS_IP(sbi->ipimap)->i_imap; struct inomap *imap = JFS_IP(sbi->ipimap)->i_imap;
jFYI(1, ("In jfs_statfs\n")); jfs_info("In jfs_statfs");
buf->f_type = JFS_SUPER_MAGIC; buf->f_type = JFS_SUPER_MAGIC;
buf->f_bsize = sbi->bsize; buf->f_bsize = sbi->bsize;
buf->f_blocks = sbi->bmap->db_mapsize; buf->f_blocks = sbi->bmap->db_mapsize;
...@@ -151,11 +151,10 @@ static void jfs_put_super(struct super_block *sb) ...@@ -151,11 +151,10 @@ static void jfs_put_super(struct super_block *sb)
struct jfs_sb_info *sbi = JFS_SBI(sb); struct jfs_sb_info *sbi = JFS_SBI(sb);
int rc; int rc;
jFYI(1, ("In jfs_put_super\n")); jfs_info("In jfs_put_super");
rc = jfs_umount(sb); rc = jfs_umount(sb);
if (rc) { if (rc)
jERROR(1, ("jfs_umount failed with return code %d\n", rc)); jfs_err("jfs_umount failed with return code %d", rc);
}
unload_nls(sbi->nls_tab); unload_nls(sbi->nls_tab);
sbi->nls_tab = NULL; sbi->nls_tab = NULL;
...@@ -259,7 +258,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -259,7 +258,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
int rc; int rc;
s64 newLVSize = 0; s64 newLVSize = 0;
jFYI(1, ("In jfs_read_super: s_flags=0x%lx\n", sb->s_flags)); jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);
sbi = kmalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); sbi = kmalloc(sizeof (struct jfs_sb_info), GFP_KERNEL);
if (!sbi) if (!sbi)
...@@ -291,8 +290,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -291,8 +290,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
rc = jfs_mount(sb); rc = jfs_mount(sb);
if (rc) { if (rc) {
if (!silent) { if (!silent) {
jERROR(1, jfs_err("jfs_mount failed w/return code = %d", rc);
("jfs_mount failed w/return code = %d\n", rc));
} }
goto out_kfree; goto out_kfree;
} }
...@@ -302,9 +300,8 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -302,9 +300,8 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
rc = jfs_mount_rw(sb, 0); rc = jfs_mount_rw(sb, 0);
if (rc) { if (rc) {
if (!silent) { if (!silent) {
jERROR(1, jfs_err("jfs_mount_rw failed, return code = %d",
("jfs_mount_rw failed w/return code = %d\n", rc);
rc));
} }
goto out_no_rw; goto out_no_rw;
} }
...@@ -335,14 +332,14 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -335,14 +332,14 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
return 0; return 0;
out_no_root: out_no_root:
jEVENT(1, ("jfs_read_super: get root inode failed\n")); jfs_err("jfs_read_super: get root inode failed");
if (inode) if (inode)
iput(inode); iput(inode);
out_no_rw: out_no_rw:
rc = jfs_umount(sb); rc = jfs_umount(sb);
if (rc) { if (rc) {
jERROR(1, ("jfs_umount failed with return code %d\n", rc)); jfs_err("jfs_umount failed with return code %d", rc);
} }
out_kfree: out_kfree:
if (sbi->nls_tab) if (sbi->nls_tab)
...@@ -370,8 +367,7 @@ static void jfs_unlockfs(struct super_block *sb) ...@@ -370,8 +367,7 @@ static void jfs_unlockfs(struct super_block *sb)
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if ((rc = lmLogInit(log))) if ((rc = lmLogInit(log)))
jERROR(1, jfs_err("jfs_unlock failed with return code %d", rc);
("jfs_unlock failed with return code %d\n", rc));
else else
txResume(sb); txResume(sb);
} }
...@@ -458,7 +454,7 @@ static int __init init_jfs_fs(void) ...@@ -458,7 +454,7 @@ static int __init init_jfs_fs(void)
*/ */
rc = metapage_init(); rc = metapage_init();
if (rc) { if (rc) {
jERROR(1, ("metapage_init failed w/rc = %d\n", rc)); jfs_err("metapage_init failed w/rc = %d", rc);
goto free_slab; goto free_slab;
} }
...@@ -467,7 +463,7 @@ static int __init init_jfs_fs(void) ...@@ -467,7 +463,7 @@ static int __init init_jfs_fs(void)
*/ */
rc = txInit(); rc = txInit();
if (rc) { if (rc) {
jERROR(1, ("txInit failed w/rc = %d\n", rc)); jfs_err("txInit failed w/rc = %d", rc);
goto free_metapage; goto free_metapage;
} }
...@@ -477,8 +473,7 @@ static int __init init_jfs_fs(void) ...@@ -477,8 +473,7 @@ static int __init init_jfs_fs(void)
jfsIOthread = kernel_thread(jfsIOWait, 0, jfsIOthread = kernel_thread(jfsIOWait, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND); CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
if (jfsIOthread < 0) { if (jfsIOthread < 0) {
jERROR(1, jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsIOthread);
("init_jfs_fs: fork failed w/rc = %d\n", jfsIOthread));
goto end_txmngr; goto end_txmngr;
} }
wait_for_completion(&jfsIOwait); /* Wait until thread starts */ wait_for_completion(&jfsIOwait); /* Wait until thread starts */
...@@ -486,9 +481,7 @@ static int __init init_jfs_fs(void) ...@@ -486,9 +481,7 @@ static int __init init_jfs_fs(void)
jfsCommitThread = kernel_thread(jfs_lazycommit, 0, jfsCommitThread = kernel_thread(jfs_lazycommit, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND); CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
if (jfsCommitThread < 0) { if (jfsCommitThread < 0) {
jERROR(1, jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsCommitThread);
("init_jfs_fs: fork failed w/rc = %d\n",
jfsCommitThread));
goto kill_iotask; goto kill_iotask;
} }
wait_for_completion(&jfsIOwait); /* Wait until thread starts */ wait_for_completion(&jfsIOwait); /* Wait until thread starts */
...@@ -496,8 +489,7 @@ static int __init init_jfs_fs(void) ...@@ -496,8 +489,7 @@ static int __init init_jfs_fs(void)
jfsSyncThread = kernel_thread(jfs_sync, 0, jfsSyncThread = kernel_thread(jfs_sync, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND); CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
if (jfsSyncThread < 0) { if (jfsSyncThread < 0) {
jERROR(1, jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsSyncThread);
("init_jfs_fs: fork failed w/rc = %d\n", jfsSyncThread));
goto kill_committask; goto kill_committask;
} }
wait_for_completion(&jfsIOwait); /* Wait until thread starts */ wait_for_completion(&jfsIOwait); /* Wait until thread starts */
...@@ -527,7 +519,7 @@ static int __init init_jfs_fs(void) ...@@ -527,7 +519,7 @@ static int __init init_jfs_fs(void)
static void __exit exit_jfs_fs(void) static void __exit exit_jfs_fs(void)
{ {
jFYI(1, ("exit_jfs_fs called\n")); jfs_info("exit_jfs_fs called");
jfs_stop_threads = 1; jfs_stop_threads = 1;
txExit(); txExit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment