From: Jens Axboe <axboe@suse.de>
To: "Peter T. Breuer" <ptb@it.uc3m.es>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: floppy driver 2.6.3 question
Date: Thu, 18 Mar 2004 14:31:08 +0100 [thread overview]
Message-ID: <20040318133108.GS22234@suse.de> (raw)
In-Reply-To: <200403181325.i2IDP4N19962@oboe.it.uc3m.es>
On Thu, Mar 18 2004, Peter T. Breuer wrote:
> "Also sprach Jens Axboe:"
> > > Good idea. rl is inviolate, but I set at least |=REQ_NOMERGE sometimes
> > > on flags. And I pass ioctl information in fake requests by setting
> >
> > May I ask on what commands you set that bit?
>
> I set it on requests I have gotten myself via blk_get_request(..., WRITE,
> GFP_ATOMIC) and which are destined to be passed onto the drivers request
> queue and treated by the request function. The request function will
> know what to do with them. The bit I mention below is also set on them:
Ok, sounds fine.
> > > the bit just beyond the edge of those currently used (__REQ_BITS) to
> > > indicate its an ioctl and treating it specially in end request. Maybe
> > > on error I forgot to remove the extra bit before doing put_blk_request
> >
> > Ugh, that sounds like very bad practice... The 'standard' way of doing
> > something like that is to flag REQ_SPECIAL and put whatever structure
> > you want in ->special.
>
> Hmm .. I though SPECIAL was "just" to ensure ordering of requests and
> I went to some lengths to ensure that if I receive a request then we
> start diverting incoming requests to an alternate queue until we have
> treated all the requests already on the device queue! Then we ack the
> special and pass the requests back from the alternate queue. You are
> telling me that I needn't have bothered since I'm the only one who
> could generate a special? Owww.
No, ->special is for the driver receiving the request, I don't know what
kind of bastard driver you are trying to create :-). If you pass it on,
you cannot use it.
But your code just using the after-last bit is still severly broken, you
must not play tricks like that.
Actually, sounds like you are attempting to create an io stack at the
wrong level. Why aren't you just hooking into ->make_request_fn()
instead? You are in for all sorts of pains doing what you describe
above.
--
Jens Axboe
next prev parent reply other threads:[~2004-03-18 13:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-17 20:02 floppy driver 2.6.3 question Peter T. Breuer
2004-03-18 7:14 ` Jens Axboe
2004-03-18 8:23 ` Peter T. Breuer
2004-03-18 9:10 ` Jens Axboe
2004-03-18 10:05 ` Peter T. Breuer
2004-03-18 11:35 ` Jens Axboe
2004-03-18 12:23 ` Peter T. Breuer
2004-03-18 12:28 ` Jens Axboe
2004-03-18 13:25 ` Peter T. Breuer
2004-03-18 13:31 ` Jens Axboe [this message]
2004-03-18 16:06 ` Peter T. Breuer
2004-03-18 16:16 ` Jens Axboe
2004-03-18 18:11 ` Peter T. Breuer
2004-03-18 19:05 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040318133108.GS22234@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ptb@it.uc3m.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox