On Thu, Mar 01, 2012 at 10:22:45PM -0500, Martin K. Petersen wrote: [..] > -static inline int bio_has_data(struct bio *bio) > +static inline bool bio_has_data(struct bio *bio) > { > - return bio && bio->bi_io_vec != NULL; > + if (bio && bio->bi_io_vec) > + return true; > + > + return false; > +} > + > +static inline bool bio_is_rw(struct bio *bio) > +{ > + if (!bio_has_data(bio)) > + return false; > + > + return true; > +} > + Hi Martin, So in this patch bio_is_rw() == bio_is_data(). Do they diverge in later patches? > +static inline bool bio_mergeable(struct bio *bio) > +{ > + if (bio->bi_rw & REQ_NOMERGE_FLAGS) > + return false; > + > + return true; > } Some of the flags in REQ_NOMERGE_FLAGS are rq only and should not be used on bio. For example REQ_NOMERGE and REQ_STARTED. Will it be better to define BIO_NOMERGE_FLAGS separately? Thanks Vivek -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html