fi
])
-# 2.6.24
-
-# 2.6.24 has bio_endio with 2 args
-AC_DEFUN([LC_BIO_ENDIO_2ARG],
-[AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
-LB_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
-],[
- bio_endio(NULL, 0);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
- [kernel has bio_endio with 2 args])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
# up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
# v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
# v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
LC_CONFIG_RMTCLIENT
LC_CONFIG_GSS
- # 2.6.24
- LC_BIO_ENDIO_2ARG
-
# 2.6.32
LC_BLK_QUEUE_MAX_SEGMENTS
#define cfs_for_each_possible_cpu(cpu) for_each_cpu(cpu)
#endif
-#ifdef HAVE_BIO_ENDIO_2ARG
-#define cfs_bio_io_error(a,b) bio_io_error((a))
-#define cfs_bio_endio(a,b,c) bio_endio((a),(c))
-#else
-#define cfs_bio_io_error(a,b) bio_io_error((a),(b))
-#define cfs_bio_endio(a,b,c) bio_endio((a),(b),(c))
-#endif
-
#ifndef HAVE_SIMPLE_SETATTR
#define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops)
#endif
loop_add_bio(lo, old_bio);
LL_MRF_RETURN(0);
err:
- cfs_bio_io_error(old_bio, old_bio->bi_size);
+ bio_io_error(old_bio);
LL_MRF_RETURN(0);
}
while (bio) {
struct bio *tmp = bio->bi_next;
bio->bi_next = NULL;
- cfs_bio_endio(bio, bio->bi_size, ret);
+ bio_endio(bio, ret);
bio = tmp;
}
}
#define __REQ_WRITE BIO_RW
#endif
-#ifdef HAVE_BIO_ENDIO_2ARG
-#define DIO_RETURN(a)
static void dio_complete_routine(struct bio *bio, int error)
-#else
-#define DIO_RETURN(a) return(a)
-static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
-#endif
{
struct osd_iobuf *iobuf = bio->bi_private;
struct bio_vec *bvl;
bio->bi_rw, bio->bi_vcnt, bio->bi_idx, bio->bi_size,
bio->bi_end_io, cfs_atomic_read(&bio->bi_cnt),
bio->bi_private);
- DIO_RETURN(0);
+ return;
}
/* the check is outside of the cycle for performance reason -bzzz */
* deadlocking the OST. The bios are now released as soon as complete
* so the pool cannot be exhausted while IOs are competing. bug 10076 */
bio_put(bio);
- DIO_RETURN(0);
}
static void record_start_io(struct osd_iobuf *iobuf, int size)