Whamcloud - gitweb
Branch: b1_4
authoradilger <adilger>
Wed, 13 Apr 2005 21:14:58 +0000 (21:14 +0000)
committeradilger <adilger>
Wed, 13 Apr 2005 21:14:58 +0000 (21:14 +0000)
If there is an IO error the bio completion routine will be called multiple
times.  We don't want to free the dreq until the last completion.
b=6046
r=alex (original patch)

lustre/ChangeLog
lustre/obdfilter/filter_io_26.c

index c924e53..5800459 100644 (file)
@@ -17,6 +17,7 @@ tbd         Cluster File Systems, Inc. <info@clusterfs.com>
          striping settings if present parent (3048)
        - flush buffers from cache before direct IO in 2.6 obdfilter (4982)
        - don't hold client locks on temporary worklist from l_lru (5666)
+       - handle IO errors in 2.6 obdfilter bio completion routine (6046)
        * miscellania
        - by default create 1 inode per 4kB space on MDS, per 16kB on OSTs
        - allow --write-conf on an MDS with different nettype than client (5619)
index 79b3915..a248361 100644 (file)
@@ -113,6 +113,12 @@ static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
         struct dio_request *dreq = bio->bi_private;
         unsigned long flags;
 
+        if (bio->bi_size) {
+                CWARN("gets called against non-complete bio 0x%p: %d/%d/%d\n",
+                      bio, bio->bi_size, done, error);
+                return 1;
+        }
+
         if (dreq == NULL) {
                 CERROR("***** bio->bi_private is NULL!  This should never "
                        "happen.  Normally, I would crash here, but instead I "