Commit c98a2447 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://jfs.bkbits.net/linux-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents 46124528 13156dad
...@@ -28,8 +28,6 @@ JFS TODO list: ...@@ -28,8 +28,6 @@ JFS TODO list:
Plans for our near term development items Plans for our near term development items
- enhance support for logfile on dedicated partition - enhance support for logfile on dedicated partition
- get access control list functionality operational
- get extended attributes functionality operational
Longer term work items Longer term work items
...@@ -37,7 +35,7 @@ Longer term work items ...@@ -37,7 +35,7 @@ Longer term work items
- add quota support - add quota support
- add support for block sizes (512,1024,2048) - add support for block sizes (512,1024,2048)
Please send bugs, comments, cards and letters to linuxjfs@us.ibm.com. Please send bugs, comments, cards and letters to shaggy@austin.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled The JFS mailing list can be subscribed to by using the link labeled
"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/. "Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/.
...@@ -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.
......
This diff is collapsed.
...@@ -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;
} }
This diff is collapsed.
...@@ -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;
} }
......
This diff is collapsed.
...@@ -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