Re: [patch] 4GB I/O, cut three

Mark Hemment (markhe@veritas.com)
Wed, 30 May 2001 14:37:15 +0100 (BST)


On Wed, 30 May 2001, Jens Axboe wrote:
> On Wed, May 30 2001, Mark Hemment wrote:
> > This can lead to attempt_merge() releasing the embedded request
> > structure (which, as an extract copy, has the ->q set, so to
> > blkdev_release_request() it looks like a request which originated from
> > the block layer). This isn't too healthy.
> >
> > The fix here is to add a check in __scsi_merge_requests_fn() to check
> > for ->special being non-NULL.
>
> How about just adding
>
> if (req->cmd != next->cmd
> || req->rq_dev != next->rq_dev
> || req->nr_sectors + next->nr_sectors > q->max_sectors
> || next->sem || req->special)
> return;
>
> ie check for special too, that would make sense to me. Either way would
> work, but I'd rather make this explicit in the block layer that 'not
> normal' requests are left alone. That includes stuff with the sem set,
> or special.

Yes, that is an equivalent fix.

In the original patch I wanted to keep the change local (ie. in the SCSI
layer). Pushing the check up the generic block layer makes sense.

Are you going to push this change to Linus, or should I?
I'm assuming the other scsi-layer changes in Alan's tree will eventually
be pushed.

Mark

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/