On Mon, Jan 30, 2012 at 07:31:28PM -0500, Martin K. Petersen wrote: [..] > --- a/block/elevator.c > +++ b/block/elevator.c > @@ -82,6 +82,12 @@ int elv_rq_merge_ok(struct request *rq, struct bio *bio) > return 0; > > /* > + * Don't merge write same requests > + */ > + if ((bio->bi_rw & REQ_WRITE_SAME) || (rq->bio->bi_rw & REQ_WRITE_SAME)) > + return 0; > + [..] > #define rq_mergeable(rq) \ > (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ > - (((rq)->cmd_flags & REQ_DISCARD) || \ > - (rq)->cmd_type == REQ_TYPE_FS)) > + (((rq)->cmd_flags & REQ_DISCARD || \ > + (rq)->cmd_flags & REQ_WRITE_SAME || \ > + (rq)->cmd_type == REQ_TYPE_FS))) In elv_rq_merge_ok() we don't allow merge of WRITE_SAME requests but in rq_mergeable() we do say that requests having WRITE_SAME can be merged. 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