wengang wang
2009-Feb-12 07:47 UTC
[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
checks IO error in ocfs2_get_sector().
this patch is based on 1.4 git.
Signed-off-by: Wengang wang <wen.gang.wang at oracle.com>
--
Index: fs/ocfs2/super.c
==================================================================---
fs/ocfs2/super.c (revision 128)
+++ fs/ocfs2/super.c (working copy)
@@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super
unlock_buffer(*bh);
ll_rw_block(READ, 1, bh);
wait_on_buffer(*bh);
+ if (!buffer_uptodate(*bh)) {
+ mlog_errno(-EIO);
+ brelse(*bh);
+ return -EIO;
+ }
+
return 0;
}
Sunil Mushran
2009-Feb-12 19:23 UTC
[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
The matching brelse() is in ocfs2_fill_super(). So you shouldn't need it. Cross check though please. Secondly, when you make a patch, please make it against mainline. ocfs2 1.4 pulls in patches from mainline. Sunil wengang wang wrote:> checks IO error in ocfs2_get_sector(). > > this patch is based on 1.4 git. > > Signed-off-by: Wengang wang <wen.gang.wang at oracle.com> > -- > Index: fs/ocfs2/super.c > ==================================================================> --- fs/ocfs2/super.c (revision 128) > +++ fs/ocfs2/super.c (working copy) > @@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super > unlock_buffer(*bh); > ll_rw_block(READ, 1, bh); > wait_on_buffer(*bh); > + if (!buffer_uptodate(*bh)) { > + mlog_errno(-EIO); > + brelse(*bh); > + return -EIO; > + } > + > return 0; > } > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel >
Joel Becker
2009-Feb-12 19:45 UTC
[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
On Thu, Feb 12, 2009 at 03:47:26PM +0800, wengang wang wrote:> checks IO error in ocfs2_get_sector(). > > this patch is based on 1.4 git.This patch is good, but definitely needs to be against mainline. sobby> > Signed-off-by: Wengang wang <wen.gang.wang at oracle.com> > -- > Index: fs/ocfs2/super.c > ==================================================================> --- fs/ocfs2/super.c (revision 128) > +++ fs/ocfs2/super.c (working copy) > @@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super > unlock_buffer(*bh); > ll_rw_block(READ, 1, bh); > wait_on_buffer(*bh); > + if (!buffer_uptodate(*bh)) { > + mlog_errno(-EIO); > + brelse(*bh); > + return -EIO; > + } > + > return 0; > } > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel-- The Graham Corollary: The longer a socially-moderated news website exists, the probability of an old Paul Graham link appearing at the top approaches certainty. Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
Possibly Parallel Threads
- [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v3
- [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector()
- [PATCH] btrfs: fix write_dev_supers
- [PATCH] ocfs2: Add statistics for the checksum and ecc operations.
- [PATCH 1/1] OCFS2: Log -EIO errors just when hit them.