public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Hannes Reinecke <hare@suse.de>
Cc: device-mapper development <dm-devel@redhat.com>,
	linux-scsi@vger.kernel.org, michaelc@cs.wisc.edu,
	k-ueda@ct.jp.nec.com
Subject: Re: [PATCH][RFC] Use bio markers for request callback
Date: Tue, 11 Sep 2007 13:11:34 +0200	[thread overview]
Message-ID: <20070911111133.GJ15405@kernel.dk> (raw)
In-Reply-To: <20070911124446.qs5cek5mskowckcc@imap.suse.de>

On Tue, Sep 11 2007, Hannes Reinecke wrote:
> Hi all,
>
> this is a proposal for a different implementation of request callbacks. The 
> existing ->endio callback of a request is actually a destructor function, 
> to be called to terminate a request and free all structures.
>
> However, on certain occasions (like request-based multipathing) it is 
> desirable to have a callback function for a request which is called right 
> after the request is finished, ie in end_that_request_first() before any 
> bio->bi_endio callback is called.
>
> So a simple solution for this is to clone the request and add a new 
> 'marker' bio in front of the bio list of the request. This callback will be 
> attached a structure in bi_private which keeps a pointer to the cloned and 
> the original request, thus serving as a callback for the request itself.
>
> Proposed patch attached. As usual comments are welcome.

Honestly, I think this approach is a much worse design than the NEC
callback option. Exporting __make_request() (which is an INTERNAL
function) aside, this looks like one big hack with pseudo bio attached
to front of list, the enable/disable elevator stuff (does that even work
on stacked devices?).

-- 
Jens Axboe


  reply	other threads:[~2007-09-11 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11 10:44 [PATCH][RFC] Use bio markers for request callback Hannes Reinecke
2007-09-11 11:11 ` Jens Axboe [this message]
2007-09-11 14:27   ` Hannes Reinecke
2007-09-11 16:49 ` Kiyoshi Ueda

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=20070911111133.GJ15405@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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