From: adilger Date: Wed, 13 Apr 2005 21:14:58 +0000 (+0000) Subject: Branch: b1_4 X-Git-Tag: v1_8_0_110~486^7~19 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=dfe29d93664af89b240a39993094e18282b90681;p=fs%2Flustre-release.git Branch: b1_4 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) --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index c924e53..5800459 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -17,6 +17,7 @@ tbd Cluster File Systems, Inc. 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) diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 79b3915..a248361 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -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 "