Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.4.24-jbd-handle-EIO-rhel3.patch
diff --git a/lustre/kernel_patches/patches/linux-2.4.24-jbd-handle-EIO-rhel3.patch b/lustre/kernel_patches/patches/linux-2.4.24-jbd-handle-EIO-rhel3.patch
new file mode 100644 (file)
index 0000000..bc66351
--- /dev/null
@@ -0,0 +1,23 @@
+diff -X /home/nikita/src/linux-git/linux-2.6.git/Documentation/dontdiff -rupbB linux-2.4.24.orig/fs/jbd/commit.c linux-2.4.24/fs/jbd/commit.c
+--- linux-2.4.24.orig/fs/jbd/commit.c  2005-06-23 17:39:32.000000000 +0400
++++ linux-2.4.24/fs/jbd/commit.c       2005-06-23 15:56:05.000000000 +0400
+@@ -505,6 +505,9 @@ start_journal_io:
+                       goto wait_for_iobuf;
+               }
++              if (unlikely(!buffer_uptodate(bh)))
++                      err = -EIO;
++
+               clear_bit(BH_JWrite, &jh2bh(jh)->b_state);
+               JBUFFER_TRACE(jh, "ph4: unfile after journal write");
+@@ -566,6 +569,9 @@ start_journal_io:
+                       goto wait_for_ctlbuf;
+               }
++              if (unlikely(!buffer_uptodate(bh)))
++                      err = -EIO;
++
+               BUFFER_TRACE(bh, "ph5: control buffer writeout done: unfile");
+               clear_bit(BH_JWrite, &bh->b_state);
+               journal_unfile_buffer(jh);