lkml.org 
[lkml]   [2014]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 01/17] block: make generic_make_request handle arbitrarily sized bios
Hi Christoph,

On 23.12.2014 02:16, Christoph Hellwig wrote:
> > +void blk_queue_split(struct request_queue *q, struct bio **bio,
> > + struct bio_set *bs)
> > +{
> > + struct bio *split;
> > +
> > + if ((*bio)->bi_rw & REQ_DISCARD)
> > + split = blk_bio_discard_split(q, *bio, bs);
> > + else if ((*bio)->bi_rw & REQ_WRITE_SAME)
> > + split = blk_bio_write_same_split(q, *bio, bs);
> > + else
> > + split = blk_bio_segment_split(q, *bio, q->bio_split);
> > +
> > + if (split) {
> > + bio_chain(split, *bio);
> > + generic_make_request(*bio);
> > + *bio = split;
> > + }
> > +}
> > +EXPORT_SYMBOL(blk_queue_split);
>
> I think blk_queue_split needs to explicitly skip BLOCK_PC bios. Those
> are SCSI pass through ioctls that we can't split due to their opaque
> nature.

You mean, checking rq->cmd_type == REQ_TYPE_BLOCK_PC, right?

I'm wondering about how to check that in blk_queue_split().
At the moment when blk_queue_split() is called, it's even before a request
is mapped e.g. in blk_sq_make_request().
Unlike scsi drivers where it's easy to get cmd->rq, blk_queue_split()
doesn't seem to be able to get a request by blk_get_request().

Or am I missing something?

Thanks,
Dongsu


\
 
 \ /
  Last update: 2014-12-23 13:21    [W:0.069 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site