Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Lars Marowsky-Bree <lmb@suse.de>
To: Jens Axboe <axboe@suse.de>
Cc: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] Re: drbd uses wrong API for struct bio
Date: Mon, 24 Jan 2005 10:28:22 +0100	[thread overview]
Message-ID: <20050124092822.GB5451@marowsky-bree.de> (raw)
In-Reply-To: <20050124091006.GA2716@suse.de>

On 2005-01-24T10:10:07, Jens Axboe <axboe@suse.de> wrote:

> drbd_ee_init() doesn't look good. First of all, it makes assumptions
> about what bio_init() would do - it doesn't clear the entire bio to 0.
> This is the type of thing that exposes bugs when we add or change parts
> of the bio stuff, please uncomment that bio_init() call. It does set
> bio->bi_max_vecs, however it needs changing to passing the bdev in so we
> can use bio_add_page() instead. drbd_ee_bio_prepare() looks strange, it
> sets vec length but doesn't assign the page or offset. Again, it should
> use the proper api (bio_add_page()). If it had used bio_init(), it would
> not have to set BIO_UPTODATE manually either.
> 
> bio->bi_next is a pointer, not an integer. Use NULL.
> 
> drbd_blk_run_queue() doesn't look legal, unless it's only ever run on
> drbd's own queue. Even if so, it should remove the plug. I'd suggest
> just using generic_unplug_device().
> 
> drdb should just use bio_iovec(bio) when it uses bio->bi_idx as the
> index anyways.

Ok, I'll go through the code and clean this up now. Thanks!

I'll hassle you with more questions as my changes oops ;-)

> The bio embedding may not be the best idea or the prettiest, but as long
> as it sets ->bi_max_vecs it should be ok. In general the code could
> really do with someone cleaning it up in preperation for submitting to
> mainline...

Yeah, that's happening with 0.8, but this is a 'maintenance' branch,
with all what that entails :-( drbd 0.7 on 2.4 is (unfortunately ;-)
still making money for Linbit, or else I'd guess everyone would be just
too happy to rip it out.


Sincerely,
    Lars Marowsky-Brée <lmb@suse.de>

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business


  reply	other threads:[~2005-01-24  9:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23 16:16 [Drbd-dev] drbd uses wrong API for struct bio Lars Marowsky-Bree
2005-01-24  8:24 ` [Drbd-dev] " Jens Axboe
2005-01-24 12:32   ` Helmut Wollmersdorfer
2005-01-24 12:35     ` Lars Marowsky-Bree
2005-01-24  9:10 ` Jens Axboe
2005-01-24  9:28   ` Lars Marowsky-Bree [this message]
2005-01-24  9:58   ` Lars Marowsky-Bree
2005-01-24 10:23     ` Jens Axboe
2005-01-24 10:28       ` Lars Marowsky-Bree
2005-01-24 12:24         ` Lars Marowsky-Bree
2005-01-24 12:52           ` Lars Marowsky-Bree
2005-01-24 14:29         ` Philipp Reisner
2005-01-26 11:15         ` Lars Ellenberg
2005-01-24 14:27     ` Philipp Reisner
2005-01-24 14:27 ` [Drbd-dev] " Philipp Reisner
2005-01-24 14:37   ` Lars Marowsky-Bree
2005-01-24 14:38 ` Philipp Reisner
2005-01-24 14:41   ` Lars Marowsky-Bree
2005-01-24 20:46     ` Lars Marowsky-Bree
2005-01-24 23:23 ` [Drbd-dev] [fix] " Lars Marowsky-Bree
2005-01-25  9:26   ` Philipp Reisner
2005-01-25  9:39     ` Jens Axboe
2005-01-25  9:58       ` Philipp Reisner
2005-01-25 10:05         ` Lars Marowsky-Bree
2005-01-25 11:44           ` Philipp Reisner
2005-01-25  9:53     ` Lars Marowsky-Bree

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=20050124092822.GB5451@marowsky-bree.de \
    --to=lmb@suse.de \
    --cc=axboe@suse.de \
    --cc=drbd-dev@lists.linbit.com \
    /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