Whamcloud - gitweb
b=19625 ext4 support for SLES11
authorRahul Deshmukh <Rahul.Deshmukh@sun.com>
Sat, 14 Aug 2010 08:09:50 +0000 (12:09 +0400)
committerMikhail Pershin <tappro@sun.com>
Tue, 17 Aug 2010 05:07:20 +0000 (09:07 +0400)
Bug 19625 ext4 support for SLES11

Ported the ext4 support for SLES11 related changes for master.

lustre/obdfilter/filter_io_26.c

index 82cdfba..404fce8 100644 (file)
@@ -136,8 +136,16 @@ static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
         /* CAVEAT EMPTOR: possibly in IRQ context
          * DO NOT record procfs stats here!!! */
 
-        if (bio->bi_size)                       /* Not complete */
-                return 1;
+#ifdef HAVE_BIO_ENDIO_2ARG
+       /* The "bi_size" check was needed for kernels < 2.6.24 in order to
+        * handle the case where a SCSI request error caused this callback
+        * to be called before all of the biovecs had been processed.
+        * Without this check the server thread will hang.  In newer kernels
+        * the bio_end_io routine is never called for partial completions,
+        * so this check is no longer needed. */
+        if (bio->bi_size)                      /* Not complete */
+                DIO_RETURN(1);
+#endif
 
         if (unlikely(iobuf == NULL)) {
                 CERROR("***** bio->bi_private is NULL!  This should never "