* [Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c
@ 2009-09-04 2:48 Wengang Wang
2009-09-04 23:11 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Wengang Wang @ 2009-09-04 2:48 UTC (permalink / raw)
To: ocfs2-devel
when an error is hit, printing the error number is helpful.
this patch adds prints in such cases in aops.c.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
---
fs/ocfs2/aops.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index b2c52b3..04e0760 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -349,8 +349,10 @@ static int ocfs2_readpages(struct file *filp, struct address_space *mapping,
* lock inversion, but don't bother with retrying.
*/
ret = ocfs2_inode_lock_full(inode, NULL, 0, OCFS2_LOCK_NONBLOCK);
- if (ret)
+ if (ret) {
+ mlog_errno(ret);
return err;
+ }
if (down_read_trylock(&oi->ip_alloc_sem) == 0) {
ocfs2_inode_unlock(inode, 0);
@@ -842,8 +844,10 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
*/
while(wait_bh > wait) {
wait_on_buffer(*--wait_bh);
- if (!buffer_uptodate(*wait_bh))
+ if (!buffer_uptodate(*wait_bh)) {
ret = -EIO;
+ mlog_errno(ret);
+ }
}
if (ret == 0 || !new)
@@ -1527,6 +1531,7 @@ static int ocfs2_write_begin_inline(struct address_space *mapping,
if (!PageUptodate(page)) {
ret = ocfs2_read_inline_data(inode, page, wc->w_di_bh);
if (ret) {
+ mlog_errno(ret);
ocfs2_commit_trans(osb, handle);
goto out;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c
2009-09-04 2:48 [Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c Wengang Wang
@ 2009-09-04 23:11 ` Joel Becker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2009-09-04 23:11 UTC (permalink / raw)
To: ocfs2-devel
On Fri, Sep 04, 2009 at 10:48:38AM +0800, Wengang Wang wrote:
> when an error is hit, printing the error number is helpful.
> this patch adds prints in such cases in aops.c.
>
> Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
> ---
> fs/ocfs2/aops.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index b2c52b3..04e0760 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -349,8 +349,10 @@ static int ocfs2_readpages(struct file *filp, struct address_space *mapping,
> * lock inversion, but don't bother with retrying.
> */
> ret = ocfs2_inode_lock_full(inode, NULL, 0, OCFS2_LOCK_NONBLOCK);
> - if (ret)
> + if (ret) {
> + mlog_errno(ret);
> return err;
> + }
Make sure that you don't print EAGAIN.
Joel
--
Life's Little Instruction Book #232
"Keep your promises."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-04 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-04 2:48 [Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c Wengang Wang
2009-09-04 23:11 ` Joel Becker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.