Skip to contentSkip to conversation

OCFS2: add IO error check in ocfs2_get_sector() -v3

PATCH New wengang wang 2 participants 2 messages Feb 13, 2009 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OCFS2: add IO error check in ocfs2_get_sector() -v3

checks IO error in ocfs2_get_sector().

this patch is based on Linus' git.

--

fs/ocfs2/super.c renamed from fs/ocfs2/super.c.orig +7 -0
diff -up ./fs/ocfs2/super.c.orig ./fs/ocfs2/super.c
@@ -1537,6 +1537,13 @@ 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);
+		*bh = NULL;
+		return -EIO;
+	}
+
 	return 0;
 }
 
#1 lore raw

PATCH 1/1 OCFS2: add IO error check in ocfs2_get_sector() -v3

Quoted 28 lines · wengang wang

checks IO error in ocfs2_get_sector().

this patch is based on Linus' git.

--
diff -up ./fs/ocfs2/super.c.orig ./fs/ocfs2/super.c

fs/ocfs2/super.c 2009-02-12 18:07:13.995623000 -0800 renamed from fs/ocfs2/super.c.orig 2009-02-12 18:05:19.023685000 -0800 +7 -0
@@ -1537,6 +1537,13 @@ 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);
+        *bh = NULL;
+        return -EIO;
+    }
+
   return 0;
 }
 

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel