linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fawad Lateef <fawadlateef@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Jens Axboe <axboe@suse.de>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Reuse of BIOs
Date: Thu, 8 Sep 2005 06:32:20 -0700	[thread overview]
Message-ID: <1e62d1370509080632873c1d1@mail.gmail.com> (raw)
In-Reply-To: <11859.1126185451@warthog.cambridge.redhat.com>

On 9/8/05, David Howells <dhowells@redhat.com> wrote:
> 
> 
> Is it possible to reuse a BIO once the callback on it has been invoked to
> indicate final completion? Or does it have to be released and another one
> allocated?
> 

The thing which I did in my virtual caching device driver is I keeps
the pointer of BIO got from the kernel in my locally created BIO's
private field (and fill other fields with the original BIO's Data) and
sends it to other caching device and when got the end_io for that BIO
(like in read from caching device and writing to target device) I put
that in the queue and one of my thread directly sends that to the
target device without changed except replacing the sector of caching
device to the target device sector and after getting completion signal
from target device, I just freed that BIO or move it to my free pool
of BIOs and just call the completion for the original BIO taken back
from the private field of local BIO ..........

This means we can reuse BIO sended to one device and then sending that
to other device after getting completion signal from first device
......... But I can't say this about the original kernel BIO b/c I m
not sending it to any of my devices !!!!

-- 
Fawad Lateef

      parent reply	other threads:[~2005-09-08 13:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08 13:17 Reuse of BIOs David Howells
2005-09-08 13:19 ` Jens Axboe
2005-09-08 13:32 ` Fawad Lateef [this message]

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=1e62d1370509080632873c1d1@mail.gmail.com \
    --to=fawadlateef@gmail.com \
    --cc=axboe@suse.de \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).