From: Rahul Deshmukh Date: Sat, 14 Aug 2010 08:09:50 +0000 (+0400) Subject: b=19625 ext4 support for SLES11 X-Git-Tag: 2.0.51.0~87 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6620138593ba3b4acc4a7a91365e0bfceec817a3 b=19625 ext4 support for SLES11 Bug 19625 ext4 support for SLES11 Ported the ext4 support for SLES11 related changes for master. --- diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 82cdfba..404fce8 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -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 "