diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-08 17:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:26 -0400 |
commit | fa5a7a41a601d952e53bfcfa6d50ca22b956ee3a (patch) | |
tree | d3ec881ee67e05a477fe3262b8a72dd0b20b6356 /fs/qnx6 | |
parent | e6c3261653a22f7481791e02fe19d11faac214fb (diff) |
fs/qnx6: update debugging to current functions
Add DDEBUG in Makefile when CONFIG_QNX6FS_DEBUG is set. All QNX6DEBUG
messages are replaced by pr_debug which means debugging will be emitted in
debug level only and no more in error and info levels. debug uses now
pr_fmt and __func__
QNX6DEBUG definition has been removed.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Joe Perches <joe@perches.com>
Cc: Kai Bankett <chaosman@ontika.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/qnx6')
-rw-r--r-- | fs/qnx6/Makefile | 1 | ||||
-rw-r--r-- | fs/qnx6/dir.c | 12 | ||||
-rw-r--r-- | fs/qnx6/inode.c | 37 | ||||
-rw-r--r-- | fs/qnx6/namei.c | 6 | ||||
-rw-r--r-- | fs/qnx6/qnx6.h | 6 |
5 files changed, 23 insertions, 39 deletions
diff --git a/fs/qnx6/Makefile b/fs/qnx6/Makefile index 9dd06199afc9..5e6bae6fae50 100644 --- a/fs/qnx6/Makefile +++ b/fs/qnx6/Makefile | |||
@@ -5,3 +5,4 @@ | |||
5 | obj-$(CONFIG_QNX6FS_FS) += qnx6.o | 5 | obj-$(CONFIG_QNX6FS_FS) += qnx6.o |
6 | 6 | ||
7 | qnx6-objs := inode.o dir.o namei.o super_mmi.o | 7 | qnx6-objs := inode.o dir.o namei.o super_mmi.o |
8 | ccflags-$(CONFIG_QNX6FS_DEBUG) += -DDEBUG | ||
diff --git a/fs/qnx6/dir.c b/fs/qnx6/dir.c index c78a3397c5a9..8d64bb5366bf 100644 --- a/fs/qnx6/dir.c +++ b/fs/qnx6/dir.c | |||
@@ -89,7 +89,7 @@ static int qnx6_dir_longfilename(struct inode *inode, | |||
89 | lf_size = fs16_to_cpu(sbi, lf->lf_size); | 89 | lf_size = fs16_to_cpu(sbi, lf->lf_size); |
90 | 90 | ||
91 | if (lf_size > QNX6_LONG_NAME_MAX) { | 91 | if (lf_size > QNX6_LONG_NAME_MAX) { |
92 | QNX6DEBUG((KERN_INFO "file %s\n", lf->lf_fname)); | 92 | pr_debug("file %s\n", lf->lf_fname); |
93 | pr_err("Filename too long (%i)\n", lf_size); | 93 | pr_err("Filename too long (%i)\n", lf_size); |
94 | qnx6_put_page(page); | 94 | qnx6_put_page(page); |
95 | return 0; | 95 | return 0; |
@@ -101,8 +101,8 @@ static int qnx6_dir_longfilename(struct inode *inode, | |||
101 | qnx6_lfile_checksum(lf->lf_fname, lf_size)) | 101 | qnx6_lfile_checksum(lf->lf_fname, lf_size)) |
102 | pr_info("long filename checksum error.\n"); | 102 | pr_info("long filename checksum error.\n"); |
103 | 103 | ||
104 | QNX6DEBUG((KERN_INFO "qnx6_readdir:%.*s inode:%u\n", | 104 | pr_debug("qnx6_readdir:%.*s inode:%u\n", |
105 | lf_size, lf->lf_fname, de_inode)); | 105 | lf_size, lf->lf_fname, de_inode); |
106 | if (!dir_emit(ctx, lf->lf_fname, lf_size, de_inode, DT_UNKNOWN)) { | 106 | if (!dir_emit(ctx, lf->lf_fname, lf_size, de_inode, DT_UNKNOWN)) { |
107 | qnx6_put_page(page); | 107 | qnx6_put_page(page); |
108 | return 0; | 108 | return 0; |
@@ -158,9 +158,9 @@ static int qnx6_readdir(struct file *file, struct dir_context *ctx) | |||
158 | break; | 158 | break; |
159 | } | 159 | } |
160 | } else { | 160 | } else { |
161 | QNX6DEBUG((KERN_INFO "qnx6_readdir:%.*s" | 161 | pr_debug("%s():%.*s inode:%u\n", |
162 | " inode:%u\n", size, de->de_fname, | 162 | __func__, size, de->de_fname, |
163 | no_inode)); | 163 | no_inode); |
164 | if (!dir_emit(ctx, de->de_fname, size, | 164 | if (!dir_emit(ctx, de->de_fname, size, |
165 | no_inode, DT_UNKNOWN)) { | 165 | no_inode, DT_UNKNOWN)) { |
166 | done = true; | 166 | done = true; |
diff --git a/fs/qnx6/inode.c b/fs/qnx6/inode.c index 1652e8b99594..44e73923670d 100644 --- a/fs/qnx6/inode.c +++ b/fs/qnx6/inode.c | |||
@@ -73,8 +73,8 @@ static int qnx6_get_block(struct inode *inode, sector_t iblock, | |||
73 | { | 73 | { |
74 | unsigned phys; | 74 | unsigned phys; |
75 | 75 | ||
76 | QNX6DEBUG((KERN_INFO "qnx6: qnx6_get_block inode=[%ld] iblock=[%ld]\n", | 76 | pr_debug("qnx6_get_block inode=[%ld] iblock=[%ld]\n", |
77 | inode->i_ino, (unsigned long)iblock)); | 77 | inode->i_ino, (unsigned long)iblock); |
78 | 78 | ||
79 | phys = qnx6_block_map(inode, iblock); | 79 | phys = qnx6_block_map(inode, iblock); |
80 | if (phys) { | 80 | if (phys) { |
@@ -205,26 +205,16 @@ void qnx6_superblock_debug(struct qnx6_super_block *sb, struct super_block *s) | |||
205 | { | 205 | { |
206 | struct qnx6_sb_info *sbi = QNX6_SB(s); | 206 | struct qnx6_sb_info *sbi = QNX6_SB(s); |
207 | 207 | ||
208 | QNX6DEBUG((KERN_INFO "magic: %08x\n", | 208 | pr_debug("magic: %08x\n", fs32_to_cpu(sbi, sb->sb_magic)); |
209 | fs32_to_cpu(sbi, sb->sb_magic))); | 209 | pr_debug("checksum: %08x\n", fs32_to_cpu(sbi, sb->sb_checksum)); |
210 | QNX6DEBUG((KERN_INFO "checksum: %08x\n", | 210 | pr_debug("serial: %llx\n", fs64_to_cpu(sbi, sb->sb_serial)); |
211 | fs32_to_cpu(sbi, sb->sb_checksum))); | 211 | pr_debug("flags: %08x\n", fs32_to_cpu(sbi, sb->sb_flags)); |
212 | QNX6DEBUG((KERN_INFO "serial: %llx\n", | 212 | pr_debug("blocksize: %08x\n", fs32_to_cpu(sbi, sb->sb_blocksize)); |
213 | fs64_to_cpu(sbi, sb->sb_serial))); | 213 | pr_debug("num_inodes: %08x\n", fs32_to_cpu(sbi, sb->sb_num_inodes)); |
214 | QNX6DEBUG((KERN_INFO "flags: %08x\n", | 214 | pr_debug("free_inodes: %08x\n", fs32_to_cpu(sbi, sb->sb_free_inodes)); |
215 | fs32_to_cpu(sbi, sb->sb_flags))); | 215 | pr_debug("num_blocks: %08x\n", fs32_to_cpu(sbi, sb->sb_num_blocks)); |
216 | QNX6DEBUG((KERN_INFO "blocksize: %08x\n", | 216 | pr_debug("free_blocks: %08x\n", fs32_to_cpu(sbi, sb->sb_free_blocks)); |
217 | fs32_to_cpu(sbi, sb->sb_blocksize))); | 217 | pr_debug("inode_levels: %02x\n", sb->Inode.levels); |
218 | QNX6DEBUG((KERN_INFO "num_inodes: %08x\n", | ||
219 | fs32_to_cpu(sbi, sb->sb_num_inodes))); | ||
220 | QNX6DEBUG((KERN_INFO "free_inodes: %08x\n", | ||
221 | fs32_to_cpu(sbi, sb->sb_free_inodes))); | ||
222 | QNX6DEBUG((KERN_INFO "num_blocks: %08x\n", | ||
223 | fs32_to_cpu(sbi, sb->sb_num_blocks))); | ||
224 | QNX6DEBUG((KERN_INFO "free_blocks: %08x\n", | ||
225 | fs32_to_cpu(sbi, sb->sb_free_blocks))); | ||
226 | QNX6DEBUG((KERN_INFO "inode_levels: %02x\n", | ||
227 | sb->Inode.levels)); | ||
228 | } | 218 | } |
229 | #endif | 219 | #endif |
230 | 220 | ||
@@ -283,8 +273,7 @@ static struct buffer_head *qnx6_check_first_superblock(struct super_block *s, | |||
283 | sbi->s_bytesex = BYTESEX_BE; | 273 | sbi->s_bytesex = BYTESEX_BE; |
284 | if (fs32_to_cpu(sbi, sb->sb_magic) == QNX6_SUPER_MAGIC) { | 274 | if (fs32_to_cpu(sbi, sb->sb_magic) == QNX6_SUPER_MAGIC) { |
285 | /* we got a big endian fs */ | 275 | /* we got a big endian fs */ |
286 | QNX6DEBUG((KERN_INFO "qnx6: fs got different" | 276 | pr_debug("fs got different endianness.\n"); |
287 | " endianness.\n")); | ||
288 | return bh; | 277 | return bh; |
289 | } else | 278 | } else |
290 | sbi->s_bytesex = BYTESEX_LE; | 279 | sbi->s_bytesex = BYTESEX_LE; |
diff --git a/fs/qnx6/namei.c b/fs/qnx6/namei.c index 0561326a94f5..6c1a323137dd 100644 --- a/fs/qnx6/namei.c +++ b/fs/qnx6/namei.c | |||
@@ -29,12 +29,12 @@ struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry, | |||
29 | foundinode = qnx6_iget(dir->i_sb, ino); | 29 | foundinode = qnx6_iget(dir->i_sb, ino); |
30 | qnx6_put_page(page); | 30 | qnx6_put_page(page); |
31 | if (IS_ERR(foundinode)) { | 31 | if (IS_ERR(foundinode)) { |
32 | QNX6DEBUG((KERN_ERR "qnx6: lookup->iget -> " | 32 | pr_debug("lookup->iget -> error %ld\n", |
33 | " error %ld\n", PTR_ERR(foundinode))); | 33 | PTR_ERR(foundinode)); |
34 | return ERR_CAST(foundinode); | 34 | return ERR_CAST(foundinode); |
35 | } | 35 | } |
36 | } else { | 36 | } else { |
37 | QNX6DEBUG((KERN_INFO "qnx6_lookup: not found %s\n", name)); | 37 | pr_debug("%s(): not found %s\n", __func__, name); |
38 | return NULL; | 38 | return NULL; |
39 | } | 39 | } |
40 | d_add(dentry, foundinode); | 40 | d_add(dentry, foundinode); |
diff --git a/fs/qnx6/qnx6.h b/fs/qnx6/qnx6.h index b0aceda59c36..d3fb2b698800 100644 --- a/fs/qnx6/qnx6.h +++ b/fs/qnx6/qnx6.h | |||
@@ -25,12 +25,6 @@ typedef __u64 __bitwise __fs64; | |||
25 | 25 | ||
26 | #include <linux/qnx6_fs.h> | 26 | #include <linux/qnx6_fs.h> |
27 | 27 | ||
28 | #ifdef CONFIG_QNX6FS_DEBUG | ||
29 | #define QNX6DEBUG(X) printk X | ||
30 | #else | ||
31 | #define QNX6DEBUG(X) (void) 0 | ||
32 | #endif | ||
33 | |||
34 | struct qnx6_sb_info { | 28 | struct qnx6_sb_info { |
35 | struct buffer_head *sb_buf; /* superblock buffer */ | 29 | struct buffer_head *sb_buf; /* superblock buffer */ |
36 | struct qnx6_super_block *sb; /* our superblock */ | 30 | struct qnx6_super_block *sb; /* our superblock */ |