Commit 94a9de9c authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: replace ugly JFS debug macros with simpler ones.

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