Skip to content
Permalink
Browse files
ceph: Use generic debugging facility
The dout macro duplicates the generic features of pr_debug with
__FILE__ and __func__ output capability when using dynamic_debug.

Convert dout to pr_debug and remove the "pretty" print feature
of dout.

Miscellanea:

o Realign arguments

Signed-off-by: Joe Perches <joe@perches.com>
  • Loading branch information
JoePerches authored and intel-lab-lkp committed Aug 16, 2020
1 parent 02e3757 commit ab0413062c34a692c0480a3237a04534f823e02d
Show file tree
Hide file tree
Showing 19 changed files with 1,133 additions and 1,115 deletions.

Large diffs are not rendered by default.

@@ -125,7 +125,7 @@ static enum fscache_checkaux ceph_fscache_inode_check_aux(
if (memcmp(data, &aux, sizeof(aux)) != 0)
return FSCACHE_CHECKAUX_OBSOLETE;

dout("ceph inode 0x%p cached okay\n", ci);
pr_debug("ceph inode 0x%p cached okay\n", ci);
return FSCACHE_CHECKAUX_OKAY;
}

@@ -191,16 +191,16 @@ void ceph_fscache_file_set_cookie(struct inode *inode, struct file *filp)
return;

if (inode_is_open_for_write(inode)) {
dout("fscache_file_set_cookie %p %p disabling cache\n",
inode, filp);
pr_debug("fscache_file_set_cookie %p %p disabling cache\n",
inode, filp);
fscache_disable_cookie(ci->fscache, &ci->i_vino, false);
fscache_uncache_all_inode_pages(ci->fscache, inode);
} else {
fscache_enable_cookie(ci->fscache, &ci->i_vino, i_size_read(inode),
ceph_fscache_can_enable, inode);
if (fscache_cookie_enabled(ci->fscache)) {
dout("fscache_file_set_cookie %p %p enabling cache\n",
inode, filp);
pr_debug("fscache_file_set_cookie %p %p enabling cache\n",
inode, filp);
}
}
}
@@ -238,14 +238,14 @@ int ceph_readpage_from_fscache(struct inode *inode, struct page *page)

switch (ret) {
case 0: /* Page found */
dout("page read submitted\n");
pr_debug("page read submitted\n");
return 0;
case -ENOBUFS: /* Pages were not found, and can't be */
case -ENODATA: /* Pages were not found */
dout("page/inode not in cache\n");
pr_debug("page/inode not in cache\n");
return ret;
default:
dout("%s: unknown error ret = %i\n", __func__, ret);
pr_debug("%s: unknown error ret = %i\n", __func__, ret);
return ret;
}
}
@@ -267,14 +267,14 @@ int ceph_readpages_from_fscache(struct inode *inode,

switch (ret) {
case 0: /* All pages found */
dout("all-page read submitted\n");
pr_debug("all-page read submitted\n");
return 0;
case -ENOBUFS: /* Some pages were not found, and can't be */
case -ENODATA: /* some pages were not found */
dout("page/inode not in cache\n");
pr_debug("page/inode not in cache\n");
return ret;
default:
dout("%s: unknown error ret = %i\n", __func__, ret);
pr_debug("%s: unknown error ret = %i\n", __func__, ret);
return ret;
}
}

0 comments on commit ab04130

Please sign in to comment.