ocfs2: adds mlog_errno to aops.c
PATCH 1/1 ocfs2: adds mlog_errno to aops.c
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 <[email protected]>
--- fs/ocfs2/aops.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
fs/ocfs2/aops.c +7 -2
@@ -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;
Signature · 1 line
1.6.2.5
PATCH 1/1 ocfs2: adds mlog_errno to aops.c
Quoted 13 lines · Wengang Wang
when an error is hit, printing the error number is helpful.
this patch adds prints in such cases inaops.c.Signed-off-by Wengang Wang <[email protected]>--- fs/ocfs2/aops.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)fs/ocfs2/aops.c +0
-0
fs/ocfs2/aops.c static int ocfs2_readpages(struct file *filp, struct address_space *mapping, · line 355
Quoted 8 lines
fs/ocfs2/aops.c +3
-1@@ -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
Signature · 9 lines
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