Commit dba1e987 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'jfs-4.7' of git://github.com/kleikamp/linux-shaggy

Pull jfs updates from Dave Kleikamp:
 "Some jfs logging cleanups from Joe Perches"

* tag 'jfs-4.7' of git://github.com/kleikamp/linux-shaggy:
  jfs: Coalesce some formats
  jfs: Remove unnecessary line continuations and terminating newlines
  jfs: Remove terminating newlines from jfs_info, jfs_warn, jfs_err uses
parents cb6fd68f 6ed71e98
...@@ -102,8 +102,8 @@ int jfs_commit_inode(struct inode *inode, int wait) ...@@ -102,8 +102,8 @@ 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) {
jfs_err("jfs_commit_inode(0x%p) called on " jfs_err("jfs_commit_inode(0x%p) called on read-only volume",
"read-only volume", inode); inode);
jfs_err("Is remount racy?"); jfs_err("Is remount racy?");
noisy--; noisy--;
} }
......
...@@ -49,14 +49,12 @@ void jfs_issue_discard(struct inode *ip, u64 blkno, u64 nblocks) ...@@ -49,14 +49,12 @@ void jfs_issue_discard(struct inode *ip, u64 blkno, u64 nblocks)
r = sb_issue_discard(sb, blkno, nblocks, GFP_NOFS, 0); r = sb_issue_discard(sb, blkno, nblocks, GFP_NOFS, 0);
if (unlikely(r != 0)) { if (unlikely(r != 0)) {
jfs_err("JFS: sb_issue_discard" \ jfs_err("JFS: sb_issue_discard(%p, %llu, %llu, GFP_NOFS, 0) = %d => failed!",
"(%p, %llu, %llu, GFP_NOFS, 0) = %d => failed!\n",
sb, (unsigned long long)blkno, sb, (unsigned long long)blkno,
(unsigned long long)nblocks, r); (unsigned long long)nblocks, r);
} }
jfs_info("JFS: sb_issue_discard" \ jfs_info("JFS: sb_issue_discard(%p, %llu, %llu, GFP_NOFS, 0) = %d",
"(%p, %llu, %llu, GFP_NOFS, 0) = %d\n",
sb, (unsigned long long)blkno, sb, (unsigned long long)blkno,
(unsigned long long)nblocks, r); (unsigned long long)nblocks, r);
......
...@@ -3072,8 +3072,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) ...@@ -3072,8 +3072,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
} }
if (dirtab_slot.flag == DIR_INDEX_FREE) { if (dirtab_slot.flag == DIR_INDEX_FREE) {
if (loop_count++ > JFS_IP(ip)->next_index) { if (loop_count++ > JFS_IP(ip)->next_index) {
jfs_err("jfs_readdir detected " jfs_err("jfs_readdir detected infinite loop!");
"infinite loop!");
ctx->pos = DIREND; ctx->pos = DIREND;
return 0; return 0;
} }
...@@ -3151,8 +3150,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) ...@@ -3151,8 +3150,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
if (!dir_emit(ctx, "..", 2, PARENT(ip), DT_DIR)) if (!dir_emit(ctx, "..", 2, PARENT(ip), DT_DIR))
return 0; return 0;
} else { } else {
jfs_err("jfs_readdir called with " jfs_err("jfs_readdir called with invalid offset!");
"invalid offset!");
} }
dtoffset->pn = 1; dtoffset->pn = 1;
dtoffset->index = 0; dtoffset->index = 0;
...@@ -3165,8 +3163,8 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) ...@@ -3165,8 +3163,8 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
} }
if ((rc = dtReadNext(ip, &ctx->pos, &btstack))) { if ((rc = dtReadNext(ip, &ctx->pos, &btstack))) {
jfs_err("jfs_readdir: unexpected rc = %d " jfs_err("jfs_readdir: unexpected rc = %d from dtReadNext",
"from dtReadNext", rc); rc);
ctx->pos = DIREND; ctx->pos = DIREND;
return 0; return 0;
} }
......
...@@ -534,8 +534,7 @@ void diWriteSpecial(struct inode *ip, int secondary) ...@@ -534,8 +534,7 @@ void diWriteSpecial(struct inode *ip, int secondary)
/* read the page of fixed disk inode (AIT) in raw mode */ /* read the page of fixed disk inode (AIT) in raw mode */
mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
if (mp == NULL) { if (mp == NULL) {
jfs_err("diWriteSpecial: failed to read aggregate inode " jfs_err("diWriteSpecial: failed to read aggregate inode extent!");
"extent!");
return; return;
} }
......
...@@ -151,7 +151,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) ...@@ -151,7 +151,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
jfs_inode->xtlid = 0; jfs_inode->xtlid = 0;
jfs_set_inode_flags(inode); jfs_set_inode_flags(inode);
jfs_info("ialloc returns inode = 0x%p\n", inode); jfs_info("ialloc returns inode = 0x%p", inode);
return inode; return inode;
......
...@@ -1094,7 +1094,7 @@ int lmLogOpen(struct super_block *sb) ...@@ -1094,7 +1094,7 @@ int lmLogOpen(struct super_block *sb)
if (log->bdev->bd_dev == sbi->logdev) { if (log->bdev->bd_dev == sbi->logdev) {
if (memcmp(log->uuid, sbi->loguuid, if (memcmp(log->uuid, sbi->loguuid,
sizeof(log->uuid))) { sizeof(log->uuid))) {
jfs_warn("wrong uuid on JFS journal\n"); jfs_warn("wrong uuid on JFS journal");
mutex_unlock(&jfs_log_mutex); mutex_unlock(&jfs_log_mutex);
return -EINVAL; return -EINVAL;
} }
...@@ -1333,9 +1333,8 @@ int lmLogInit(struct jfs_log * log) ...@@ -1333,9 +1333,8 @@ int lmLogInit(struct jfs_log * log)
rc = -EINVAL; rc = -EINVAL;
goto errout20; goto errout20;
} }
jfs_info("lmLogInit: inline log:0x%p base:0x%Lx " jfs_info("lmLogInit: inline log:0x%p base:0x%Lx size:0x%x",
"size:0x%x", log, log, (unsigned long long)log->base, log->size);
(unsigned long long) log->base, log->size);
} else { } else {
if (memcmp(logsuper->uuid, log->uuid, 16)) { if (memcmp(logsuper->uuid, log->uuid, 16)) {
jfs_warn("wrong uuid on JFS log device"); jfs_warn("wrong uuid on JFS log device");
...@@ -1343,9 +1342,8 @@ int lmLogInit(struct jfs_log * log) ...@@ -1343,9 +1342,8 @@ int lmLogInit(struct jfs_log * log)
} }
log->size = le32_to_cpu(logsuper->size); log->size = le32_to_cpu(logsuper->size);
log->l2bsize = le32_to_cpu(logsuper->l2bsize); log->l2bsize = le32_to_cpu(logsuper->l2bsize);
jfs_info("lmLogInit: external log:0x%p base:0x%Lx " jfs_info("lmLogInit: external log:0x%p base:0x%Lx size:0x%x",
"size:0x%x", log, log, (unsigned long long)log->base, log->size);
(unsigned long long) log->base, log->size);
} }
log->page = le32_to_cpu(logsuper->end) / LOGPSIZE; log->page = le32_to_cpu(logsuper->end) / LOGPSIZE;
...@@ -2136,7 +2134,7 @@ static void lbmStartIO(struct lbuf * bp) ...@@ -2136,7 +2134,7 @@ static void lbmStartIO(struct lbuf * bp)
struct bio *bio; struct bio *bio;
struct jfs_log *log = bp->l_log; struct jfs_log *log = bp->l_log;
jfs_info("lbmStartIO\n"); jfs_info("lbmStartIO");
bio = bio_alloc(GFP_NOFS, 1); bio = bio_alloc(GFP_NOFS, 1);
bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9); bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
......
...@@ -1764,7 +1764,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1764,7 +1764,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
if (lwm == next) if (lwm == next)
goto out; goto out;
if (lwm > next) { if (lwm > next) {
jfs_err("xtLog: lwm > next\n"); jfs_err("xtLog: lwm > next");
goto out; goto out;
} }
tlck->flag |= tlckUPDATEMAP; tlck->flag |= tlckUPDATEMAP;
...@@ -1798,8 +1798,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1798,8 +1798,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->xdlist = &p->xad[lwm]; xadlock->xdlist = &p->xad[lwm];
tblk->xflag &= ~COMMIT_LAZY; tblk->xflag &= ~COMMIT_LAZY;
} }
jfs_info("xtLog: alloc ip:0x%p mp:0x%p tlck:0x%p lwm:%d " jfs_info("xtLog: alloc ip:0x%p mp:0x%p tlck:0x%p lwm:%d count:%d",
"count:%d", tlck->ip, mp, tlck, lwm, xadlock->count); tlck->ip, mp, tlck, lwm, xadlock->count);
maplock->index = 1; maplock->index = 1;
...@@ -2025,8 +2025,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2025,8 +2025,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->count = next - lwm; xadlock->count = next - lwm;
xadlock->xdlist = &p->xad[lwm]; xadlock->xdlist = &p->xad[lwm];
jfs_info("xtLog: alloc ip:0x%p mp:0x%p count:%d " jfs_info("xtLog: alloc ip:0x%p mp:0x%p count:%d lwm:%d next:%d",
"lwm:%d next:%d",
tlck->ip, mp, xadlock->count, lwm, next); tlck->ip, mp, xadlock->count, lwm, next);
maplock->index++; maplock->index++;
xadlock++; xadlock++;
...@@ -2047,8 +2046,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2047,8 +2046,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
pxdlock->count = 1; pxdlock->count = 1;
pxdlock->pxd = pxd; pxdlock->pxd = pxd;
jfs_info("xtLog: truncate ip:0x%p mp:0x%p count:%d " jfs_info("xtLog: truncate ip:0x%p mp:0x%p count:%d hwm:%d",
"hwm:%d", ip, mp, pxdlock->count, hwm); ip, mp, pxdlock->count, hwm);
maplock->index++; maplock->index++;
xadlock++; xadlock++;
} }
...@@ -2066,8 +2065,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -2066,8 +2065,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
xadlock->count = hwm - next + 1; xadlock->count = hwm - next + 1;
xadlock->xdlist = &p->xad[next]; xadlock->xdlist = &p->xad[next];
jfs_info("xtLog: free ip:0x%p mp:0x%p count:%d " jfs_info("xtLog: free ip:0x%p mp:0x%p count:%d next:%d hwm:%d",
"next:%d hwm:%d",
tlck->ip, mp, xadlock->count, next, hwm); tlck->ip, mp, xadlock->count, next, hwm);
maplock->index++; maplock->index++;
} }
...@@ -2523,8 +2521,7 @@ void txFreeMap(struct inode *ip, ...@@ -2523,8 +2521,7 @@ void txFreeMap(struct inode *ip,
xlen = lengthXAD(xad); xlen = lengthXAD(xad);
dbUpdatePMap(ipbmap, true, xaddr, dbUpdatePMap(ipbmap, true, xaddr,
(s64) xlen, tblk); (s64) xlen, tblk);
jfs_info("freePMap: xaddr:0x%lx " jfs_info("freePMap: xaddr:0x%lx xlen:%d",
"xlen:%d",
(ulong) xaddr, xlen); (ulong) xaddr, xlen);
} }
} }
...@@ -2814,7 +2811,7 @@ int jfs_lazycommit(void *arg) ...@@ -2814,7 +2811,7 @@ int jfs_lazycommit(void *arg)
if (!list_empty(&TxAnchor.unlock_queue)) if (!list_empty(&TxAnchor.unlock_queue))
jfs_err("jfs_lazycommit being killed w/pending transactions!"); jfs_err("jfs_lazycommit being killed w/pending transactions!");
else else
jfs_info("jfs_lazycommit being killed\n"); jfs_info("jfs_lazycommit being killed");
return 0; return 0;
} }
......
...@@ -1225,8 +1225,8 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1225,8 +1225,8 @@ static 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) {
jfs_err("jfs_rename didn't expect dtSearch to fail " jfs_err("jfs_rename didn't expect dtSearch to fail w/rc = %d",
"w/rc = %d", rc); rc);
goto out_tx; goto out_tx;
} }
......
...@@ -84,7 +84,7 @@ static void jfs_handle_error(struct super_block *sb) ...@@ -84,7 +84,7 @@ static void jfs_handle_error(struct super_block *sb)
panic("JFS (device %s): panic forced after error\n", panic("JFS (device %s): panic forced after error\n",
sb->s_id); sb->s_id);
else if (sbi->flag & JFS_ERR_REMOUNT_RO) { else if (sbi->flag & JFS_ERR_REMOUNT_RO) {
jfs_err("ERROR: (device %s): remounting filesystem as read-only\n", jfs_err("ERROR: (device %s): remounting filesystem as read-only",
sb->s_id); sb->s_id);
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
...@@ -641,7 +641,7 @@ static int jfs_freeze(struct super_block *sb) ...@@ -641,7 +641,7 @@ static int jfs_freeze(struct super_block *sb)
} }
rc = updateSuper(sb, FM_CLEAN); rc = updateSuper(sb, FM_CLEAN);
if (rc) { if (rc) {
jfs_err("jfs_freeze: updateSuper failed\n"); jfs_err("jfs_freeze: updateSuper failed");
/* /*
* Don't fail here. Everything succeeded except * Don't fail here. Everything succeeded except
* marking the superblock clean, so there's really * marking the superblock clean, so there's really
......
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