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
No related merge requests found
......@@ -28,8 +28,6 @@ JFS TODO list:
Plans for our near term development items
- enhance support for logfile on dedicated partition
- get access control list functionality operational
- get extended attributes functionality operational
Longer term work items
......@@ -37,7 +35,7 @@ Longer term work items
- add quota support
- 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
"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)
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;
......@@ -302,7 +301,7 @@ static int jfs_readpages(struct file *file, struct address_space *mapping,
static int jfs_prepare_write(struct file *file,
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)
......@@ -327,7 +326,7 @@ struct address_space_operations jfs_aops = {
.writepages = jfs_writepages,
.sync_page = block_sync_page,
.prepare_write = jfs_prepare_write,
.commit_write = generic_commit_write,
.commit_write = nobh_commit_write,
.bmap = jfs_bmap,
.direct_IO = jfs_direct_IO,
};
......@@ -378,9 +377,9 @@ 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);
block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block);
nobh_truncate_page(ip->i_mapping, ip->i_size);
IWRITE_LOCK(ip);
jfs_truncate_nolock(ip, 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.
......
This diff is collapsed.
......@@ -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;
}
This diff is collapsed.
......@@ -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;
}
......
This diff is collapsed.
......@@ -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