diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2010-10-26 11:52:41 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-03-15 09:00:27 -0400 |
commit | 0a935519cca83f26dc15e7577fa6c2b39606a4ac (patch) | |
tree | 0360b9e15285425d90484ced64d8944810702f52 /fs/exofs | |
parent | 2c722c9a47d1369e2685b85288e78c469a081238 (diff) |
exofs: Trivial: fix some indentation and debug prints
I stumbled on some of these prints in log files so, might
just submit the fixes.
* All i_ino prints in exofs should be hex
* All OSD_ERR prints should end with a "\n"
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/dir.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c index dcc941d82d67..d0941c6a1f72 100644 --- a/fs/exofs/dir.c +++ b/fs/exofs/dir.c | |||
@@ -124,7 +124,7 @@ out: | |||
124 | 124 | ||
125 | Ebadsize: | 125 | Ebadsize: |
126 | EXOFS_ERR("ERROR [exofs_check_page]: " | 126 | EXOFS_ERR("ERROR [exofs_check_page]: " |
127 | "size of directory #%lu is not a multiple of chunk size", | 127 | "size of directory(0x%lx) is not a multiple of chunk size\n", |
128 | dir->i_ino | 128 | dir->i_ino |
129 | ); | 129 | ); |
130 | goto fail; | 130 | goto fail; |
@@ -142,8 +142,8 @@ Espan: | |||
142 | goto bad_entry; | 142 | goto bad_entry; |
143 | bad_entry: | 143 | bad_entry: |
144 | EXOFS_ERR( | 144 | EXOFS_ERR( |
145 | "ERROR [exofs_check_page]: bad entry in directory #%lu: %s - " | 145 | "ERROR [exofs_check_page]: bad entry in directory(0x%lx): %s - " |
146 | "offset=%lu, inode=%llu, rec_len=%d, name_len=%d", | 146 | "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n", |
147 | dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs, | 147 | dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs, |
148 | _LLU(le64_to_cpu(p->inode_no)), | 148 | _LLU(le64_to_cpu(p->inode_no)), |
149 | rec_len, p->name_len); | 149 | rec_len, p->name_len); |
@@ -151,8 +151,8 @@ bad_entry: | |||
151 | Eend: | 151 | Eend: |
152 | p = (struct exofs_dir_entry *)(kaddr + offs); | 152 | p = (struct exofs_dir_entry *)(kaddr + offs); |
153 | EXOFS_ERR("ERROR [exofs_check_page]: " | 153 | EXOFS_ERR("ERROR [exofs_check_page]: " |
154 | "entry in directory #%lu spans the page boundary" | 154 | "entry in directory(0x%lx) spans the page boundary" |
155 | "offset=%lu, inode=%llu", | 155 | "offset=%lu, inode=0x%llx\n", |
156 | dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs, | 156 | dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs, |
157 | _LLU(le64_to_cpu(p->inode_no))); | 157 | _LLU(le64_to_cpu(p->inode_no))); |
158 | fail: | 158 | fail: |
@@ -261,9 +261,8 @@ exofs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
261 | struct page *page = exofs_get_page(inode, n); | 261 | struct page *page = exofs_get_page(inode, n); |
262 | 262 | ||
263 | if (IS_ERR(page)) { | 263 | if (IS_ERR(page)) { |
264 | EXOFS_ERR("ERROR: " | 264 | EXOFS_ERR("ERROR: bad page in directory(0x%lx)\n", |
265 | "bad page in #%lu", | 265 | inode->i_ino); |
266 | inode->i_ino); | ||
267 | filp->f_pos += PAGE_CACHE_SIZE - offset; | 266 | filp->f_pos += PAGE_CACHE_SIZE - offset; |
268 | return PTR_ERR(page); | 267 | return PTR_ERR(page); |
269 | } | 268 | } |
@@ -283,7 +282,8 @@ exofs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
283 | for (; (char *)de <= limit; de = exofs_next_entry(de)) { | 282 | for (; (char *)de <= limit; de = exofs_next_entry(de)) { |
284 | if (de->rec_len == 0) { | 283 | if (de->rec_len == 0) { |
285 | EXOFS_ERR("ERROR: " | 284 | EXOFS_ERR("ERROR: " |
286 | "zero-length directory entry"); | 285 | "zero-length entry in directory(0x%lx)\n", |
286 | inode->i_ino); | ||
287 | exofs_put_page(page); | 287 | exofs_put_page(page); |
288 | return -EIO; | 288 | return -EIO; |
289 | } | 289 | } |
@@ -342,9 +342,9 @@ struct exofs_dir_entry *exofs_find_entry(struct inode *dir, | |||
342 | kaddr += exofs_last_byte(dir, n) - reclen; | 342 | kaddr += exofs_last_byte(dir, n) - reclen; |
343 | while ((char *) de <= kaddr) { | 343 | while ((char *) de <= kaddr) { |
344 | if (de->rec_len == 0) { | 344 | if (de->rec_len == 0) { |
345 | EXOFS_ERR( | 345 | EXOFS_ERR("ERROR: zero-length entry in " |
346 | "ERROR: exofs_find_entry: " | 346 | "directory(0x%lx)\n", |
347 | "zero-length directory entry"); | 347 | dir->i_ino); |
348 | exofs_put_page(page); | 348 | exofs_put_page(page); |
349 | goto out; | 349 | goto out; |
350 | } | 350 | } |
@@ -472,7 +472,8 @@ int exofs_add_link(struct dentry *dentry, struct inode *inode) | |||
472 | } | 472 | } |
473 | if (de->rec_len == 0) { | 473 | if (de->rec_len == 0) { |
474 | EXOFS_ERR("ERROR: exofs_add_link: " | 474 | EXOFS_ERR("ERROR: exofs_add_link: " |
475 | "zero-length directory entry"); | 475 | "zero-length entry in directory(0x%lx)\n", |
476 | inode->i_ino); | ||
476 | err = -EIO; | 477 | err = -EIO; |
477 | goto out_unlock; | 478 | goto out_unlock; |
478 | } | 479 | } |
@@ -491,7 +492,8 @@ int exofs_add_link(struct dentry *dentry, struct inode *inode) | |||
491 | exofs_put_page(page); | 492 | exofs_put_page(page); |
492 | } | 493 | } |
493 | 494 | ||
494 | EXOFS_ERR("exofs_add_link: BAD dentry=%p or inode=%p", dentry, inode); | 495 | EXOFS_ERR("exofs_add_link: BAD dentry=%p or inode=0x%lx\n", |
496 | dentry, inode->i_ino); | ||
495 | return -EINVAL; | 497 | return -EINVAL; |
496 | 498 | ||
497 | got_it: | 499 | got_it: |
@@ -542,7 +544,8 @@ int exofs_delete_entry(struct exofs_dir_entry *dir, struct page *page) | |||
542 | while (de < dir) { | 544 | while (de < dir) { |
543 | if (de->rec_len == 0) { | 545 | if (de->rec_len == 0) { |
544 | EXOFS_ERR("ERROR: exofs_delete_entry:" | 546 | EXOFS_ERR("ERROR: exofs_delete_entry:" |
545 | "zero-length directory entry"); | 547 | "zero-length entry in directory(0x%lx)\n", |
548 | inode->i_ino); | ||
546 | err = -EIO; | 549 | err = -EIO; |
547 | goto out; | 550 | goto out; |
548 | } | 551 | } |